aroche

Dr. Austin Roche

305 Reputation

7 Badges

11 years, 299 days
Maplesoft
Waterloo, Ontario, Canada
I am a Software Architect in the Math Group, working mostly on the Maple library. I have been working at Maplesoft since 2007, in various areas including differential equations, integration, mathematical functions, simplification, root finding, and logic. I completed a Master's degree from McGill University with a thesis in Differential Geometry, and a PhD from Simon Fraser University with a thesis on Differential Equations.

MaplePrimes Activity


These are replies submitted by aroche

Hi,

Thank you for the report!

I just want to say that I am investigating this issue (in coulditbe) and currently testing some potential improvements.

Regards,
    Austin

Hi @Carl Love,

Thank you for this feedback! We've considered all of your suggestions and we liked most of them. In particular, we've decided to incorporate your suggestion regarding adding a new &under verification, and it should appear in the next full release.

Best regards,
    Austin

Hi @vv,

I read your comment and agreed that the solution it was computing was not complete. I've made some changes: it now computes the IVP solution for each of the 3 computed "solutions" for diff(y(x),x):

ode:=diff(y(x), x)^3 = (x - 2)^2:ic:=y(2)=1:
Student:-ODEs:-Solve([ode,ic]);

y(x) = 1+(1/5)*(3*x-6)*(x-2)^(2/3), y(x) = -(3/10)*(x-2)^(5/3)*(1+I*3^(1/2))+1, y(x) = (3/10)*(x-2)^(5/3)*(I*3^(1/2)-1)+1

Student:-ODEs:-ODESteps([ode,ic]);

"[[,,"Let's solve"],[,,[((ⅆ)/(ⅆx) y(x))^3=(x-2)^2,y(2)=1]],["•",,"Highest derivative means the order of the ODE is" 1],[,,(ⅆ)/(ⅆx) y(x)],["•",,"Solve for the highest derivative"],[,,[(ⅆ)/(ⅆx) y(x)=(x-2)^(2/3),(ⅆ)/(ⅆx) y(x)=-((x-2)^(2/3))/2-(ⅈ sqrt(3) (x-2)^(2/3))/2,(ⅆ)/(ⅆx) y(x)=-((x-2)^(2/3))/2+(ⅈ sqrt(3) (x-2)^(2/3))/2]],["▫",,"Solve the equation" (ⅆ)/(ⅆx) y(x)=(x-2)^(2/3)],[,"?","Integrate both sides with respect to" x],[,,∫((ⅆ)/(ⅆx) y(x)) ⅆx=∫(x-2)^(2/3) ⅆx+c__1],[,"?","Evaluate integral"],[,,y(x)=(3 (x-2)^(5/3))/5+c__1],[,"?","Solve for" y(x)],[,,y(x)=(3 (x-2)^(5/3))/5+c__1],[,"?","Use initial condition" y(2)=1],[,,1=c__1],[,"?","Solve for" c__1],[,,c__1=1],[,"?","Substitute" c__1=1 "into general solution and simplify"],[,,y(x)=1+((3 x-6) (x-2)^(2/3))/5],[,"?","Solution to the IVP"],[,,y(x)=1+((3 x-6) (x-2)^(2/3))/5],["▫",,"Solve the equation" (ⅆ)/(ⅆx) y(x)=-((x-2)^(2/3))/2-(ⅈ sqrt(3) (x-2)^(2/3))/2],[,"?","Integrate both sides with respect to" x],[,,∫((ⅆ)/(ⅆx) y(x)) ⅆx=∫(-((x-2)^(2/3))/2-(ⅈ sqrt(3) (x-2)^(2/3))/2) ⅆx+c__1],[,"?","Evaluate integral"],[,,y(x)=-(3 (x-2)^(5/3) (1+ⅈ sqrt(3)))/10+c__1],[,"?","Use initial condition" y(2)=1],[,,1=c__1],[,"?","Solve for" c__1],[,,c__1=1],[,"?","Substitute" c__1=1 "into general solution and simplify"],[,,y(x)=-(3 (x-2)^(5/3) (1+ⅈ sqrt(3)))/10+1],[,"?","Solution to the IVP"],[,,y(x)=-(3 (x-2)^(5/3) (1+ⅈ sqrt(3)))/10+1],["▫",,"Solve the equation" (ⅆ)/(ⅆx) y(x)=-((x-2)^(2/3))/2+(ⅈ sqrt(3) (x-2)^(2/3))/2],[,"?","Integrate both sides with respect to" x],[,,∫((ⅆ)/(ⅆx) y(x)) ⅆx=∫(-((x-2)^(2/3))/2+(ⅈ sqrt(3) (x-2)^(2/3))/2) ⅆx+c__1],[,"?","Evaluate integral"],[,,y(x)=(3 (x-2)^(5/3) (ⅈ sqrt(3)-1))/10+c__1],[,"?","Use initial condition" y(2)=1],[,,1=c__1],[,"?","Solve for" c__1],[,,c__1=1],[,"?","Substitute" c__1=1 "into general solution and simplify"],[,,y(x)=(3 (x-2)^(5/3) (ⅈ sqrt(3)-1))/10+1],[,"?","Solution to the IVP"],[,,y(x)=(3 (x-2)^(5/3) (ⅈ sqrt(3)-1))/10+1],["•",,"Set of solutions"],[,,{y(x)=1+((3 x-6) (x-2)^(2/3))/5,y(x)=-(3 (x-2)^(5/3) (1+ⅈ sqrt(3)))/10+1,y(x)=(3 (x-2)^(5/3) (ⅈ sqrt(3)-1))/10+1}]]6""

