2.5.22 problem 22

Solved as second order missing x ode
Solved as second order can be made integrable
Maple step by step solution
Maple trace
Maple dsolve solution
Mathematica DSolve solution

Internal problem ID [8409]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 22
Date solved : Sunday, November 10, 2024 at 03:45:12 AM
CAS classification : [[_2nd_order, _missing_x], [_2nd_order, _reducible, _mu_x_y1]]

Solve

\begin{align*} y^{\prime \prime }+{\mathrm e}^{y}&=0 \end{align*}

Solved as second order missing x ode

Time used: 7.591 (sec)

This is missing independent variable second order ode. Solved by reduction of order by using substitution which makes the dependent variable \(y\) an independent variable. Using

\begin{align*} y' &= p \end{align*}

Then

\begin{align*} y'' &= \frac {dp}{dx}\\ &= \frac {dp}{dy}\frac {dy}{dx}\\ &= p \frac {dp}{dy} \end{align*}

Hence the ode becomes

\begin{align*} p \left (y \right ) \left (\frac {d}{d y}p \left (y \right )\right )+{\mathrm e}^{y} = 0 \end{align*}

Which is now solved as first order ode for \(p(y)\).

The ode \(p^{\prime } = -\frac {{\mathrm e}^{y}}{p}\) is separable as it can be written as

\begin{align*} p^{\prime }&= -\frac {{\mathrm e}^{y}}{p}\\ &= f(y) g(p) \end{align*}

Where

\begin{align*} f(y) &= -{\mathrm e}^{y}\\ g(p) &= \frac {1}{p} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(p)} \,dp} &= \int { f(y) \,dy}\\ \int { p\,dp} &= \int { -{\mathrm e}^{y} \,dy}\\ \frac {p^{2}}{2}&=-{\mathrm e}^{y}+c_1 \end{align*}

Solving for \(p\) gives

\begin{align*} p &= \sqrt {-2 \,{\mathrm e}^{y}+2 c_1} \\ p &= -\sqrt {-2 \,{\mathrm e}^{y}+2 c_1} \\ \end{align*}

For solution (1) found earlier, since \(p=y^{\prime }\) then we now have a new first order ode to solve which is

\begin{align*} y^{\prime } = \sqrt {-2 \,{\mathrm e}^{y}+2 c_1} \end{align*}

Integrating gives

\begin{align*} \int \frac {1}{\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}}d y &= dx\\ -\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}\, \sqrt {2}}{2 \sqrt {c_1}}\right )}{\sqrt {c_1}}&= x +c_2 \end{align*}

Singular solutions are found by solving

\begin{align*} \sqrt {-2 \,{\mathrm e}^{y}+2 c_1}&= 0 \end{align*}

for \(y\). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} y = \ln \left (c_1 \right ) \end{align*}

For solution (2) found earlier, since \(p=y^{\prime }\) then we now have a new first order ode to solve which is

\begin{align*} y^{\prime } = -\sqrt {-2 \,{\mathrm e}^{y}+2 c_1} \end{align*}

Integrating gives

\begin{align*} \int -\frac {1}{\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}}d y &= dx\\ \frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}\, \sqrt {2}}{2 \sqrt {c_1}}\right )}{\sqrt {c_1}}&= x +c_3 \end{align*}

Singular solutions are found by solving

\begin{align*} -\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}&= 0 \end{align*}

for \(y\). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} y = \ln \left (c_1 \right ) \end{align*}

Solving for \(y\) gives

\begin{align*} y &= \ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_3 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \\ \end{align*}

Will add steps showing solving for IC soon.

Solving for \(y\) from the above solution(s) gives (after possible removing of solutions that do not verify)

\begin{align*} y&=\ln \left (c_1 \right )\\ y&=\ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right )\\ y&=\ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_3 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \end{align*}

The solution

\[ y = \ln \left (c_1 \right ) \]

was found not to satisfy the ode or the IC. Hence it is removed.

Summary of solutions found

\begin{align*} y &= \ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \\ y &= \ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_3 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \\ \end{align*}

Solved as second order can be made integrable

