1.27 problem Problem 14.31

1.27.1 Solving as second order ode missing y ode
1.27.2 Solving as second order ode missing x ode
1.27.3 Solving as second order nonlinear solved by mainardi lioville method ode
1.27.4 Maple step by step solution

Internal problem ID [2512]
Internal file name [OUTPUT/2004_Sunday_June_05_2022_02_43_53_AM_6454647/index.tex]

Book: Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section: Chapter 14, First order ordinary differential equations. 14.4 Exercises, page 490
Problem number: Problem 14.31.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second_order_ode_missing_x", "second_order_ode_missing_y", "second_order_nonlinear_solved_by_mainardi_lioville_method"

Maple gives the following as the ode type

[[_2nd_order, _missing_x], _Liouville, [_2nd_order, _reducible, _mu_xy]]

\[ \boxed {y^{\prime \prime }+{y^{\prime }}^{2}+y^{\prime }=0} \] With initial conditions \begin {align*} [y \left (0\right ) = 0] \end {align*}

1.27.1 Solving as second order ode missing y ode

This is second order ode with missing dependent variable \(y\). Let \begin {align*} p(x) &= y^{\prime } \end {align*}

Then \begin {align*} p'(x) &= y^{\prime \prime } \end {align*}

Hence the ode becomes \begin {align*} p^{\prime }\left (x \right )+\left (p \left (x \right )+1\right ) p \left (x \right ) = 0 \end {align*}

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

Solving for \(p\) gives these solutions \begin {align*} p_1&=\frac {1}{{\mathrm e}^{x +c_{1}}-1}\\ &=\frac {1}{{\mathrm e}^{x} c_{1} -1} \end {align*}

Since \(p=y^{\prime }\) then the new first order ode to solve is \begin {align*} y^{\prime } = \frac {1}{{\mathrm e}^{x} c_{1} -1} \end {align*}

Integrating both sides gives \begin {align*} y &= \int { \frac {1}{{\mathrm e}^{x} c_{1} -1}\,\mathop {\mathrm {d}x}}\\ &= -x +\ln \left ({\mathrm e}^{x} c_{1} -1\right )+c_{2} \end {align*}

Initial conditions are used to solve for \(c_{1}\). Substituting \(x=0\) and \(y=0\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} 0 = \ln \left (c_{1} -1\right )+c_{2} \end {align*}

The solutions are \begin {align*} c_{1} = \left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}} \end {align*}

Trying the constant \begin {align*} c_{1} = \left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}} \end {align*}

Substituting this in the general solution gives \begin {align*} y&=-x +\ln \left (\left ({\mathrm e}^{x +c_{2}}+{\mathrm e}^{x}-{\mathrm e}^{c_{2}}\right ) {\mathrm e}^{-c_{2}}\right )+c_{2} \end {align*}

But this does not satisfy the initial conditions. Hence no solution can be found. The constant \(c_{1} = \left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}}\) does not give valid solution.

Solving for \(c_{1}\) gives \[ c_{1} = c_{1} \] Substituting \(c_{1}\) found above in the general solution gives \begin {align*} y&=-x +\ln \left ({\mathrm e}^{x} c_{1} -1\right )+c_{2} \end {align*}

Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} y = -x +\ln \left ({\mathrm e}^{x} c_{1} -1\right )+c_{2} \tag {1} \end {align*}

Initial conditions are now substituted in the above solution. This will generate the required equations to solve for the integration constants. substituting \(y = 0\) and \(x = 0\) in the above gives \begin {align*} 0 = \ln \left (c_{1} -1\right )+c_{2}\tag {1A} \end {align*}

Equations {1A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{2}&=-\ln \left (c_{1} -1\right ) \end {align*}

Substituting these values back in above solution results in \begin {align*} y = -x +\ln \left ({\mathrm e}^{x} c_{1} -1\right )-\ln \left (c_{1} -1\right ) \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -x +\ln \left ({\mathrm e}^{x} c_{1} -1\right )-\ln \left (c_{1} -1\right ) \\ \end{align*}

Verification of solutions

\[ y = -x +\ln \left ({\mathrm e}^{x} c_{1} -1\right )-\ln \left (c_{1} -1\right ) \] Verified OK.

1.27.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 \(y\) an independent variable. Using \begin {align*} y' &= p(y) \end {align*}

Then \begin {align*} y'' &= \frac {dp}{dx}\\ &= \frac {dy}{dx} \frac {dp}{dy}\\ &= 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 )+\left (p \left (y \right )+1\right ) p \left (y \right ) = 0 \end {align*}

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

