2.9 problem 10

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

Internal problem ID [7450]
Internal file name [OUTPUT/6417_Sunday_June_05_2022_04_51_32_PM_3199463/index.tex]

Book: Second order enumerated odes
Section: section 2
Problem number: 10.
ODE order: 2.
ODE degree: 1.

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

Maple gives the following as the ode type

[_Liouville, [_2nd_order, _reducible, _mu_xy]]

\[ \boxed {y^{\prime \prime }+y^{\prime } x +y {y^{\prime }}^{2}=0} \]

2.9.1 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) &= x\\ g(y) &= y \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=y\) and \(f=x\), then \begin {align*} \int -g d y &= \int -y d y\\ &= -\frac {y^{2}}{2}\\ \int -f d x &= \int -x d x\\ &= -\frac {x^{2}}{2} \end {align*}

Substituting the above into Eq(6A) gives \[ y^{\prime } = c_{2} {\mathrm e}^{-\frac {y^{2}}{2}} {\mathrm e}^{-\frac {x^{2}}{2}} \] 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}^{-\frac {y^{2}}{2}} {\mathrm e}^{-\frac {x^{2}}{2}} \end {align*}

Where \(f(x)=c_{2} {\mathrm e}^{-\frac {x^{2}}{2}}\) and \(g(y)={\mathrm e}^{-\frac {y^{2}}{2}}\). Integrating both sides gives \begin{align*} \frac {1}{{\mathrm e}^{-\frac {y^{2}}{2}}} \,dy &= c_{2} {\mathrm e}^{-\frac {x^{2}}{2}} \,d x \\ \int { \frac {1}{{\mathrm e}^{-\frac {y^{2}}{2}}} \,dy} &= \int {c_{2} {\mathrm e}^{-\frac {x^{2}}{2}} \,d x} \\ \frac {\sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\frac {\sqrt {2}\, y}{2}\right )}{2}&=\frac {c_{2} \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right )}{2}+c_{3} \\ \end{align*} The solution is \[ \frac {\sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\frac {\sqrt {2}\, y}{2}\right )}{2}-\frac {c_{2} \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right )}{2}-c_{3} = 0 \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} \frac {\sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\frac {\sqrt {2}\, y}{2}\right )}{2}-\frac {c_{2} \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right )}{2}-c_{3} &= 0 \\ \end{align*}

Verification of solutions

\[ \frac {\sqrt {2}\, \sqrt {\pi }\, \operatorname {erfi}\left (\frac {\sqrt {2}\, y}{2}\right )}{2}-\frac {c_{2} \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right )}{2}-c_{3} = 0 \] Verified OK.

Maple trace

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

Solution by Maple

Time used: 0.0 (sec). Leaf size: 40

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

\[ y \left (x \right ) = -i \operatorname {RootOf}\left (i \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right ) c_{1} +i \sqrt {2}\, c_{2} -\operatorname {erf}\left (\textit {\_Z} \right ) \sqrt {\pi }\right ) \sqrt {2} \]

Solution by Mathematica

Time used: 0.088 (sec). Leaf size: 44

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

\[ y(x)\to -i \sqrt {2} \text {erf}^{-1}\left (i \left (\sqrt {\frac {2}{\pi }} c_2-c_1 \text {erf}\left (\frac {x}{\sqrt {2}}\right )\right )\right ) \]