nm

11483 Reputation

20 Badges

13 years, 82 days

MaplePrimes Activity


These are questions asked by nm

Any one could find why dsolve can't solve this first order ode when adding IC,  but Student:-ODEs:-ODESteps can?

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1878 and is the same as the version installed in this computer, created 2025, September 28, 11:35 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

restart;

ode:=diff(m(t),t) = -k/m(t)^2;
ic:=m(0) = m__0;
DEtools:-odeadvisor(ode);

diff(m(t), t) = -k/m(t)^2

m(0) = m__0

[_quadrature]

sol:=dsolve(ode)

m(t) = (-3*k*t+c__1)^(1/3), m(t) = -(1/2)*(-3*k*t+c__1)^(1/3)-((1/2)*I)*3^(1/2)*(-3*k*t+c__1)^(1/3), m(t) = -(1/2)*(-3*k*t+c__1)^(1/3)+((1/2)*I)*3^(1/2)*(-3*k*t+c__1)^(1/3)

sol:=dsolve([ode,ic])

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

"[[,,"Let's solve"],[,,[(ⅆ)/(ⅆt) m(t)=-k/((m(t))^2),m(0)=`m__0`]],["•",,"Highest derivative means the order of the ODE is" 1],[,,(ⅆ)/(ⅆt) m(t)],["•",,"Solve for the highest derivative"],[,,(ⅆ)/(ⅆt) m(t)=-k/((m(t))^2)],["•",,"Separate variables"],[,,((ⅆ)/(ⅆt) m(t)) (m(t))^2=-k],["•",,"Integrate both sides with respect to" t],[,,∫((ⅆ)/(ⅆt) m(t)) (m(t))^2 ⅆt=∫-k ⅆt+`c__1`],["•",,"Evaluate integral"],[,,((m(t))^3)/3=-k t+`c__1`],["•",,"Solve for" m(t)],[,,{m(t)=(-3 k t+3 `c__1`)^(1/3),m(t)=-((-3 k t+3 `c__1`)^(1/3))/2-(ⅈ sqrt(3) (-3 k t+3 `c__1`)^(1/3))/2,m(t)=-((-3 k t+3 `c__1`)^(1/3))/2+(ⅈ sqrt(3) (-3 k t+3 `c__1`)^(1/3))/2}],["•",,"Simplify"],[,,{m(t)=(-3 k t+3 `c__1`)^(1/3),m(t)=((-3 k t+3 `c__1`)^(1/3) (-1+ⅈ sqrt(3)))/2,m(t)=-((-3 k t+3 `c__1`)^(1/3) (1+ⅈ sqrt(3)))/2}],["•",,"Redefine the integration constant(s)"],[,,{m(t)=(-3 k t+`c__1`)^(1/3),m(t)=((-3 k t+`c__1`)^(1/3) (-1+ⅈ sqrt(3)))/2,m(t)=-((-3 k t+`c__1`)^(1/3) (1+ⅈ sqrt(3)))/2}],["•",,"Use initial condition" m(0)=`m__0`],[,,`m__0`=`c__1`^(1/3)],["•",,"Solve for" `c__1`],[,,`c__1`=`m__0`^3],["•",,"Substitute" `c__1`=`m__0`^3 "into general solution and simplify"],[,,m(t)=(`m__0`^3-3 k t)^(1/3)],["•",,"Use initial condition" m(0)=`m__0`],[,,`m__0`=(`c__1`^(1/3) (-1+ⅈ sqrt(3)))/2],["•",,"Solve for" `c__1`],[,,`c__1`=`m__0`^3],["•",,"Substitute" `c__1`=`m__0`^3 "into general solution and simplify"],[,,m(t)=((`m__0`^3-3 k t)^(1/3) (-1+ⅈ sqrt(3)))/2],["•",,"Use initial condition" m(0)=`m__0`],[,,`m__0`=-(`c__1`^(1/3) (1+ⅈ sqrt(3)))/2],["•",,"Solve for" `c__1`],[,,`c__1`=`m__0`^3],["•",,"Substitute" `c__1`=`m__0`^3 "into general solution and simplify"],[,,m(t)=-((`m__0`^3-3 k t)^(1/3) (1+ⅈ sqrt(3)))/2],["•",,"Solutions to the IVP"],[,,[m(t)=(`m__0`^3-3 k t)^(1/3),m(t)=((`m__0`^3-3 k t)^(1/3) (-1+ⅈ sqrt(3)))/2,m(t)=-((`m__0`^3-3 k t)^(1/3) (1+ⅈ sqrt(3)))/2]]]"

