7.4 problem 1 (d)

7.4.1 Solving as second order integrable as is ode
7.4.2 Solving as second order ode missing x ode
7.4.3 Solving as type second_order_integrable_as_is (not using ABC version)
7.4.4 Solving as exact nonlinear second order ode ode

Internal problem ID [4842]
Internal file name [OUTPUT/4335_Sunday_June_05_2022_01_02_16_PM_16787110/index.tex]

Book: Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section: Chapter 8, Ordinary differential equations. Section 7. Other second-Order equations. page 435
Problem number: 1 (d).
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], _Lagerstrom, [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

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

7.4.1 Solving as second order integrable as is ode

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

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

Solving for \(y\) gives these solutions \begin {align*} y_1&=\tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right ) \sqrt {c_{1}}\, \sqrt {2} \end {align*}

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

Looking at the above solution \begin {align*} y = \tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right ) \sqrt {c_{1}}\, \sqrt {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 = \frac {\left ({\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}-1\right ) \sqrt {2}\, \sqrt {c_{1}}}{{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}+1}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = c_{1} \left (1-\tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right )^{2}\right ) \end {align*}

substituting \(y^{\prime } = 2\) and \(x = 0\) in the above gives \begin {align*} 2 = \frac {4 \,{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}} c_{1}}{{\mathrm e}^{2 c_{2} \sqrt {2}\, \sqrt {c_{1}}}+2 \,{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}+1}\tag {2A} \end {align*}

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

Substituting these values back in above solution results in \begin {align*} y = \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \\ \end{align*}

Figure 177: Solution plot

Verification of solutions

\[ y = \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \] Verified OK.

7.4.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 )+y p \left (y \right ) = 0 \end {align*}

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

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

The solutions are \begin {align*} c_{1} = 2 \end {align*}

Trying the constant \begin {align*} c_{1} = 2 \end {align*}

Substituting this in the general solution gives \begin {align*} p \left (y \right )&=-\frac {y^{2}}{2}+2 \end {align*}

The constant \(c_{1} = 2\) gives valid solution.

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 {y^{2}}{2}+2 \end {align*}

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

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

The solutions are \begin {align*} c_{2} = 0 \end {align*}

Trying the constant \begin {align*} c_{2} = 0 \end {align*}

Substituting \(c_{2}\) found above in the general solution gives \begin {align*} \operatorname {arctanh}\left (\frac {y}{2}\right ) = x \end {align*}

The constant \(c_{2} = 0\) gives valid solution.

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

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= 2 \tanh \left (x \right ) \\ \end{align*}

Figure 178: Solution plot

Verification of solutions

\[ y = 2 \tanh \left (x \right ) \] Verified OK.

7.4.3 Solving as type second_order_integrable_as_is (not using ABC version)

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

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

Solving for \(y\) gives these solutions \begin {align*} y_1&=\tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right ) \sqrt {c_{1}}\, \sqrt {2} \end {align*}

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

Looking at the above solution \begin {align*} y = \tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right ) \sqrt {c_{1}}\, \sqrt {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 = \frac {\left ({\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}-1\right ) \sqrt {2}\, \sqrt {c_{1}}}{{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}+1}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = c_{1} \left (1-\tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right )^{2}\right ) \end {align*}

substituting \(y^{\prime } = 2\) and \(x = 0\) in the above gives \begin {align*} 2 = \frac {4 \,{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}} c_{1}}{{\mathrm e}^{2 c_{2} \sqrt {2}\, \sqrt {c_{1}}}+2 \,{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}+1}\tag {2A} \end {align*}

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

Substituting these values back in above solution results in \begin {align*} y = \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \\ \end{align*}

Figure 179: Solution plot

Verification of solutions

\[ y = \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \] Verified OK.

7.4.4 Solving as exact nonlinear second order ode ode

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

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

Looking at the the ode given we see that \begin {align*} a_2 &= 1\\ a_1 &= y\\ 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 y'} + \int {a_1\,d y} + \int {a_0\,d x} &= c_{1}\\ \int {1\,d y'} + \int {y\,d y} + \int {0\,d x} &= c_{1} \end {align*}

Which results in \begin {align*} \frac {y^{2}}{2}+y^{\prime } = c_{1} \end {align*}

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

Solving for \(y\) gives these solutions \begin {align*} y_1&=\tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right ) \sqrt {c_{1}}\, \sqrt {2} \end {align*}

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

Looking at the above solution \begin {align*} y = \tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right ) \sqrt {c_{1}}\, \sqrt {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 = \frac {\left ({\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}-1\right ) \sqrt {2}\, \sqrt {c_{1}}}{{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}+1}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = c_{1} \left (1-\tanh \left (\frac {\sqrt {c_{1}}\, \left (x +c_{2} \right ) \sqrt {2}}{2}\right )^{2}\right ) \end {align*}

substituting \(y^{\prime } = 2\) and \(x = 0\) in the above gives \begin {align*} 2 = \frac {4 \,{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}} c_{1}}{{\mathrm e}^{2 c_{2} \sqrt {2}\, \sqrt {c_{1}}}+2 \,{\mathrm e}^{c_{2} \sqrt {2}\, \sqrt {c_{1}}}+1}\tag {2A} \end {align*}

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

Substituting these values back in above solution results in \begin {align*} y = \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \\ \end{align*}

Figure 180: Solution plot

Verification of solutions

\[ y = \frac {2 \,{\mathrm e}^{2 x}-2}{{\mathrm e}^{2 x}+1} \] Verified OK.

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*_b(_a) = 0, _b(_a), HINT = [[_a, 2*_b]]`   *** Sublevel 2 *** 
   symmetry methods on request 
`, `1st order, trying reduction of order with given symmetries:`[_a, 2*_b]
 

Solution by Maple

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

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

\[ y \left (x \right ) = 2 \tanh \left (x \right ) \]

Solution by Mathematica

Time used: 10.835 (sec). Leaf size: 9

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

\[ y(x)\to 2 \tanh (x) \]