21.9 problem 704

21.9.1 Solving as second order integrable as is ode
21.9.2 Solving as second order ode missing x ode
21.9.3 Solving as type second_order_integrable_as_is (not using ABC version)
21.9.4 Solving as exact nonlinear second order ode ode
21.9.5 Maple step by step solution

Internal problem ID [15447]
Internal file name [OUTPUT/15448_Wednesday_May_08_2024_03_59_02_PM_16519201/index.tex]

Book: A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section: Chapter 2 (Higher order ODE’s). Section 16. The method of isoclines for differential equations of the second order. Exercises page 158
Problem number: 704.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second_order_integrable_as_is", "second_order_ode_missing_x", "exact nonlinear second order ode"

Maple gives the following as the ode type

[[_2nd_order, _missing_x], [_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

\[ \boxed {x^{\prime \prime }+\left (x+2\right ) x^{\prime }=0} \]

21.9.1 Solving as second order integrable as is ode

Integrating both sides of the ODE w.r.t \(t\) gives \begin {align*} \int \left (x^{\prime \prime }+\left (x+2\right ) x^{\prime }\right )d t &= 0 \\ \frac {x^{2}}{2}+2 x+x^{\prime } = c_{1} \end {align*}

Which is now solved for \(x\). Integrating both sides gives \begin {align*} \int \frac {1}{-\frac {1}{2} x^{2}-2 x +c_{1}}d x &= t +c_{2}\\ \frac {2 \,\operatorname {arctanh}\left (\frac {2 x +4}{2 \sqrt {2 c_{1} +4}}\right )}{\sqrt {2 c_{1} +4}}&=t +c_{2} \end {align*}

Solving for \(x\) gives these solutions \begin {align*} x_1&=\tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} x &= \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \\ \end{align*}

Verification of solutions

\[ x = \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \] Verified OK.

21.9.2 Solving as second order ode missing x ode

This is missing independent variable second order ode. Solved by reduction of order by using substitution which makes the dependent variable \(x\) an independent variable. Using \begin {align*} x' &= p(x) \end {align*}

Then \begin {align*} x'' &= \frac {dp}{dt}\\ &= \frac {dx}{dt} \frac {dp}{dx}\\ &= p \frac {dp}{dx} \end {align*}

Hence the ode becomes \begin {align*} p \left (x \right ) \left (\frac {d}{d x}p \left (x \right )\right )+\left (x +2\right ) p \left (x \right ) = 0 \end {align*}

Which is now solved as first order ode for \(p(x)\). Integrating both sides gives \begin {align*} p \left (x \right ) &= \int { -x -2\,\mathop {\mathrm {d}x}}\\ &= -\frac {x \left (4+x \right )}{2}+c_{1} \end {align*}

For solution (1) found earlier, since \(p=x^{\prime }\) then we now have a new first order ode to solve which is \begin {align*} x^{\prime } = -\frac {x \left (4+x\right )}{2}+c_{1} \end {align*}

Integrating both sides gives \begin {align*} \int \frac {1}{-\frac {1}{2} x^{2}-2 x +c_{1}}d x &= t +c_{2}\\ \frac {2 \,\operatorname {arctanh}\left (\frac {2 x +4}{2 \sqrt {2 c_{1} +4}}\right )}{\sqrt {2 c_{1} +4}}&=t +c_{2} \end {align*}

Solving for \(x\) gives these solutions \begin {align*} x_1&=\tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} x &= \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \\ \end{align*}

Verification of solutions

\[ x = \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \] Verified OK.

21.9.3 Solving as type second_order_integrable_as_is (not using ABC version)

Writing the ode as \[ x^{\prime \prime }+\left (x+2\right ) x^{\prime } = 0 \] Integrating both sides of the ODE w.r.t \(t\) gives \begin {align*} \int \left (x^{\prime \prime }+\left (x+2\right ) x^{\prime }\right )d t &= 0 \\ \frac {x^{2}}{2}+2 x+x^{\prime } = c_{1} \end {align*}

Which is now solved for \(x\). Integrating both sides gives \begin {align*} \int \frac {1}{-\frac {1}{2} x^{2}-2 x +c_{1}}d x &= t +c_{2}\\ \frac {2 \,\operatorname {arctanh}\left (\frac {2 x +4}{2 \sqrt {2 c_{1} +4}}\right )}{\sqrt {2 c_{1} +4}}&=t +c_{2} \end {align*}

Solving for \(x\) gives these solutions \begin {align*} x_1&=\tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} x &= \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \\ \end{align*}

Verification of solutions

\[ x = \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \] Verified OK.

21.9.4 Solving as exact nonlinear second order ode ode

An exact non-linear second order ode has the form \begin {align*} a_{2} \left (t , x, x^{\prime }\right ) x^{\prime \prime }+a_{1} \left (t , x, x^{\prime }\right ) x^{\prime }+a_{0} \left (t , x, x^{\prime }\right )&=0 \end {align*}

Where the following conditions are satisfied \begin {align*} \frac {\partial a_2}{\partial x} &= \frac {\partial a_1}{\partial x'}\\ \frac {\partial a_2}{\partial t} &= \frac {\partial a_0}{\partial x'}\\ \frac {\partial a_1}{\partial t} &= \frac {\partial a_0}{\partial x} \end {align*}

Looking at the the ode given we see that \begin {align*} a_2 &= 1\\ a_1 &= x+2\\ a_0 &= 0 \end {align*}