Download why_dsolve_cant_solve_ode_oct_4_2025_maple_2025_1.mw

Given an ode with IC. When solution is explicit, Maple resolves the constant of integration as expected and returns solution with no c__1 in it.

But when asked for implicit solution, also with same IC, it now returns solution with c__1 still there.

Is this by design or a bug? Should not constant of integration be resolved using IC in both cases? If unable to solve for c__1 because solution is implicit, should it then not return solution all?

Does this happen in earlier versions of Maple?

 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1878 and is the same as the version installed in this computer, created 2025, September 28, 11:35 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

restart;

IC:=D(y)(0)=0;
ode:=diff(y(x),x)^2+x*y(x)=0:
sol:=dsolve([ode,IC]);

 

(D(y))(0) = 0

y(x) = 0, y(x) = -(1/9)*x^3

sol:=dsolve(ode,'implicit');

y(x) = 0, -x^2/((x^3+9*y(x))*(x^2+3*(-x*y(x))^(1/2)))+3*(-x*y(x))^(1/2)/((x^3+9*y(x))*(x^2+3*(-x*y(x))^(1/2)))-c__1 = 0, x^2/((x^3+9*y(x))*(-x^2+3*(-x*y(x))^(1/2)))+3*(-x*y(x))^(1/2)/((x^3+9*y(x))*(-x^2+3*(-x*y(x))^(1/2)))-c__1 = 0

#WHY did not resolve constant of integration here??
sol:=dsolve([ode,IC],'implicit');

x^2/((x^3+9*y(x))*(-x^2+3*(-x*y(x))^(1/2)))+3*(-x*y(x))^(1/2)/((x^3+9*y(x))*(-x^2+3*(-x*y(x))^(1/2)))-c__1 = 0, -x^2/((x^3+9*y(x))*(x^2+3*(-x*y(x))^(1/2)))+3*(-x*y(x))^(1/2)/((x^3+9*y(x))*(x^2+3*(-x*y(x))^(1/2)))-c__1 = 0, y(x) = 0

 


 

Download why_C_still_in_solution_maple_2025_1_oct_4_2025.mw

I looked at help for PDEtools:-Solve and do not see why this would fail. Any idea? Is this by design or could it be a bug?  solve() works on same input, so I expected Solve to also work on same input.

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1878 and is the same as the version installed in this computer, created 2025, September 28, 11:35 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

restart;

eq:=D(y)(0)+1 = 0;
solve(eq,D(y)(0));

(D(y))(0)+1 = 0

-1

PDEtools:-Solve(eq,D(y)(0));

Error, (in PDEtools:-Solve) required an indication of the solving variables for the given system

 

 

Download why_PDEtools_Sovle_fail_oct_3_2025.mw

For some reason, solve() works Ok, but PDEtools:-Solve causes kernel crash.

 

Attached worksheet.

Anyone knows why and can someone try to reproduce this? I am using Linux CaucyOS (arch linux based) and Maple 2025.1

 

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1878 and is the same as the version installed in this computer, created 2025, September 28, 11:35 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

restart;

eq:=[-3/2*_C6^2+4*(60588*_C6^3+6659802*_C6^2-7113718800*_C6+168667884119)/(40392*_C6-971364)-1/8*(-6*_C6+1)^2-4*(1406664*_C6^2-1186536946*_C6+27728821045)/(26928*_C6-647576)+5*_C6-125/6+9*(-1/24*(-6*_C6+16)^2-4*(1406664*_C6^2-1186536946*_C6+27728821045)/(26928*_C6-647576)+(60588*_C6^3+6659802*_C6^2-7113718800*_C6+168667884119)/(40392*_C6-971364))*(-49/2+_C6) = 4, -1/24*(-6*_C6+49)^2+191*(1406664*_C6^2-1186536946*_C6+27728821045)/(26928*_C6-647576)-(60588*_C6^3+6659802*_C6^2-7113718800*_C6+168667884119)/(40392*_C6-971364)+1/12*(-6*_C6+9801)^2 = 0];
Cs:={_C6};

