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?

• 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. – Zibadawa Sep 15 '14 at 0:04
• The answer satisfies $u(x) = \left(u'(x)-\frac{1}{n+1}\right)^2$. – wxffles Sep 15 '14 at 3:34

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}]


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:

restart;
eq:=diff(u(t),t)=sqrt(u(t))+1/(n+1);
ic:=u(0)=0;
sol:=dsolve({eq,ic},u(t));


 DEtools[remove_RootOf](sol);
-2*u(t)^(1/2)*n+t*n+2*arctanh((n+1)*u(t)^(1/2))-2*u(t)^(1/2)+
ln(-u(t)*n^2-2*u(t)*n-u(t)+1)+t = 0


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


You might want to report this to support@wolfram.com. 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.

• How does it solve the problem? – Artes Sep 15 '14 at 8:39