0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Marius Ladegård Meyer Jul 4 '16 at 21:54
  • $\begingroup$ Thanks for your answer. I'll try to fix it ;) $\endgroup$ – BlackBrain Jul 4 '16 at 21:56
  • $\begingroup$ 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! $\endgroup$ – Michael E2 Jul 4 '16 at 23:24
  • $\begingroup$ @MariusLadegårdMeyer I changed my code as explained in the EDIT section. $\endgroup$ – BlackBrain Jul 5 '16 at 14:03
  • 1
    $\begingroup$ 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.) $\endgroup$ – Michael E2 Jul 5 '16 at 23:50
2
$\begingroup$

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[1]);
   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][[1]](*Only a Real root*);
   sol = v[m] == 1/2*(m + C[1])*(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]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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