Question: why Maple hangs on dsolve on this first order ode?

Maple dsolve hangs (mserver.exe runs with high CPU for long time, had to stop it). 

This question is, why does it hang? As this can indicate internal logic bug.

This question is not why Maple can't solve this ode (taken from old textbook) as not solving an ode is not a bug (even though it should, as Maple is very good in solving ode's) but hanging is a bug.

infolvel shows it hangs when it reaches

<- Abel successful
         equivalence to an Abel ODE successful, Abel ODE has been solved

And stops here. 

Here is worksheet, showing the attempts made, and verifying book solution is correct using Maple with change of variable.

Make sure to save all your work before trying this just to be safe.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

original_ode :=(diff(y(x),x)*x-y(x))*(x-diff(y(x),x)*y(x))=2*diff(y(x),x);

((diff(y(x), x))*x-y(x))*(x-(diff(y(x), x))*y(x)) = 2*(diff(y(x), x))

#infolevel[dsolve]:=5;
dsolve(original_ode); #hangs

restart;

original_ode :=(diff(y(x),x)*x-y(x))*(x-diff(y(x),x)*y(x))=2*diff(y(x),x);
dsolve(original_ode,'implicit'); #hangs

restart;  #ONE SOLUTION IS:

original_ode:=(diff(y(x),x)*x-y(x))*(x-diff(y(x),x)*y(x))=2*diff(y(x),x);
book_sol:=y(x)=sqrt(x^2*c__1+2*c__1/(c__1-1));
odetest(book_sol,original_ode)

((diff(y(x), x))*x-y(x))*(x-(diff(y(x), x))*y(x)) = 2*(diff(y(x), x))

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

0

workaround to solve, by change of variables

 

restart;

original_ode :=(diff(y(x),x)*x-y(x))*(x-diff(y(x),x)*y(x))=2*diff(y(x),x);
ode2:=PDEtools:-dchange({x=sqrt(u),y(x)=sqrt(v(u))},original_ode,[v(u),u]):
sol:=dsolve(ode2):
sol:=map(X->eval(X,[v(u)=y(x)^2,u=x^2]),[sol]);
map(X->odetest(X,original_ode),sol)

((diff(y(x), x))*x-y(x))*(x-(diff(y(x), x))*y(x)) = 2*(diff(y(x), x))

[y(x)^2 = x^2+2-2*2^(1/2)*(x^2)^(1/2), y(x)^2 = x^2+2+2*2^(1/2)*(x^2)^(1/2), y(x)^2 = c__1*x^2+2*c__1/(c__1-1)]

[0, 0, 0]

 


 

Download why_dsolve_hangs_jan_17_2025.mw

 

Please Wait...