Time used: 11.983 (sec)

Multiplying the ode by \(y^{\prime }\) gives

\[ y^{\prime } y^{\prime \prime }+y^{\prime } {\mathrm e}^{y} = 0 \]

Integrating the above w.r.t \(x\) gives

\begin{align*} \int \left (y^{\prime } y^{\prime \prime }+y^{\prime } {\mathrm e}^{y}\right )d x &= 0 \\ \frac {{y^{\prime }}^{2}}{2}+{\mathrm e}^{y} &= c_1 \end{align*}

Which is now solved for \(y\). Solving for the derivative gives these ODE’s to solve

\begin{align*} \tag{1} y^{\prime }&=\sqrt {-2 \,{\mathrm e}^{y}+2 c_1} \\ \tag{2} y^{\prime }&=-\sqrt {-2 \,{\mathrm e}^{y}+2 c_1} \\ \end{align*}

Now each of the above is solved separately.

Solving Eq. (1)

Integrating gives

\begin{align*} \int \frac {1}{\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}}d y &= dx\\ -\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}\, \sqrt {2}}{2 \sqrt {c_1}}\right )}{\sqrt {c_1}}&= x +c_2 \end{align*}

Singular solutions are found by solving

\begin{align*} \sqrt {-2 \,{\mathrm e}^{y}+2 c_1}&= 0 \end{align*}

for \(y\). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} y = \ln \left (c_1 \right ) \end{align*}

Solving Eq. (2)

Integrating gives

\begin{align*} \int -\frac {1}{\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}}d y &= dx\\ \frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}\, \sqrt {2}}{2 \sqrt {c_1}}\right )}{\sqrt {c_1}}&= x +c_3 \end{align*}

Singular solutions are found by solving

\begin{align*} -\sqrt {-2 \,{\mathrm e}^{y}+2 c_1}&= 0 \end{align*}

for \(y\). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

\begin{align*} y = \ln \left (c_1 \right ) \end{align*}

Solving for \(y\) gives

\begin{align*} y &= \ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_3 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \\ \end{align*}

Will add steps showing solving for IC soon.

Solving for \(y\) from the above solution(s) gives (after possible removing of solutions that do not verify)

\begin{align*} y&=\ln \left (c_1 \right )\\ y&=\ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right )\\ y&=\ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_3 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \end{align*}

The solution

\[ y = \ln \left (c_1 \right ) \]

was found not to satisfy the ode or the IC. Hence it is removed.

Summary of solutions found

