# Result interpretation of a general solution of a nonlinear differential equation

My goal is to find the general solution of the following nonlinear differential equation:

$$x'(t) = e^{-t} - \sqrt{x(t)}$$

Following this guide, I've entered in the Wolfram Mathematica the following input:

DSolve[{x'[t] == e^(-t) - sqrt(x[t])}, x[t], t]


and it printed me out this

{{x[t]->\[ExponentialE]^(-sqrt t) C+e^(-t)/(sqrt-Log[e])}}


that I've interpreted as $$x(t) = c_1e^{-\sqrt{x}} + \frac{e^{-t}}{\sqrt{\log{e}}}$$

I've tried to calculate the derivative of the output x[t] but it seems different from the initial one. In particular, I don't get why I got $\sqrt{-\log{e}} = i$ as denominator.

What am I missing?

EDIT

I fixed the input code in

DSolve[{x'[t] == \[ExponentialE]^(-t)-Sqrt[x[t]]},x[t],t]


and I got the following warning

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

Actually, I don't know how to translate my DSolve command in a Reduce command.

• Your DSolve contains many things that are just symbols without meaning to Mathematica. Try evaluating sqrt(2) for instance. Also e is not the natural base. All MMA built-ins are capitalized. – Marius Ladegård Meyer Jul 4 '16 at 21:54
• Thanks for your answer. I'll try to fix it ;) – BlackBrain Jul 4 '16 at 21:56
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Jul 4 '16 at 23:24
• @MariusLadegårdMeyer I changed my code as explained in the EDIT section. – BlackBrain Jul 5 '16 at 14:03
• The equivalent commands DSolve[(x'[u] + u^2)^2 == x[u] u^2, x, u], DSolve[2 y[u] y'[u] == u (y[u] - u), y, u] (u == Exp[-t], y[u] == Sqrt[x[u]]) return unevaluated. Sometimes, the warning indicates DSolve is almost there. See this or this for getting Solve to use Reduce inside DSolve. (BTW, it returns unevaluated, too, for your ODE.) – Michael E2 Jul 5 '16 at 23:50

I use a substitution to solve:

ClearAll["Global*"]
Remove["Global*"]

ode = x'[t] + Sqrt[x[t]] - Exp[-t];


first substitution is: t = -Log[-s]

T = -Log[-s];
ode2 = Expand[(ode /. {x[t] -> x[s], x'[t] -> x'[s]/D[T, s], t -> T})/s]


next substitution: x[s] = v[s]^2/4

XX[s_] := v[s]^2/4;
ode3 = Expand@Simplify[(ode2 /. x -> XX)*2, {v[s] \[Element] Reals, v[s] > 0}]


next substitution: s = -Exp[m]

SS = -Exp[m];
ode4 = Expand[(ode3 /. {v[s] -> v[m], v'[s] -> v'[m]/D[SS, m], s -> SS}) Exp[m]]


Then I have a Abel equation Second Kind in canonical form

$v(m) v'(m)-v(m)=-2 e^m \tag{1}$

Bonus: I'm convert Abel equation Second Kind to Abel equation First Kind

VV[m_] := -1/k[m];
ode5 = Expand[(ode4 /. v -> VV)*k[m]^3]
MM = Log[n];
ode6 = Expand[(ode5 /. {k[m] -> k[n], k'[m] -> k'[n]/D[MM, n], m -> MM})/n]


$k'(n)=2 k(n)^3+\frac{k(n)^2}{n} \tag{2}$

I use's this method to solve differential equation (1)

   Q[m_] := -2*Exp[m];
Psi = FullSimplify[Sign[m]*Abs[m]*SinIntegral[m]];
c = FullSimplify[(1/(-2*Psi^3))(1/2*Psi*Sin[2*m] - (2 + 1/(Sign[m]*Abs[m]))*Psi*Sin[m]^2 + 2*Psi^2*(Cos[m] - Sin[m]/(Sign[m]*Abs[m])) - Sin[m]^3)];
a = -4;
b = 3 - c - (4*Q[m])/(m + C);
p = -a^2/3 + b;
q = 2*(a/3)^3 - a*b + c;
BETA = 0.3218(* BETA = -0.12*Log[n]+0.3218, for n=1 *);

SolveSol = Z /. Solve[Z^3 + p*Z + q == 0, Z][](*Only a Real root*);
sol = v[m] == 1/2*(m + C)*(BETA*SolveSol + 1/3);


Back all substitution:

   Solution = sol /. v[m] -> v /. m -> Log[-s] /. v -> Sqrt[4*x] /. s -> -Exp[-t] /. x -> x[t]


Then I have a huge long solution in implicit form.

Another we can solve in explicit form ,but MMA need some time to solve.

 Solution1 =
sol /. v[m] -> v /. m -> Log[-s] /. v -> Sqrt[4*x] /. s -> -Exp[-t]
Solve[Solution1, x] /. x -> x[t]