I was trying to solve the initial value problem $$u'(t) = \sqrt{u(t)} + \frac{1}{n+1}, \, u(0) = 0$$ using DSolve:

DSolve[{u'[t] == Sqrt[u[t]] + 1/(n + 1), u[0] == 0}, u, t]

The output for this command in Mathematica 9 is:

{{u -> Function[{t}, 
         (1 + ProductLog[-E^(-(1/(1 + n)) - n/(1 + n) - t/2 - (n t)/2)])^2/(1 + n)^2]}}

Although the returned $u(t)$ satisfies the initial condition $u(0)=0$, it doesn't satisfy the differential equation. What went wrong?

  • 3
    $\begingroup$ The very first thing I think when I see that square root is "you have underestimated the power of mathematica." It will try to solve in full generality unless you give it commands not to, so possibly your acquired answer is trying to account for the branches of the sqrt. I don't have access to mathematica right now to verify this thought, but try rewriting the equation without the square root, or using Assumptions to restrict the branch. $\endgroup$
    – Zibadawa
    Sep 15, 2014 at 0:04
  • 3
    $\begingroup$ The answer satisfies $u(x) = \left(u'(x)-\frac{1}{n+1}\right)^2$. $\endgroup$
    – wxffles
    Sep 15, 2014 at 3:34

3 Answers 3


The problem is that the solution takes the other branch of the square root. Look at this:

f = u[t] /. 
  First@DSolve[{u'[t] == Sqrt[u[t]] + 1/(n + 1), u[0] == 0}, u[t], t]
fp = D[f, t]
Plot[Evaluate[{fp, Sqrt[f] + 1/(n + 1)} /. n -> 3], {t, 0, 1}]

enter image description here

Note that Mathematica warns you that some solutions may not be found.


I could not verify the solution given by M either. Maple solved this and verifies the solution. But the solution is given as implicit. Here is the solution fyi in case it might help see what is the problem:


Mathematica graphics

      ln(-u(t)*n^2-2*u(t)*n-u(t)+1)+t = 0

Mathematica graphics

odetest(%,eq); #verifies the solution
         (* 0 *)

You might want to report this to [email protected]. It might be that M tried to solve the implicit solution, and that where the problem is. Notice the warning messages on the console:

Inverse functions are being used by Solve, so some solutions 
may not be found; use Reduce for complete solution information

While working with NDSolve whenever I see a square root of first order I get rid of it immediately by squaring and raising the order or power of ODE... as a Rule. It could be beneficial with DSolve also.

Better to raise the power or order of ODE rather than bring in the power of Mathematica into an otherwise easily doable reconfiguration.

c= 1/(1+n) ; u'[t] = Sqrt[u[t]] + c 

Squaring,differentiating and simplifying we get:

2 u''[t] = (1 + c/ Sqrt[u[t]])

Now eliminate Sqrt[u], throwing out all double sign problems to get a neat second

order ODE.

DSolve[{2 u''[t] == u'[t]/(u'[t]-c) , u'[0]== c, u[0]== 0}, u,t]

It may require Reduce due to inverse functions.Also it provides a handle on new

initial u'[0] variations as bonus for wider understanding of your phenomenon.

EDIT: We can take it further into analytic form based on new derivative u'[t]= y[t]:

y'[t]== y[t]/(y[t]-c)

DSolve[{2 y'[t] == y[t]/(y[t] - c)}, y, t]

{{y -> Function[{t}, -c ProductLog[-(E^(-(t/(2 c)) + C[1]/c)/c)]]}}  

whose integral you are looking for after incorporating initial value.

If closed form is not possible, a full numerical can be taken as a recourse.

  • 2
    $\begingroup$ How does it solve the problem? $\endgroup$
    – Artes
    Sep 15, 2014 at 8:39

Your Answer

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

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