Solving for \(p\) gives these solutions \begin {align*} p_1&={\mathrm e}^{-y -c_{1}}-1\\ &=\frac {{\mathrm e}^{-y}}{c_{1}}-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 } = \frac {{\mathrm e}^{-y}}{c_{1}}-1 \end {align*}

Integrating both sides gives \begin {align*} \int -\frac {c_{1} {\mathrm e}^{y}}{c_{1} {\mathrm e}^{y}-1}d y &= \int {dx}\\ -\ln \left (c_{1} {\mathrm e}^{y}-1\right )&= x +c_{2} \end {align*}

Initial conditions are used to solve for \(c_{1}\). Substituting \(x=0\) and \(y=0\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} -\ln \left (c_{1} -1\right ) = c_{2} \end {align*}

The solutions are \begin {align*} c_{1} = \left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}} \end {align*}

Trying the constant \begin {align*} c_{1} = \left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}} \end {align*}

Substituting \(c_{1}\) found above in the general solution gives \begin {align*} -\ln \left (\left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}} {\mathrm e}^{y}-1\right ) = x +c_{2} \end {align*}

The constant \(c_{1} = \left ({\mathrm e}^{c_{2}}+1\right ) {\mathrm e}^{-c_{2}}\) does not give valid solution.

Solving for \(c_{1}\) gives \[ c_{1} = c_{1} \] Substituting \(c_{1}\) found above in the general solution gives \[ -\ln \left (c_{1} {\mathrm e}^{y}-1\right ) = x +c_{2} \] Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} y = \ln \left (\frac {{\mathrm e}^{-x -c_{2}}+1}{c_{1}}\right ) \tag {1} \end {align*}

Initial conditions are now substituted in the above solution. This will generate the required equations to solve for the integration constants. substituting \(y = 0\) and \(x = 0\) in the above gives \begin {align*} 0 = \ln \left (\frac {1+{\mathrm e}^{-c_{2}}}{c_{1}}\right )\tag {1A} \end {align*}

Equations {1A} are now solved for \(\{c_{1}, c_{2}\}\). There is no solution for the constants of integrations. This solution is removed.

Verification of solutions N/A

1.27.3 Solving as second order nonlinear solved by mainardi lioville method ode

The ode has the Liouville form given by \begin {align*} y^{\prime \prime }+ f(x) y^{\prime } + g(y) {y^{\prime }}^{2} &= 0 \tag {1A} \end {align*}

Where in this problem \begin {align*} f(x) &= 1\\ g(y) &= 1 \end {align*}

Dividing through by \(y^{\prime }\) then Eq (1A) becomes \begin {align*} \frac {y^{\prime \prime }}{y^{\prime }}+ f + g y^{\prime } &= 0 \tag {2A} \end {align*}

But the first term in Eq (2A) can be written as \begin {align*} \frac {y^{\prime \prime }}{y^{\prime }}&= \frac {d}{dx} \ln \left ( y^{\prime } \right )\tag {3A} \end {align*}

And the last term in Eq (2A) can be written as \begin {align*} g \frac {dy}{dx}&= \left ( \frac {d}{dy} \int g d y\right ) \frac {dy}{dx} \\ &= \frac {d}{dx} \int g d y\tag {4A} \end {align*}

Substituting (3A,4A) back into (2A) gives \begin {align*} \frac {d}{dx} \ln \left ( y^{\prime } \right ) + \frac {d}{dx} \int g d y &= -f \tag {5A} \end {align*}

Integrating the above w.r.t. \(x\) gives \begin {align*} \ln \left ( y^{\prime } \right ) + \int g d y &= - \int f d x + c_{1} \end {align*}

Where \(c_1\) is arbitrary constant. Taking the exponential of the above gives \begin {align*} y^{\prime } &= c_{2} e^{\int -g d y}\, e^{\int -f d x}\tag {6A} \end {align*}

Where \(c_{2}\) is a new arbitrary constant. But since \(g=1\) and \(f=1\), then \begin {align*} \int -g d y &= \int \left (-1\right )d y\\ &= -y\\ \int -f d x &= \int \left (-1\right )d x\\ &= -x \end {align*}

Substituting the above into Eq(6A) gives \[ y^{\prime } = c_{2} {\mathrm e}^{-y} {\mathrm e}^{-x} \] Which is now solved as first order separable ode. In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= c_{2} {\mathrm e}^{-y} {\mathrm e}^{-x} \end {align*}

