Given an ordinary differential equation with initial conditions

eq = u a[u] + (16 + u^2 + 2 u a[u] (12 + u a[u] (6 + u a[u]))) a'[u] == 0
ic = a[0] == -1/2

How can I analytically verify that

sol = a[u]^2 (2 + a[u] u)^2 == 1 + a[u] u

represents its implicit solution? Please, avoid numerical demonstrations. Assume also that DSolve cannot solve the given equation. I am explicitly interested in algebraic demonstration that would work in more complicated cases.

  • $\begingroup$ Did you try implicitly differentiating the solution to find a’[u] and substituting that into the equation? $\endgroup$
    – Ghoster
    Commented Jan 15 at 21:01
  • 1
    $\begingroup$ @Ghoster Clever! Why didn't you post an answer? $\endgroup$ Commented Jan 15 at 22:08

1 Answer 1


You can't plugin in the implicit solution as is, need to first solve for a[u] from it. This gives 3 solutions. Then verify each one, one by one.

Maple can verify implicit solutions directly, without first solving for each solution. But Mathematica as far as I know, can't as of now.

eq = u  a[u] + (16 + u^2 + 2  u  a[u]  (12 + u  a[u]  (6 + u  a[u])))  a'[u] == 0
ic = a[0] == -1/2
sol = a[u]^2  (2 + a[u]  u)^2 == 1 + a[u]  u
trialSol = a -> Function[{u}, Evaluate[First@explicit]]
eq /. trialSol // FullSimplify

Mathematica graphics

But this solution did not verify the IC

ic /. trialSol // FullSimplify


Mathematica graphics

Do the same for the result of the solutions, like this

Mathematica graphics

Verified in Maple that your solution verifies the ode and the IC, using odetest directly. So need to work more on figuring out why Mathematica does not verify the IC. Looks like a limit issue,

eq := u*a(u)+(16 + u^2 + 2*u*a(u)*(12 + u*a(u)*(6 + u*a(u))))*diff(a(u),u)=0;
ic := a(0) = -1/2;
sol := a(u)^2*(2 + a(u)*u)^2 = 1 + a(u)*u;

Gives [0,0] which means both the solution and IC was verified correct.

enter image description here

It will be useful if Mathematica had odetest function which is built-in to make it easier to verify the solutions of an ode.

Notice also that Mathematica DSolve has no option to return an implicit solution. It tries to always return an explicit solution. It will also be good to have such an option in future versions of DSolve



  • $\begingroup$ Indeed, would be good if MA had this functionality. It seems to be a pure algebraic problem. I tried to handle it with Eliminate and PolynomialReduce, but somehow stuck. The problem with your solution is that it generates multiple branches and one needs to verify one by one. Out of curiosity, is Maple able to return this implicit solution? $\endgroup$
    – yarchik
    Commented Jan 15 at 22:33
  • $\begingroup$ and one needs to verify one by one. Yes. This is the limitation of using Function method to verify solution. This is the method that Mathematica help pages recommend to use to verify ode solution (added link above). Otherwise, you'd have to do it the hard way, i.e. plugin in the dependent variable and all its derivatives into the ode and simplify. $\endgroup$
    – Nasser
    Commented Jan 15 at 22:51
  • $\begingroup$ Out of curiosity, is Maple able to return this implicit solution? Maple returns 3 solutions. One of them implicit, It is written different, using $\ln$ but it looks like it could be simplified to the one you showed. I did not try. Need to raise both sides to exp and simplify. !Mathematica graphics Here it is in plain text -1/2*ln(4*a(u)^2*u^2+16*u*a(u)+u^2+16)+ln(2+u*a(u))-ln(a(u))+Pi*I = 0 $\endgroup$
    – Nasser
    Commented Jan 15 at 22:54
  • $\begingroup$ Thank you, very useful. I will wait a day or two before accepting your solution as I still have hope that someone will propose how to emulate Maple's odetest function for implicit polynomial solutions and how to test the initial conditions. $\endgroup$
    – yarchik
    Commented Jan 16 at 8:56

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.