nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

I noticed that Student:-ODEs:-ODESteps does not use the newer subscripted constant of integrations for solution of odes which looks much nicer.

Is there a way to make it use same constant of integrations as dsolve() does? Compare  

This is on a worksheet using typesetting level extended. Worksheet is attached


 

restart

18836

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1724 and is the same as the version installed in this computer, created 2024, April 15, 17:29 hours Pacific Time.`

#to make Maple use the new constant of integrations. Is this still needed in Maple 2024?
dsolve(diff(y(x),x$9)=1,arbitraryconstants=subscripted):
pdsolve(diff(psi(x,t),x$9)=0,arbitraryfunctions=subscripted):

ode := diff(y(x), x$2) + 2*y(x) = 0;
Student:-ODEs:-ODESteps(ode,y(x));

ode := diff(y(x), x, x)+2*y(x) = 0

"[[,,"Let's solve"],[,,((ⅆ)^2)/(ⅆx^2) y(x)+2 y(x)=0],["•",,"Highest derivative means the order of the ODE is" 2],[,,((ⅆ)^2)/(ⅆx^2) y(x)],["•",,"Characteristic polynomial of ODE"],[,,r^2+2=0],["•",,"Use quadratic formula to solve for" r],[,,r=(0+/-([]))/2],["•",,"Roots of the characteristic polynomial"],[,,r=(-ⅈ sqrt(2),ⅈ sqrt(2))],["•",,"1st solution of the ODE"],[,,y[1](x)=cos(sqrt(2) x)],["•",,"2nd solution of the ODE"],[,,y[2](x)=sin(sqrt(2) x)],["•",,"General solution of the ODE"],[,,y(x)=C1 y[1](x)+C2 y[2](x)],["•",,"Substitute in solutions"],[,,y(x)=C1 cos(sqrt(2) x)+C2 sin(sqrt(2) x)]]"

#compare to this output
dsolve(ode,y(x));

y(x) = c__1*sin(2^(1/2)*x)+c__2*cos(2^(1/2)*x)


 

Download make_step_solution_use_new_constant_of_integration.mw

 

I noticed tags on the post  

https://mapleprimes.com/questions/238161-Why-Maple-Gives-Solution-To-Euler-Ode

keep disappearing. 

I added tags "differential equation" and "dsolve" and so on.  

Later on when I visit this site again I found the tags are all gone.

Why does Mapleprimes remove the tags on post?

Or is someone else removing the tags? If so, why? is something wrong with the tags I've added?

This happend twice on this one post. I noticed earlier today the tags were gone, so I added them again. And now I see the same thing. They are all gone.

I found that sometimes Maple gives

               Error, (in Typesetting:-Parse) too many levels of recursion

When using the Latex command on the output of Student:-ODEs:-ODESteps

Below is worksheet showing it works for some and gives error for others. Is there a workaround for this? I'd like to convert the steps to Latex.

This happens in worksheet using either Display->Typesetting level as EXTENDED or STANDARD

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1722 and is the same as the version installed in this computer, created 2024, April 12, 17:58 hours Pacific Time.`

ode:=diff(y(x),x)=0;
the_output:=Student:-ODEs:-ODESteps(ode,y(x)):
latex(the_output)

diff(y(x), x) = 0

