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[1]+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.
DSolve
contains many things that are just symbols without meaning to Mathematica. Try evaluatingsqrt(2)
for instance. Alsoe
is not the natural base. All MMA built-ins are capitalized. $\endgroup$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 indicatesDSolve
is almost there. See this or this for gettingSolve
to useReduce
insideDSolve
. (BTW, it returns unevaluated, too, for your ODE.) $\endgroup$