1.23 problem 23
Internal
problem
ID
[8060]
Book
:
Second
order
enumerated
odes
Section
:
section
1
Problem
number
:
23
Date
solved
:
Monday, October 21, 2024 at 04:45:03 PM
CAS
classification
:
[[_2nd_order, _missing_x]]
Solve
\begin{align*} y^{\prime \prime }+{y^{\prime }}^{2}+y&=0 \end{align*}
1.23.1 Solved as second order missing x ode
Time used: 0.764 (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 )+p \left (y \right )^{2}+y = 0 \end{align*}
Which is now solved as first order ode for \(p(y)\).
In canonical form, the ODE is
\begin{align*} p' &= F(y,p)\\ &= -\frac {p^{2}+y}{p} \end{align*}
This is a Bernoulli ODE.
\[ p' = \left (-1\right ) p + \left (-y\right )\frac {1}{p} \tag {1} \]
The standard Bernoulli ODE has the form
\[ p' = f_0(y)p+f_1(y)p^n \tag {2} \]
Comparing this to (1)
shows that
\begin{align*} f_0 &=-1\\ f_1 &=-y \end{align*}
The first step is to divide the above equation by \(p^n \) which gives
\[ \frac {p'}{p^n} = f_0(y) p^{1-n} +f_1(y) \tag {3} \]
The next step is use the
substitution \(v = p^{1-n}\) in equation (3) which generates a new ODE in \(v \left (y \right )\) which will be linear and can be
easily solved using an integrating factor. Backsubstitution then gives the solution \(p(y)\) which is
what we want.
This method is now applied to the ODE at hand. Comparing the ODE (1) With (2) Shows
that
\begin{align*} f_0(y)&=-1\\ f_1(y)&=-y\\ n &=-1 \end{align*}
Dividing both sides of ODE (1) by \(p^n=\frac {1}{p}\) gives
\begin{align*} p'p &= -p^{2} -y \tag {4} \end{align*}
Let
\begin{align*} v &= p^{1-n} \\ &= p^{2} \tag {5} \end{align*}
Taking derivative of equation (5) w.r.t \(y\) gives
\begin{align*} v' &= 2 pp' \tag {6} \end{align*}
Substituting equations (5) and (6) into equation (4) gives
\begin{align*} \frac {v^{\prime }\left (y \right )}{2}&= -v \left (y \right )-y\\ v' &= -2 v -2 y \tag {7} \end{align*}
The above now is a linear ODE in \(v \left (y \right )\) which is now solved.
In canonical form a linear first order is
\begin{align*} v^{\prime }\left (y \right ) + q(y)v \left (y \right ) &= p(y) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(y) &=2\\ p(y) &=-2 y \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dy}}\\ &= {\mathrm e}^{\int 2d y}\\ &= {\mathrm e}^{2 y} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}y}}\left ( \mu v\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}y}}\left ( \mu v\right ) &= \left (\mu \right ) \left (-2 y\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}y}} \left (v \,{\mathrm e}^{2 y}\right ) &= \left ({\mathrm e}^{2 y}\right ) \left (-2 y\right ) \\
\mathrm {d} \left (v \,{\mathrm e}^{2 y}\right ) &= \left (-2 y \,{\mathrm e}^{2 y}\right )\, \mathrm {d} y \\
\end{align*}
Integrating gives
\begin{align*} v \,{\mathrm e}^{2 y}&= \int {-2 y \,{\mathrm e}^{2 y} \,dy} \\ &=-\frac {\left (2 y -1\right ) {\mathrm e}^{2 y}}{2} + c_1 \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{2 y}\) gives the final solution
\[ v \left (y \right ) = -y +\frac {1}{2}+c_1 \,{\mathrm e}^{-2 y} \]
The substitution \(v = p^{1-n}\) is
now used to convert the above solution back to \(p\) which results in
\[
p^{2} = -y +\frac {1}{2}+c_1 \,{\mathrm e}^{-2 y}
\]
Solving for \(p\) from the
above solution(s) gives (after possible removing of solutions that do not verify)
\begin{align*} p&=-\frac {\sqrt {2+4 c_1 \,{\mathrm e}^{-2 y}-4 y}}{2}\\ p&=\frac {\sqrt {2+4 c_1 \,{\mathrm e}^{-2 y}-4 y}}{2} \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 } = -\frac {\sqrt {2+4 c_1 \,{\mathrm e}^{-2 y}-4 y}}{2} \end{align*}
Since initial conditions \(\left (x_0,y_0\right ) \) are given, then the result can be written as Since unable to evaluate
the integral, and no initial conditions are given, then the result becomes
\[ \int _{}^{y}-\frac {2}{\sqrt {2+4 c_1 \,{\mathrm e}^{-2 \tau }-4 \tau }}d \tau = x +c_2 \]
Singular solutions
are found by solving
\begin{align*} -\frac {\sqrt {2+4 c_1 \,{\mathrm e}^{-2 y}-4 y}}{2}&= 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 = \frac {\operatorname {LambertW}\left (2 c_1 \,{\mathrm e}^{-1}\right )}{2}+\frac {1}{2} \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 } = \frac {\sqrt {2+4 c_1 \,{\mathrm e}^{-2 y}-4 y}}{2} \end{align*}
Since initial conditions \(\left (x_0,y_0\right ) \) are given, then the result can be written as Since unable to evaluate
the integral, and no initial conditions are given, then the result becomes
\[ \int _{}^{y}\frac {2}{\sqrt {2+4 c_1 \,{\mathrm e}^{-2 \tau }-4 \tau }}d \tau = x +c_3 \]
Singular solutions
are found by solving
\begin{align*} \frac {\sqrt {2+4 c_1 \,{\mathrm e}^{-2 y}-4 y}}{2}&= 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 = \frac {\operatorname {LambertW}\left (2 c_1 \,{\mathrm e}^{-1}\right )}{2}+\frac {1}{2} \end{align*}
Will add steps showing solving for IC soon.
The solution
\[
y = \frac {\operatorname {LambertW}\left (2 c_1 \,{\mathrm e}^{-1}\right )}{2}+\frac {1}{2}
\]
was found not to satisfy the ode or the IC. Hence it is removed.
1.23.2 Maple step by step solution
1.23.3 Maple trace
Methods for second order ODEs:
1.23.4 Maple dsolve solution
Solving time : 0.014
(sec)
Leaf size : 61
dsolve(diff(diff(y(x),x),x)+diff(y(x),x)^2+y(x) = 0,
y(x),singsol=all)
\begin{align*}
-2 \left (\int _{}^{y}\frac {1}{\sqrt {2+4 \,{\mathrm e}^{-2 \textit {\_a}} c_1 -4 \textit {\_a}}}d \textit {\_a} \right )-x -c_2 &= 0 \\
2 \left (\int _{}^{y}\frac {1}{\sqrt {2+4 \,{\mathrm e}^{-2 \textit {\_a}} c_1 -4 \textit {\_a}}}d \textit {\_a} \right )-x -c_2 &= 0 \\
\end{align*}
1.23.5 Mathematica DSolve solution
Solving time : 0.746
(sec)
Leaf size : 272
DSolve[{D[y[x],{x,2}]+(D[y[x],x])^2+y[x]==0,{}},
y[x],x,IncludeSingularSolutions->True]
\begin{align*}
y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}-\frac {\sqrt {2}}{\sqrt {2 e^{-2 K[1]} c_1-2 K[1]+1}}dK[1]\&\right ][x+c_2] \\
y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {\sqrt {2}}{\sqrt {2 e^{-2 K[2]} c_1-2 K[2]+1}}dK[2]\&\right ][x+c_2] \\
y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}-\frac {\sqrt {2}}{\sqrt {2 e^{-2 K[1]} (-c_1)-2 K[1]+1}}dK[1]\&\right ][x+c_2] \\
y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}-\frac {\sqrt {2}}{\sqrt {2 e^{-2 K[1]} c_1-2 K[1]+1}}dK[1]\&\right ][x+c_2] \\
y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {\sqrt {2}}{\sqrt {2 e^{-2 K[2]} (-c_1)-2 K[2]+1}}dK[2]\&\right ][x+c_2] \\
y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {\sqrt {2}}{\sqrt {2 e^{-2 K[2]} c_1-2 K[2]+1}}dK[2]\&\right ][x+c_2] \\
\end{align*}