[-(3/2)*_C6^2+4*(60588*_C6^3+6659802*_C6^2-7113718800*_C6+168667884119)/(40392*_C6-971364)-(1/8)*(-6*_C6+1)^2-4*(1406664*_C6^2-1186536946*_C6+27728821045)/(26928*_C6-647576)+5*_C6-125/6+9*(-(1/24)*(-6*_C6+16)^2-4*(1406664*_C6^2-1186536946*_C6+27728821045)/(26928*_C6-647576)+(60588*_C6^3+6659802*_C6^2-7113718800*_C6+168667884119)/(40392*_C6-971364))*(-49/2+_C6) = 4, -(1/24)*(-6*_C6+49)^2+191*(1406664*_C6^2-1186536946*_C6+27728821045)/(26928*_C6-647576)-(60588*_C6^3+6659802*_C6^2-7113718800*_C6+168667884119)/(40392*_C6-971364)+(1/12)*(-6*_C6+9801)^2 = 0]

{_C6}

solve(eq,Cs);

{_C6 = _C6}

PDEtools:-Solve(eq,Cs);


 

Download maple_crash_Solve_oct_3_2025.mw

Also reported to Maplesoft support.

 

I found very strange behaviour of Maple 2025.1 on Linux.

Same exact code.  Calling timelimit(sol,ode) twice on two different solutions. If I do not add 

         Physics:-Setup(assumingusesAssume = true)

At the start, then both timelimits finish OK. But once  Physics:-Setup(assumingusesAssume = true) is added at the start, the second timelimit hangs.

I waited 2 hrs and nothing happens. Maple just freezes. Can't even stop the server from worksheet by clicking on the red button at lower left corner. 

This is using latest Physics.  Does anyone know why this happens? It seems due to some memory cache issue?

Make sure to save all your work before trying this just in case you have to kill Maple application.

The strange thing, unable to stop the server by clicking on red button or clicking on RESTART KERNEL icon at top, or even clicking on the debuger icon at lower left corner. Only way was to kill Maple itself from Linux command line.

interface(version);

