I'm trying to solve the following ODE asymptotically.

$$y(x)^2 y'(x)^2-\left(\sqrt{2} x\right)^2 y'(x)^2+y(x)^2=0$$


AsymptoticDSolveValue[{y[x]^2*y'[x]^2 + y[x]^2 - ( x*Sqrt[2])^2*y'[x]^2 == 0},
                      y[x], {x, 0, 10}]

I get some complex valued stuff

 -I x - (138 x^10)/(25 C[1]^9) + (857 I x^9)/(3240 C[1]^8) - (73 x^8)/(
 40 C[1]^7) + (3 I x^7)/(2 C[1]^6) + (4 x^6)/(9 C[1]^5) + (3 I x^5)/(
 10 C[1]^4) + x^4/(2 C[1]^3) - (I x^3)/(3 C[1]^2) + C[1]

However, one can easily check, that $y(x)=x$ solves the equation above. I also get the error message AsymptoticDSolveValue::asdb:


My question is:

How do I get all the branches of the solution from AsymptoticDSolveValue[], or if that is impossible, how do I impose that the desired solution is real?

EDIT: The answer by Nasser adresses part of my question, however it doesn't provide an explanation on whether or not it is possible to obtain multiple branches from AsymptoticDSolveValue[]


1 Answer 1


DSolve does not find $y(x)=x$ either, and I think this is why AsymptoticDSolveValue does not. I am sure they share some core code internally.

DSolve returns general solutions, but they are implicit. But it does not find $y=x$

Mathematica graphics

btw, Maple does finds $y=x$, and if you use its option singsol=all it will also return $y=0$ solution (singular solution).

It would be nice if DSolve could have an explicit option to return singular solutions to ode's (if they exist), in addition to the general solution.


Mathematica graphics

May be you could send a report on this to WRI support asking why $y=x$ was missed. You can include

ClearAll[y, x];
ode = y[x]^2*y'[x]^2 + y[x]^2 - (x*Sqrt[2])^2*y'[x]^2 == 0;
ode /. y -> Function[{x}, x]

Mathematica graphics

  • $\begingroup$ This particular ODE is really difficult to analyse with Mathematica. In general I am aiming to solve for a general form, where $\sqrt{2}x$ is replaced with some $r(x)$. Even though I managed to obtain some exact, real solutions for various $r(x)$, Mathematica almost always spits out only complex valued functions for both DSolve and AsymptoticDSolveValue. Thanks, for the Maple output, I will see what I can do with that programme. $\endgroup$ May 11, 2020 at 2:46
  • $\begingroup$ Also, can you impose only real solutions in DSolve? $\endgroup$ May 11, 2020 at 3:12
  • 3
    $\begingroup$ @MichałKuczynski can you impose only real solutions in DSolve, No. Not that I know about. DSolve returns the solutions it find, then one can filter out real or complex after that if they want. $\endgroup$
    – Nasser
    May 11, 2020 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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