Where \(f(x)=c_{2} {\mathrm e}^{-x}\) and \(g(y)={\mathrm e}^{-y}\). Integrating both sides gives \begin{align*} \frac {1}{{\mathrm e}^{-y}} \,dy &= c_{2} {\mathrm e}^{-x} \,d x \\ \int { \frac {1}{{\mathrm e}^{-y}} \,dy} &= \int {c_{2} {\mathrm e}^{-x} \,d x} \\ {\mathrm e}^{y}&=-c_{2} {\mathrm e}^{-x}+c_{3} \\ \end{align*} The solution is \[ {\mathrm e}^{y}+c_{2} {\mathrm e}^{-x}-c_{3} = 0 \] Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} {\mathrm e}^{y}+c_{2} {\mathrm e}^{-x}-c_{3} = 0 \tag {1} \end {align*}

Initial conditions are now substituted in the above solution. This will generate the required equations to solve for the integration constants. substituting \(y = 0\) and \(x = 0\) in the above gives \begin {align*} 1+c_{2} -c_{3} = 0\tag {1A} \end {align*}

Equations {1A} are now solved for \(\{c_{2}, c_{3}\}\). Solving for the constants gives \begin {align*} c_{2}&=-1+c_{3} \end {align*}

Substituting these values back in above solution results in \begin {align*} {\mathrm e}^{-x} c_{3} +{\mathrm e}^{y}-{\mathrm e}^{-x}-c_{3} = 0 \end {align*}

Which can be written as \[ {\mathrm e}^{y}+\left (-1+c_{3} \right ) {\mathrm e}^{-x}-c_{3} = 0 \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} {\mathrm e}^{y}+\left (-1+c_{3} \right ) {\mathrm e}^{-x}-c_{3} &= 0 \\ \end{align*}

Verification of solutions

\[ {\mathrm e}^{y}+\left (-1+c_{3} \right ) {\mathrm e}^{-x}-c_{3} = 0 \] Verified OK.

1.27.4 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime \prime }+\left (y^{\prime }+1\right ) y^{\prime }=0, y \left (0\right )=0\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & y^{\prime \prime } \\ \bullet & {} & \textrm {Make substitution}\hspace {3pt} u =y^{\prime }\hspace {3pt}\textrm {to reduce order of ODE}\hspace {3pt} \\ {} & {} & u^{\prime }\left (x \right )+\left (u \left (x \right )+1\right ) u \left (x \right )=0 \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & u^{\prime }\left (x \right )=-\left (u \left (x \right )+1\right ) u \left (x \right ) \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {u^{\prime }\left (x \right )}{\left (u \left (x \right )+1\right ) u \left (x \right )}=-1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {u^{\prime }\left (x \right )}{\left (u \left (x \right )+1\right ) u \left (x \right )}d x =\int \left (-1\right )d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (u \left (x \right )\right )-\ln \left (u \left (x \right )+1\right )=-x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} u \left (x \right ) \\ {} & {} & u \left (x \right )=-\frac {{\mathrm e}^{-x +c_{1}}}{-1+{\mathrm e}^{-x +c_{1}}} \\ \bullet & {} & \textrm {Solve 1st ODE for}\hspace {3pt} u \left (x \right ) \\ {} & {} & u \left (x \right )=-\frac {{\mathrm e}^{-x +c_{1}}}{-1+{\mathrm e}^{-x +c_{1}}} \\ \bullet & {} & \textrm {Make substitution}\hspace {3pt} u =y^{\prime } \\ {} & {} & y^{\prime }=-\frac {{\mathrm e}^{-x +c_{1}}}{-1+{\mathrm e}^{-x +c_{1}}} \\ \bullet & {} & \textrm {Integrate both sides to solve for}\hspace {3pt} y \\ {} & {} & \int y^{\prime }d x =\int -\frac {{\mathrm e}^{-x +c_{1}}}{-1+{\mathrm e}^{-x +c_{1}}}d x +c_{2} \\ \bullet & {} & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & y=\ln \left (-1+{\mathrm e}^{-x +c_{1}}\right )+c_{2} \end {array} \]

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
<- 2nd_order Liouville successful`
 

Solution by Maple

Time used: 0.032 (sec). Leaf size: 18

dsolve([diff(y(x),x$2)+ (diff(y(x),x))^2+diff(y(x),x)=0,y(0) = 0],y(x), singsol=all)
 

\[ y \left (x \right ) = \ln \left (c_{2} {\mathrm e}^{x}-c_{2} +1\right )-x \]

Solution by Mathematica

Time used: 0.395 (sec). Leaf size: 54

DSolve[{y''[x]+(y'[x])^2+y'[x]==0,y[0]==0},y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \log \left (-e^x\right )-\log \left (e^x\right )-i \pi \\ y(x)\to -\log \left (e^x\right )+\log \left (-e^x+e^{c_1}\right )-\log \left (-1+e^{c_1}\right ) \\ \end{align*}