Question: odetest does not validate correct solution for first order ode

I think I found another clitch in odetest.

dsolve gives correct solution to this first order ode with IC. But odetest does not verify that the solution is satisfied for the IC part, but only for the ode itself. 

Below worksheet confirms the solution is also valid for the IC.   So why odetest does not give 0 for the IC part?

``

restart;

19644

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 1727. The version installed in this computer is 1725 created 2024, April 15, 17:29 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

libname;

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

ode:=x^2*diff(y(x),x)*cos(y(x))+1=0;
ic:=y(infinity)=Pi/3; #16/3*Pi;
sol:=dsolve([ode,ic]);
odetest(sol,[ode,ic])

x^2*(diff(y(x), x))*cos(y(x))+1 = 0

y(infinity) = (1/3)*Pi

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

[0, (1/3)*Pi]

#we see that odetest think the solution does not verify the IC. But it does

IC_eq:=Pi/3=limit(rhs(sol),x=infinity)

(1/3)*Pi = (1/3)*Pi

Download odetest_does_not_verfiy_correct_solution_maple_2024_april_18_2024.mw

I think what odetest did is not use limit when plugging in the values. That is why.

If we do not use limit, this is what happens:

IC_eq:=Pi/3=eval(rhs(sol),x=infinity)

And this explains the odetest output. It should have used limit.

ps. just in case also reported to Maplesoft support.

Please Wait...