To verify solution returned by DSolve, one can use the method shown in howto/CheckTheResultsOfDSolve.html and look for True (may be after a Simplify

enter image description here

But how to verify the solution from AsymptoticDSolveValue? Trying to do something similar to the above will not work, since simple substitution would not work because the solution is now a truncated series and so one will not get an exact zero on the left side.

ode = x^2*(-x^2 + 2)*y''[x] - x*(4*x^2 + 3)*y'[x] + (-2*x^2 + 2)*y[x] == 0;
sol = AsymptoticDSolveValue[ode, y[x], {x, 0, 8}]

Mathematica graphics

And now

sol2 = y -> Function[{x}, Evaluate[sol]]

enter image description here

And now

 Simplify[ode /. sol2]

Does not give True (understandably) , it gives

Mathematica graphics

I think Mathematica needs a specialized function for verification of solution of DSolve and AsymptoticDSolveValue. Maple has such a function called odetest which works for standard solution and series solution

ode:=x^2*(-x^2+2)*diff(diff(y(x),x),x)-x*(4*x^2+3)*diff(y(x),x)+(-2*x^2+2)*y(x) = 0;

enter image description here

To verify the above, one can do


And look for zero as result. If the result is not zero, then it did not verify the solution.

Is there something in Mathematica that can be used to verify result of AsymptoticDSolveValue? For example, one can obtain a series solution in some other way, and want to use Mathematica to verify this solution against the ODE. How to do this?

V 12.3.1


1 Answer 1


Perhaps Asymptotic helps:

Asymptotic[ode /. sol2,x->0]
(* True*)
  • $\begingroup$ Thanks. I did not know about the function Asymptotic. $\endgroup$
    – Nasser
    Commented Oct 11, 2021 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.