Question: Maple hangs on dsolve on first order exact ode when adding general I.C.

Does this also hang in earlier versions of Maple?

In Maple 2024.1, when adding general   IC such as  y(x0)=y0, then dsolve hangs. 

This is first order ode of type exact. Maple sees that, enters exact solver and never comes back.

Removing the IC, it works and gives correct solution. Also changing the IC to specific one, such as y(0)=1 it works. Only when making the IC general, it hangs.

Any idea why it hangs when adding IC and where it hangs? I waited for 10-15 minutes and tried few times. Server.exe is running at full CPU all the time. looks like it went into an infinite loop. 
 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1789 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

ode:=diff(y(x),x)= sqrt( (x^2-1)*(y(x)^2-1))/(x^2-1);

diff(y(x), x) = ((x^2-1)*(y(x)^2-1))^(1/2)/(x^2-1)

IC:=y(x0)=y0;

y(x0) = y0

infolevel[dsolve]:=5;

5

dsolve(ode,[exact])

Classification methods on request

Methods to be used are: [exact]

----------------------------

* Tackling ODE using method: exact

--- Trying classification methods ---

trying exact

<- exact successful

((y(x)-1)*(y(x)+1))^(1/2)*ln(y(x)+(y(x)^2-1)^(1/2))/((y(x)-1)^(1/2)*(y(x)+1)^(1/2))+Intat(-((_a^2-1)*(y(x)^2-1))^(1/2)/((_a^2-1)*(y(x)-1)^(1/2)*(y(x)+1)^(1/2)), _a = x)+c__1 = 0

dsolve([ode,IC],[exact]); #this hangs

Classification methods on request

Methods to be used are: [exact]

----------------------------

* Tackling ODE using method: exact

--- Trying classification methods ---

trying exact

<- exact successful

dsolve([ode,IC]); #this hangs

 -> Computing symmetries using: way = 3

Methods for first order ODEs:

--- Trying classification methods ---

trying homogeneous types:

differential order: 1; looking for linear symmetries

trying exact

<- exact successful

 


 

Download maple_hangs_on_first_order_ode.mw

Update

If we solve the ODE first with no IC, and then manually solve for C and plug this back into the Maple solution then it works and Maple odetest verifies the solution. So no need for assuming x0>1 ?

restart;

ode:=diff(y(x),x)= sqrt( (x^2-1)*(y(x)^2-1))/(x^2-1);

diff(y(x), x) = ((x^2-1)*(y(x)^2-1))^(1/2)/(x^2-1)

IC:=y(x__0)=y__0;

y(x__0) = y__0

#solve for C directly

maple_sol_no_IC:=dsolve(ode,[exact]);
eq:=eval(maple_sol_no_IC,[y(x)=y__0,x=x__0]);
sol_C:=solve(eq,_C1);

((y(x)-1)*(y(x)+1))^(1/2)*ln(y(x)+(y(x)^2-1)^(1/2))/((y(x)-1)^(1/2)*(y(x)+1)^(1/2))+Intat(-((_a^2-1)*(y(x)^2-1))^(1/2)/((_a^2-1)*(y(x)-1)^(1/2)*(y(x)+1)^(1/2)), _a = x)+c__1 = 0

((y__0-1)*(y__0+1))^(1/2)*ln(y__0+(y__0^2-1)^(1/2))/((y__0-1)^(1/2)*(y__0+1)^(1/2))+Intat(-((_a^2-1)*(y__0^2-1))^(1/2)/((_a^2-1)*(y__0-1)^(1/2)*(y__0+1)^(1/2)), _a = x__0)+c__1 = 0

-(Intat(-((_a^2-1)*(y__0^2-1))^(1/2)/((_a^2-1)*(y__0-1)^(1/2)*(y__0+1)^(1/2)), _a = x__0)*(y__0-1)^(1/2)*(y__0+1)^(1/2)+((y__0-1)*(y__0+1))^(1/2)*ln(y__0+(y__0^2-1)^(1/2)))/((y__0-1)^(1/2)*(y__0+1)^(1/2))

new_sol:=simplify(eval(maple_sol_no_IC,_C1=sol_C));

(y(x)^2-1)^(1/2)*ln(y(x)+(y(x)^2-1)^(1/2))/((y(x)-1)^(1/2)*(y(x)+1)^(1/2))-Intat(((_a^2-1)*(y(x)^2-1))^(1/2)/(_a^2-1), _a = x)/((y(x)-1)^(1/2)*(y(x)+1)^(1/2))+(-(y__0^2-1)^(1/2)*ln(y__0+(y__0^2-1)^(1/2))+Intat(((_a^2-1)*(y__0^2-1))^(1/2)/(_a^2-1), _a = x__0))/((y__0-1)^(1/2)*(y__0+1)^(1/2)) = 0

odetest(new_sol,[ode,IC])

[0, 0]

 


 

Download maple_hangs_on_first_order_ode_V2.mw

Please Wait...