2.5.22 Problem 22
Internal
problem
ID
[8983]
Book
:
Own
collection
of
miscellaneous
problems
Section
:
section
5.0
Problem
number
:
22
Date
solved
:
Sunday, March 30, 2025 at 01:57:56 PM
CAS
classification
:
[[_2nd_order, _missing_x], [_2nd_order, _reducible, _mu_x_y1]]
Solved as second order missing x ode
Time used: 1.162 (sec)
Solve
\begin{align*} y^{\prime \prime }+{\mathrm e}^{y}&=0 \end{align*}
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
\begin{equation}
p^{\prime } = -\frac {{\mathrm e}^{y}}{p}
\end{equation}
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} \\
\end{align*}
\[
\frac {p^{2}}{2}=-{\mathrm e}^{y}+c_1
\]
For solution (1) found earlier, since \(p=y^{\prime }\) then we now have a new first order ode to solve which is
\begin{align*} \frac {{y^{\prime }}^{2}}{2} = -{\mathrm e}^{y}+c_1 \end{align*}
Let \(p=y^{\prime }\) the ode becomes
\begin{align*} \frac {p^{2}}{2} = -{\mathrm e}^{y}+c_1 \end{align*}
Solving for \(y\) from the above results in
\begin{align*}
\tag{1} y &= \ln \left (-\frac {p^{2}}{2}+c_1 \right ) \\
\end{align*}
This has the form
\begin{align*} y=x f(p)+g(p)\tag {*} \end{align*}
Where \(f,g\) are functions of \(p=y'(x)\). The above ode is dAlembert ode which is now solved.
Taking derivative of (*) w.r.t. \(x\) gives
\begin{align*} p &= f+(x f'+g') \frac {dp}{dx}\\ p-f &= (x f'+g') \frac {dp}{dx}\tag {2} \end{align*}
Comparing the form \(y=x f + g\) to (1A) shows that
\begin{align*} f &= 0\\ g &= -\ln \left (2\right )+\ln \left (-p^{2}+2 c_1 \right ) \end{align*}
Hence (2) becomes
\begin{equation}
\tag{2A} p = -\frac {2 p p^{\prime }\left (x \right )}{-p^{2}+2 c_1}
\end{equation}
The singular solution is found by setting \(\frac {dp}{dx}=0\) in the above which gives
\begin{align*} p = 0 \end{align*}
Solving the above for \(p\) results in
\begin{align*} p_{1} &=0 \end{align*}
Substituting these in (1A) and keeping singular solution that verifies the ode gives
\begin{align*} y = \ln \left (c_1 \right ) \end{align*}
The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}x}}\neq 0\). From eq. (2A). This results in
\begin{equation}
\tag{3} p^{\prime }\left (x \right ) = \frac {p \left (x \right )^{2}}{2}-c_1
\end{equation}
This ODE is now solved for \(p \left (x \right )\). No inversion is needed.
Integrating gives
\begin{align*} \int \frac {1}{\frac {p^{2}}{2}-c_1}d p &= dx\\ -\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {p \sqrt {2}}{2 \sqrt {c_1}}\right )}{\sqrt {c_1}}&= x +c_2 \end{align*}
Singular solutions are found by solving
\begin{align*} \frac {p^{2}}{2}-c_1&= 0 \end{align*}
for \(p \left (x \right )\). 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*} p \left (x \right ) = \sqrt {2}\, \sqrt {c_1}\\ p \left (x \right ) = -\sqrt {2}\, \sqrt {c_1} \end{align*}
Substituing the above solution for \(p\) in (2A) gives
\begin{align*}
y &= -\ln \left (2\right )+\ln \left (-2 \tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +2 c_1 \right ) \\
\end{align*}
Will add steps showing solving for IC soon.
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 (2\right )+\ln \left (-2 \tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +2 c_1 \right ) \\
\end{align*}
Solved as second order can be made integrable
Time used: 0.569 (sec)
Solve
\begin{align*} y^{\prime \prime }+{\mathrm e}^{y}&=0 \end{align*}
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\). Let \(p=y^{\prime }\) the ode becomes
\begin{align*} \frac {p^{2}}{2}+{\mathrm e}^{y} = c_1 \end{align*}
Solving for \(y\) from the above results in
\begin{align*}
\tag{1} y &= \ln \left (-\frac {p^{2}}{2}+c_1 \right ) \\
\end{align*}
This has the form
\begin{align*} y=x f(p)+g(p)\tag {*} \end{align*}
Where \(f,g\) are functions of \(p=y'(x)\). The above ode is dAlembert ode which is now solved.
Taking derivative of (*) w.r.t. \(x\) gives
\begin{align*} p &= f+(x f'+g') \frac {dp}{dx}\\ p-f &= (x f'+g') \frac {dp}{dx}\tag {2} \end{align*}
Comparing the form \(y=x f + g\) to (1A) shows that
\begin{align*} f &= 0\\ g &= -\ln \left (2\right )+\ln \left (-p^{2}+2 c_1 \right ) \end{align*}
Hence (2) becomes
\begin{equation}
\tag{2A} p = -\frac {2 p p^{\prime }\left (x \right )}{-p^{2}+2 c_1}
\end{equation}
The singular solution is found by setting \(\frac {dp}{dx}=0\) in the above which gives
\begin{align*} p = 0 \end{align*}
Solving the above for \(p\) results in
\begin{align*} p_{1} &=0 \end{align*}
Substituting these in (1A) and keeping singular solution that verifies the ode gives
\begin{align*} y = \ln \left (c_1 \right ) \end{align*}
The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}x}}\neq 0\). From eq. (2A). This results in
\begin{equation}
\tag{3} p^{\prime }\left (x \right ) = \frac {p \left (x \right )^{2}}{2}-c_1
\end{equation}
This ODE is now solved for \(p \left (x \right )\). No inversion is needed.
Integrating gives
\begin{align*} \int \frac {1}{\frac {p^{2}}{2}-c_1}d p &= dx\\ -\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {p \sqrt {2}}{2 \sqrt {c_1}}\right )}{\sqrt {c_1}}&= x +c_2 \end{align*}
Singular solutions are found by solving
\begin{align*} \frac {p^{2}}{2}-c_1&= 0 \end{align*}
for \(p \left (x \right )\). 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*} p \left (x \right ) = \sqrt {2}\, \sqrt {c_1}\\ p \left (x \right ) = -\sqrt {2}\, \sqrt {c_1} \end{align*}
Substituing the above solution for \(p\) in (2A) gives
\begin{align*}
y &= -\ln \left (2\right )+\ln \left (-2 \tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +2 c_1 \right ) \\
\end{align*}
Will add steps showing solving for IC soon.
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 (2\right )+\ln \left (-2 \tanh \left (\frac {\sqrt {c_1}\, \left (x +c_2 \right ) \sqrt {2}}{2}\right )^{2} c_1 +2 c_1 \right ) \\
\end{align*}
✓ Maple. Time used: 0.026 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)+exp(y(x)) = 0;
dsolve(ode,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 )
\]
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]
1st order, trying the canonical coordinates of the invariance group
-> Calling odsolve with the ODE, diff(y(x),x) = 1/2*y(x), y(x)
*** Sublevel 3 ***
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful
<- 1st order, canonical coordinates successful
<- differential order: 2; canonical coordinates successful
<- differential order 2; missing variables successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}\frac {d}{d x}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}{d x}\frac {d}{d x}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}{d x}\frac {d}{d x}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}{d x}\frac {d}{d x}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 {Redefine the integration constant(s)}\hspace {3pt} \\ {} & {} & \left \{u \left (y \right )=\sqrt {-2 \,{\mathrm e}^{y}+\mathit {C1}}, u \left (y \right )=-\sqrt {-2 \,{\mathrm e}^{y}+\mathit {C1}}\right \} \\ \bullet & {} & \textrm {Solve 1st ODE for}\hspace {3pt} u \left (y \right ) \\ {} & {} & u \left (y \right )=\sqrt {-2 \,{\mathrm e}^{y}+\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 )}+\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 )}+\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 )}+\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 )}+\mathit {C1}}}d x =\int 1d x +\mathit {C2} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {2 \,\mathrm {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+\mathit {C1}}}{\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 (-\frac {\tanh \left (\frac {\mathit {C2} \sqrt {\mathit {C1}}}{2}+\frac {x \sqrt {\mathit {C1}}}{2}\right )^{2} \mathit {C1}}{2}+\frac {\mathit {C1}}{2}\right ) \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (x \right )=-\ln \left (2\right )+\ln \left (\mathit {C1} \mathrm {sech}\left (\frac {\sqrt {\mathit {C1}}\, \left (x +\mathit {C2} \right )}{2}\right )^{2}\right ) \\ \bullet & {} & \textrm {Redefine the integration constant(s)}\hspace {3pt} \\ {} & {} & y \left (x \right )=-\ln \left (2\right )+\ln \left (\mathit {C1} \mathrm {sech}\left (\mathit {C2} +\frac {x \sqrt {\mathit {C1}}}{2}\right )^{2}\right ) \\ \bullet & {} & \textrm {Solve 2nd ODE for}\hspace {3pt} u \left (y \right ) \\ {} & {} & u \left (y \right )=-\sqrt {-2 \,{\mathrm e}^{y}+\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 )}+\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 )}+\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 )}+\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 )}+\mathit {C1}}}d x =\int \left (-1\right )d x +\mathit {C2} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {2 \,\mathrm {arctanh}\left (\frac {\sqrt {-2 \,{\mathrm e}^{y \left (x \right )}+\mathit {C1}}}{\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 (-\frac {\tanh \left (\frac {\mathit {C2} \sqrt {\mathit {C1}}}{2}-\frac {x \sqrt {\mathit {C1}}}{2}\right )^{2} \mathit {C1}}{2}+\frac {\mathit {C1}}{2}\right ) \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (x \right )=-\ln \left (2\right )+\ln \left (\mathit {C1} \mathrm {sech}\left (\frac {\sqrt {\mathit {C1}}\, \left (-x +\mathit {C2} \right )}{2}\right )^{2}\right ) \\ \bullet & {} & \textrm {Redefine the integration constant(s)}\hspace {3pt} \\ {} & {} & y \left (x \right )=-\ln \left (2\right )+\ln \left (\mathit {C1} \mathrm {sech}\left (\mathit {C2} -\frac {x \sqrt {\mathit {C1}}}{2}\right )^{2}\right ) \end {array} \]
✓ Mathematica. Time used: 22.613 (sec). Leaf size: 32
ode=D[y[x],{x,2}]+Exp[y[x]]==0;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\[
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 )
\]
✓ Sympy. Time used: 15.788 (sec). Leaf size: 37
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(exp(y(x)) + Derivative(y(x), (x, 2)),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
\[
\left [ y{\left (x \right )} = \log {\left (\frac {C_{1}}{\cos {\left (\sqrt {- C_{1}} \left (C_{2} + x\right ) \right )} + 1} \right )}, \ y{\left (x \right )} = \log {\left (\frac {C_{1}}{\cos {\left (\sqrt {- C_{1}} \left (C_{2} - x\right ) \right )} + 1} \right )}\right ]
\]