Applying the conditions to the above shows this is a nonlinear exact second order ode. Therefore it can be reduced to first order ode given by \begin {align*} \int {a_2\,d x'} + \int {a_1\,d x} + \int {a_0\,d t} &= c_{1}\\ \int {1\,d x'} + \int {x+2\,d x} + \int {0\,d t} &= c_{1} \end {align*}

Which results in \begin {align*} x^{\prime }+\frac {x \left (4+x\right )}{2} = c_{1} \end {align*}

Which is now solved Integrating both sides gives \begin {align*} \int \frac {1}{-\frac {1}{2} x^{2}-2 x +c_{1}}d x &= t +c_{2}\\ \frac {2 \,\operatorname {arctanh}\left (\frac {2 x +4}{2 \sqrt {2 c_{1} +4}}\right )}{\sqrt {2 c_{1} +4}}&=t +c_{2} \end {align*}

Solving for \(x\) gives these solutions \begin {align*} x_1&=\tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} x &= \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \\ \end{align*}

Verification of solutions

\[ x = \tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \] Verified OK.

21.9.5 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x^{\prime \prime }+\left (x+2\right ) x^{\prime }=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & x^{\prime \prime } \\ \bullet & {} & \textrm {Define new dependent variable}\hspace {3pt} u \\ {} & {} & u \left (t \right )=x^{\prime } \\ \bullet & {} & \textrm {Compute}\hspace {3pt} x^{\prime \prime } \\ {} & {} & u^{\prime }\left (t \right )=x^{\prime \prime } \\ \bullet & {} & \textrm {Use chain rule on the lhs}\hspace {3pt} \\ {} & {} & x^{\prime } \left (\frac {d}{d x}u \left (x \right )\right )=x^{\prime \prime } \\ \bullet & {} & \textrm {Substitute in the definition of}\hspace {3pt} u \\ {} & {} & u \left (x \right ) \left (\frac {d}{d x}u \left (x \right )\right )=x^{\prime \prime } \\ \bullet & {} & \textrm {Make substitutions}\hspace {3pt} x^{\prime }=u \left (x \right ),x^{\prime \prime }=u \left (x \right ) \left (\frac {d}{d x}u \left (x \right )\right )\hspace {3pt}\textrm {to reduce order of ODE}\hspace {3pt} \\ {} & {} & u \left (x \right ) \left (\frac {d}{d x}u \left (x \right )\right )+\left (x +2\right ) u \left (x \right )=0 \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}u \left (x \right )=-x -2 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}u \left (x \right )\right )d x =\int \left (-x -2\right )d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & u \left (x \right )=-\frac {1}{2} x^{2}-2 x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} u \left (x \right ) \\ {} & {} & u \left (x \right )=-\frac {1}{2} x^{2}-2 x +c_{1} \\ \bullet & {} & \textrm {Solve 1st ODE for}\hspace {3pt} u \left (x \right ) \\ {} & {} & u \left (x \right )=-\frac {1}{2} x^{2}-2 x +c_{1} \\ \bullet & {} & \textrm {Revert to original variables with substitution}\hspace {3pt} u \left (x \right )=x^{\prime },x =x \\ {} & {} & x^{\prime }=-\frac {x^{2}}{2}-2 x+c_{1} \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & x^{\prime }=-\frac {x^{2}}{2}-2 x+c_{1} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {x^{\prime }}{-\frac {x^{2}}{2}-2 x+c_{1}}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {x^{\prime }}{-\frac {x^{2}}{2}-2 x+c_{1}}d t =\int 1d t +c_{2} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {2 \,\mathrm {arctanh}\left (\frac {2 x+4}{2 \sqrt {2 c_{1} +4}}\right )}{\sqrt {2 c_{1} +4}}=t +c_{2} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \\ {} & {} & x=\tanh \left (\frac {c_{2} \sqrt {2 c_{1} +4}}{2}+\frac {t \sqrt {2 c_{1} +4}}{2}\right ) \sqrt {2 c_{1} +4}-2 \end {array} \]

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
trying 2nd order WeierstrassP 
trying 2nd order JacobiSN 
differential order: 2; trying a linearization to 3rd order 
trying 2nd order ODE linearizable_by_differentiation 
trying 2nd order, 2 integrating factors of the form mu(x,y) 
trying differential order: 2; missing variables 
`, `-> Computing symmetries using: way = 3 
-> Calling odsolve with the ODE`, (diff(_b(_a), _a))*_b(_a)+(_a+2)*_b(_a) = 0, _b(_a), HINT = [[-_a-2, -2*_b]]`   *** Sublevel 2 *** 
   symmetry methods on request 
`, `1st order, trying reduction of order with given symmetries:`[-_a-2, -2*_b]
 

Solution by Maple

Time used: 0.031 (sec). Leaf size: 32

dsolve(diff(x(t),t$2)+(x(t)+2)*diff(x(t),t)=0,x(t), singsol=all)
 

\[ x \left (t \right ) = -\frac {\left (\sqrt {2}\, c_{1} -\tanh \left (\frac {\left (t +c_{2} \right ) \sqrt {2}}{2 c_{1}}\right )\right ) \sqrt {2}}{c_{1}} \]

Solution by Mathematica

Time used: 60.064 (sec). Leaf size: 40

DSolve[x''[t]+(x[t]+2)*x'[t]==0,x[t],t,IncludeSingularSolutions -> True]
 

\[ x(t)\to -2+\sqrt {2} \sqrt {2+c_1} \tanh \left (\frac {\sqrt {2+c_1} (t+c_2)}{\sqrt {2}}\right ) \]