Download 238434_Ans1.mw
Unfortunately, the solution with y(x) real is comprised of the first of these solutions when x>2, and the 2nd of them when x <2:

evalc(y(x) = -(3*(x - 2)^(5/3)*(1 + sqrt(3)*I))/10 + 1) assuming x < 2;

y(x) = -(3/5)*(2-x)^(5/3)+1

Download 238434_Ans2.mw
I'm not sure if there's much more that can be done about this, because Student:-ODEs is relying on solve to solve for the derivative and solve is returning the solutions in this format.

This improvement is distributed for everybody using Maple 2024 within the Maplesoft Physics Updates v.1758 or newer. To install the Updates, open Maple and input Physics:-Version(latest)

Austin Roche
Maplesoft

 

Thanks for the report. A fix has been made and is expected in the next patch release (2024.1).

-Austin
 

@Aung Yes, the fix mentioned above only fixes a wrong answer from simplify. It does not fix the weakness in integration. I'm not even sure if this integral can be solved.

In Maple 2024 simplify will directly give the desired answer under the assumption m::integer:

simplify(4*cos(Pi*m+2*alpha*Pi)/(Pi*(2*m + 1))) assuming m::integer;

4*cos(2*alpha*Pi)*(-1)^m/(Pi*(2*m+1))

Download tmp1.mw

 

Hi @Preben Alsholm ,
The simplify bug mentioned above is now fixed:

simplify(int((1 - sigma*sin(2*Pi*N))^k, N = 0 .. N))

now returns unchanged and thanks to @ecterrab the fix is also distributed for everybody using Maple 2024 within the Maplesoft Physics Updates v.1717 or newer. As usual, to install the Updates, open Maple and input Physics:-Version(latest).

Cheers,

       Austin

Hi @nm,
This fix should also be available in a future Maple2024.1 patch release.
Cheers,
     Austin

Follow up note on this. If we take the original integral, let t=x^2, -1/2 a^2 =b, then we get the simpler version:

Int(exp(b/x^2), x = 0 .. infinity)

The antiderivative oscillates wildly at 0+ and so the integral is undefined (does not converge, even to infinity) when Re(b) > 0 and Im(b) <> 0 (example, b=I+1). As such the new answer is unevaluated, but it returns infinity if evaluated under appropriate assumptions.

@Mariusz Iwaniuk Thank you, we've entered these issues into our system.

Thank you all for your comments regarding not handling equality assumptions as assignments. Historically assume was not really intended to be used to give a variable a specific value - other mechanisms, such as eval, or the 'use' command, are more suited to this. In particular, Maple may ignore special cases (for which the associated set of parameter values has measure 0), because returning an answer which accounts for every possible subcase may not be practical (or efficient - note, checking for potential subcases using 'is' can be much slower than checking a type!). Instead, it aims to at least return an answer for the general case, and relies on the user explicitly substituting the parameter values before calling the function in question. Of course, finding the right set of cases to treat specially is definitely a goal we are working towards.

Austin Roche
Mathematical Software, Maplesoft

@JacquesC Regarding details, it's a mixed bag, including various changes targeted at improving specific int routines, as well as improvements in other parts of the library, which had the side effect of improving int. These latter improvements were sometimes motivated specifically by the effect they would have on improving int.

Page 1 of 1