\begin{align*} y &= \ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \\ y &= \ln \left (-\tanh \left (\frac {\sqrt {c_1}\, \left (x +c_3 \right ) \sqrt {2}}{2}\right )^{2} c_1 +c_1 \right ) \\ \end{align*}

Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )+{\mathrm e}^{y \left (x \right )}=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Define new dependent variable}\hspace {3pt} u \\ {} & {} & u \left (x \right )=\frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Compute}\hspace {3pt} \frac {d^{2}}{d x^{2}}y \left (x \right ) \\ {} & {} & \frac {d}{d x}u \left (x \right )=\frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Use chain rule on the lhs}\hspace {3pt} \\ {} & {} & \left (\frac {d}{d x}y \left (x \right )\right ) \left (\frac {d}{d y}u \left (y \right )\right )=\frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Substitute in the definition of}\hspace {3pt} u \\ {} & {} & u \left (y \right ) \left (\frac {d}{d y}u \left (y \right )\right )=\frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Make substitutions}\hspace {3pt} \frac {d}{d x}y \left (x \right )=u \left (y \right ),\frac {d^{2}}{d x^{2}}y \left (x \right )=u \left (y \right ) \left (\frac {d}{d y}u \left (y \right )\right )\hspace {3pt}\textrm {to reduce order of ODE}\hspace {3pt} \\ {} & {} & u \left (y \right ) \left (\frac {d}{d y}u \left (y \right )\right )+{\mathrm e}^{y}=0 \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & u \left (y \right ) \left (\frac {d}{d y}u \left (y \right )\right )=-{\mathrm e}^{y} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} y \\ {} & {} & \int u \left (y \right ) \left (\frac {d}{d y}u \left (y \right )\right )d y =\int -{\mathrm e}^{y}d y +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {u \left (y \right )^{2}}{2}=-{\mathrm e}^{y}+\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} u \left (y \right ) \\ {} & {} & \left \{u \left (y \right )=\sqrt {-2 \,{\mathrm e}^{y}+2 \mathit {C1}}, u \left (y \right )=-\sqrt {-2 \,{\mathrm e}^{y}+2 \mathit {C1}}\right \} \\ \bullet & {} & \textrm {Solve 1st ODE for}\hspace {3pt} u \left (y \right ) \\ {} & {} & u \left (y \right )=\sqrt {-2 \,{\mathrm e}^{y}+2 \mathit {C1}} \\ \bullet & {} & \textrm {Revert to original variables with substitution}\hspace {3pt} u \left (y \right )=\frac {d}{d x}y \left (x \right ),y =y \left (x \right ) \\ {} & {} & \frac {d}{d x}y \left (x \right )=\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}} \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d x}y \left (x \right )}{\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}}}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {\frac {d}{d x}y \left (x \right )}{\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}}}d x =\int 1d x +\mathit {C2} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\sqrt {2}\, \mathrm {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}}\, \sqrt {2}}{2 \sqrt {\mathit {C1}}}\right )}{\sqrt {\mathit {C1}}}=x +\mathit {C2} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\ln \left (-\tanh \left (\frac {\sqrt {\mathit {C1}}\, \left (x +\mathit {C2} \right ) \sqrt {2}}{2}\right )^{2} \mathit {C1} +\mathit {C1} \right ) \\ \bullet & {} & \textrm {Solve 2nd ODE for}\hspace {3pt} u \left (y \right ) \\ {} & {} & u \left (y \right )=-\sqrt {-2 \,{\mathrm e}^{y}+2 \mathit {C1}} \\ \bullet & {} & \textrm {Revert to original variables with substitution}\hspace {3pt} u \left (y \right )=\frac {d}{d x}y \left (x \right ),y =y \left (x \right ) \\ {} & {} & \frac {d}{d x}y \left (x \right )=-\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}} \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d x}y \left (x \right )}{\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}}}=-1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {\frac {d}{d x}y \left (x \right )}{\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}}}d x =\int \left (-1\right )d x +\mathit {C2} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\sqrt {2}\, \mathrm {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+2 \mathit {C1}}\, \sqrt {2}}{2 \sqrt {\mathit {C1}}}\right )}{\sqrt {\mathit {C1}}}=-x +\mathit {C2} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\ln \left (-\tanh \left (\frac {\sqrt {\mathit {C1}}\, \left (-x +\mathit {C2} \right ) \sqrt {2}}{2}\right )^{2} \mathit {C1} +\mathit {C1} \right ) \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)+exp(_a) = 0, _b(_a), HINT = [[1, (1/2)*_b]]`   *** Sublevel 2 *** 
   symmetry methods on request 
`, `1st order, trying reduction of order with given symmetries:`[1, 1/2*_b]
 
Maple dsolve solution

Solving time : 0.087 (sec)
Leaf size : 25

dsolve(diff(diff(y(x),x),x)+exp(y(x)) = 0, 
       y(x),singsol=all)
 
\[ y = -\ln \left (2\right )+\ln \left (\frac {\operatorname {sech}\left (\frac {x +c_{2}}{2 c_{1}}\right )^{2}}{c_{1}^{2}}\right ) \]
Mathematica DSolve solution

Solving time : 21.487 (sec)
Leaf size : 60

DSolve[{D[y[x],{x,2}]+Exp[y[x]]==0,{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \log \left (\frac {1}{2} c_1 \text {sech}^2\left (\frac {1}{2} \sqrt {c_1 (x+c_2){}^2}\right )\right ) \\ y(x)\to \log \left (\frac {1}{2} c_1 \text {sech}^2\left (\frac {\sqrt {c_1 x^2}}{2}\right )\right ) \\ \end{align*}