`Standard Worksheet Interface, Maple 2025.1, Linux, June 12 2025 Build ID 1932578`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1878 and is the same as the version installed in this computer, created 2025, September 28, 11:35 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 29 and is the same as the version installed in this computer, created June 23, 2025, 10:25 hours Eastern Time.`

restart;

Example 1. Not using Physics:-Setup(assumingusesAssume = true): gives NO hang

 

sol_1:=y(x) = 1/2*(3*tan(RootOf(2*3^(1/2)*ln(2*3^(1/6)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*
sec(_Z)^2-8*3^(1/2))^(1/3))-3^(1/2)*ln(4*3^(1/3)-2*3^(1/6)*(9*tan(_Z)*sec(_Z)^2
+9*3^(1/2)*sec(_Z)^2-8*3^(1/2))^(1/3)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-\
8*3^(1/2))^(2/3))+12*_C2*3^(1/2)+12*3^(1/2)*x+36*I*_C2+36*I*x+6*_Z))^3*3^(1/2)+
9*tan(RootOf(2*3^(1/2)*ln(2*3^(1/6)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-8*
3^(1/2))^(1/3))-3^(1/2)*ln(4*3^(1/3)-2*3^(1/6)*(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*
sec(_Z)^2-8*3^(1/2))^(1/3)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-8*3^(1/2))^
(2/3))+12*_C2*3^(1/2)+12*3^(1/2)*x+36*I*_C2+36*I*x+6*_Z))^2+3*3^(1/2)*tan(
RootOf(2*3^(1/2)*ln((3*3^(1/2)*tan(_Z)*sec(_Z)^2-8+9*sec(_Z)^2)^(1/3)+2)-3^(1/2
)*ln((3*3^(1/2)*tan(_Z)*sec(_Z)^2-8+9*sec(_Z)^2)^(2/3)-2*(3*3^(1/2)*tan(_Z)*sec
(_Z)^2-8+9*sec(_Z)^2)^(1/3)+4)+36*I*_C2+36*I*x+12*_C2*3^(1/2)+12*3^(1/2)*x+6*_Z
))+1)^(1/3)*(I*3^(1/2)-1):
ode:=diff(y(x),x)-y(x)^3 = 8:
timelimit(30,odetest(sol_1,ode));

Error, (in simplify/ln/relations) time expired

 

sol_2:=y(x) = -1/2*(3*tan(RootOf(2*3^(1/2)*ln(2*3^(1/6)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)
*sec(_Z)^2-8*3^(1/2))^(1/3))-3^(1/2)*ln(4*3^(1/3)-2*3^(1/6)*(9*tan(_Z)*sec(_Z)^
2+9*3^(1/2)*sec(_Z)^2-8*3^(1/2))^(1/3)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2
-8*3^(1/2))^(2/3))+12*_C3*3^(1/2)+12*3^(1/2)*x-36*I*_C3-36*I*x+6*_Z))^3*3^(1/2)
+9*tan(RootOf(2*3^(1/2)*ln(2*3^(1/6)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-8
*3^(1/2))^(1/3))-3^(1/2)*ln(4*3^(1/3)-2*3^(1/6)*(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*
sec(_Z)^2-8*3^(1/2))^(1/3)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-8*3^(1/2))^
(2/3))+12*_C3*3^(1/2)+12*3^(1/2)*x-36*I*_C3-36*I*x+6*_Z))^2+3*3^(1/2)*tan(
RootOf(2*3^(1/2)*ln((3*3^(1/2)*tan(_Z)*sec(_Z)^2-8+9*sec(_Z)^2)^(1/3)+2)-3^(1/2
)*ln((3*3^(1/2)*tan(_Z)*sec(_Z)^2-8+9*sec(_Z)^2)^(2/3)-2*(3*3^(1/2)*tan(_Z)*sec
(_Z)^2-8+9*sec(_Z)^2)^(1/3)+4)-36*I*_C3-36*I*x+12*_C3*3^(1/2)+12*3^(1/2)*x+6*_Z
))+1)^(1/3)*(1+I*3^(1/2)):
timelimit(30,odetest(sol_2,ode));

Error, (in collect) time expired

 

Example 2. using Physics:-Setup(assumingusesAssume = true): second timelimit always hangs

 

restart;

Physics:-Setup(assumingusesAssume = true):

sol_1:=y(x) = 1/2*(3*tan(RootOf(2*3^(1/2)*ln(2*3^(1/6)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*
sec(_Z)^2-8*3^(1/2))^(1/3))-3^(1/2)*ln(4*3^(1/3)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_Z)^2+9*3^(1/2)*sec(_Z)^2
-8*3^(1/2))^(2/3))+12*_C3*3^(1/2)+12*3^(1/2)*x-36*I*_C3-36*I*x+6*_Z))^3*3^(1/2)
+9*tan(RootOf(2*3^(1/2)*ln(2*3^(1/6)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-8
*3^(1/2))^(1/3))-3^(1/2)*ln(4*3^(1/3)-2*3^(1/6)*(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*
sec(_Z)^2-8*3^(1/2))^(1/3)+(9*tan(_Z)*sec(_Z)^2+9*3^(1/2)*sec(_Z)^2-8*3^(1/2))^
(2/3))+12*_C3*3^(1/2)+12*3^(1/2)*x-36*I*_C3-36*I*x+6*_Z))^2+3*3^(1/2)*tan(
RootOf(2*3^(1/2)*ln((3*3^(1/2)*tan(_Z)*sec(_Z)^2-8+9*sec(_Z)^2)^(1/3)+2)-3^(1/2
)*ln((3*3^(1/2)*tan(_Z)*sec(_Z)^2-8+9*sec(_Z)^2)^(2/3)-2*(3*3^(1/2)*tan(_Z)*sec
(_Z)^2-8+9*sec(_Z)^2)^(1/3)+4)-36*I*_C3-36*I*x+12*_C3*3^(1/2)+12*3^(1/2)*x+6*_Z
))+1)^(1/3)*(1+I*3^(1/2)):
timelimit(30,odetest(sol_2,ode));


Download hangs_timelimit_with_physics_maple_2025_1_oct_2_2025.mw

Could someone try to reproduce this on their Maple? If so, I will send bug report.

1 2 3 4 5 6 7 Last Page 1 of 202