\begin{array}{ccc}
 & {} & \textrm{Let's solve}
\\
 {} & {} & \frac{d}{d x}y \! \left(x \right)=0
\\
 \textrm{•} & {} & \textrm{Highest derivative means the order of the ODE is}1
\\
 {} & {} & \frac{d}{d x}y \! \left(x \right)
\\
 \textrm{•} & {} & \textrm{Integrate both sides with respect to}x  
\\
 {} & {} & \int \left(\frac{d}{d x}y \! \left(x \right)\right)d x =\int 0d x +\mathit{C1}  
\\
 \textrm{•} & {} & \textrm{Evaluate integral}
\\
 {} & {} & y \! \left(x \right)=\mathit{C1}  
\\
 \textrm{•} & {} & \textrm{Solve for}y \! \left(x \right)
\\
 {} & {} & y \! \left(x \right)=\mathit{C1}  
\end{array}

ode := diff(y(x), x, x, x ) + 3*diff(y(x), x, x) + 4*diff(y(x), x) + 2*y(x) = 0;
the_output:=Student:-ODEs:-ODESteps(ode,y(x)):
latex(the_output)

diff(diff(diff(y(x), x), x), x)+3*(diff(diff(y(x), x), x))+4*(diff(y(x), x))+2*y(x) = 0

Error, (in Typesetting:-Parse) too many levels of recursion

 

 

Download latex_error_ODE_steps_maple_2024_april_13_2024.mw

update: Reported to Maplesoft support.

This second order (Euler type) ode has no solution for the given two initial conditions. but Maple gives solution with one unresolved constant of integration.

ode:=x^2*diff(y(x),x$2)-2*y(x)=0;
ic:=y(0)=4,D(y)(0)=-1;

sol_no_IC:=dsolve(ode)

The IC's are given at x=0 as a trick to see what Maple will do. We see that at x=0 there is division by zero. So no solution exist for these IC's. But see what happens

sol_with_IC:=dsolve([ode,ic])

It seems Maple simply threw away the part of the solution it could not handle due to the x=0 and just returned the rest.

odetest(sol_with_IC,[ode,ic])

The correct answer should have been the NULL solution (i.e. no solution). 

What Am I missing here? Why does Maple do this? Should Maple have returned such a solution?

Maple 2024 on windows 10.

update:

Reported to Maplesoft support.

update:

Here is another example ode. This is first order ode. Maple gives a solution that does not satisfy the initial condition also. I wish I can understand how Maple comes up with these solutions since when I solve these by hand I see it is not possible to satisfy the IC, hence no solution exist.

14876

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1722 and is the same as the version installed in this computer, created 2024, April 12, 17:58 hours Pacific Time.`

restart;

14876

ode:=diff(y(x),x)+y(x)/x=x^2;
ic:=y(0)=a;

diff(y(x), x)+y(x)/x = x^2

y(0) = a

dsolve(ode)

y(x) = ((1/4)*x^4+c__1)/x

sol:=dsolve([ode,ic])

y(x) = (1/4)*x^3

odetest(sol,[ode,ic])

[0, a]

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

Error, (in Student:-ODEs:-applyICO1) numeric exception: division by zero

 

 

Download another_strange_solution_ode_maple_2024.mw

I do not know if this caused by same crash in Reproducible--Server-Crash-Kernel-Connection-Has-Been-Lost  or not.

Could someone be able to find out? It happens each time the code is run on windows 10. 

 

26028

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1715 and is the same as the version installed in this computer, created 2024, April 3, 20:27 hours Pacific Time.`

restart;

10168

u:=Int(2/3/alpha^(3/2)*sin(1/2*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2),alpha = 0 .. x)

Int((2/3)*sin((1/2)*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2)/alpha^(3/2), alpha = 0 .. x)

value(u);


Download another_server_crash_on_int_maple_2024_april_4_2024.mw

ps. reported to Maplesoft.

The above is new crash in Maple 2024. Below shows no crash in Maple 2023:

26028

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1715. The version installed in this computer is 1672 created 2024, February 7, 18:34 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

restart;

23104

u:=Int(2/3/alpha^(3/2)*sin(1/2*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2),alpha = 0 .. x)

Int((2/3)*sin((1/2)*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2)/alpha^(3/2), alpha = 0 .. x)

value(u);

int((2/3)*sin((1/2)*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2)/alpha^(3/2), alpha = 0 .. x)

 

 

Download int_on_maple_2023.mw

Update:

Here is a movie showing the crash. It also happens from the command line. All on windows 10.

My ini file has  nothing in it, other than one command which prints the process ID which I had there for over a year now.  This is after restarting Maple fresh and nothing else running other than this one worksheet.

 

Here is movie showing the crash from command line also. On windows 10 pro.

 

 

First 33 34 35 36 37 38 39 Last Page 35 of 199