2.11 problem 12

2.11.1 Solved as second nonlinear ode solved by Mainardi Lioville method
2.11.2 Maple step by step solution
2.11.3 Maple trace
2.11.4 Maple dsolve solution
2.11.5 Mathematica DSolve solution

Internal problem ID [8100]
Book : Second order enumerated odes
Section : section 2
Problem number : 12
Date solved : Monday, October 21, 2024 at 04:52:14 PM
CAS classification : [_Liouville, [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

Solve

\begin{align*} 3 y^{\prime \prime }+\cos \left (x \right ) y^{\prime }+\sin \left (y\right ) {y^{\prime }}^{2}&=0 \end{align*}

2.11.1 Solved as second nonlinear ode solved by Mainardi Lioville method

Time used: 0.338 (sec)

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) &= \frac {\cos \left (x \right )}{3}\\ g(y) &= \frac {\sin \left (y \right )}{3} \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=\frac {\sin \left (y \right )}{3}\) and \(f=\frac {\cos \left (x \right )}{3}\), then

\begin{align*} \int -g d y &= \int -\frac {\sin \left (y \right )}{3}d y\\ &= \frac {\cos \left (y\right )}{3}\\ \int -f d x &= \int -\frac {\cos \left (x \right )}{3}d x\\ &= -\frac {\sin \left (x \right )}{3} \end{align*}

Substituting the above into Eq(6A) gives

\[ y^{\prime } = c_2 \,{\mathrm e}^{\frac {\cos \left (y\right )}{3}} {\mathrm e}^{-\frac {\sin \left (x \right )}{3}} \]

Which is now solved as first order separable ode. The ode \(y^{\prime } = c_2 \,{\mathrm e}^{\frac {\cos \left (y\right )}{3}} {\mathrm e}^{-\frac {\sin \left (x \right )}{3}}\) is separable as it can be written as

\begin{align*} y^{\prime }&= c_2 \,{\mathrm e}^{\frac {\cos \left (y\right )}{3}} {\mathrm e}^{-\frac {\sin \left (x \right )}{3}}\\ &= f(x) g(y) \end{align*}

Where

\begin{align*} f(x) &= {\mathrm e}^{-\frac {\sin \left (x \right )}{3}} c_2\\ g(y) &= {\mathrm e}^{\frac {\cos \left (y \right )}{3}} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(y)} \,dy} &= \int { f(x) \,dx}\\ \int { {\mathrm e}^{-\frac {\cos \left (y \right )}{3}}\,dy} &= \int { {\mathrm e}^{-\frac {\sin \left (x \right )}{3}} c_2 \,dx}\\ \int _{}^{y}{\mathrm e}^{-\frac {\cos \left (\tau \right )}{3}}d \tau = \int {\mathrm e}^{-\frac {\sin \left (x \right )}{3}} c_2 d x +2 c_3 \end{align*}

Will add steps showing solving for IC soon.

2.11.2 Maple step by step solution

2.11.3 Maple trace
Methods for second order ODEs:
 
2.11.4 Maple dsolve solution

Solving time : 0.004 (sec)
Leaf size : 27

dsolve(3*diff(diff(y(x),x),x)+cos(x)*diff(y(x),x)+sin(y(x))*diff(y(x),x)^2 = 0, 
       y(x),singsol=all)
 
\[ \int _{}^{y}{\mathrm e}^{-\frac {\cos \left (\textit {\_a} \right )}{3}}d \textit {\_a} -c_1 \left (\int {\mathrm e}^{-\frac {\sin \left (x \right )}{3}}d x \right )-c_2 = 0 \]
2.11.5 Mathematica DSolve solution

Solving time : 0.855 (sec)
Leaf size : 47

DSolve[{3*D[y[x],{x,2}]+Cos[x]*D[y[x],x]+Sin[y[x]]*(D[y[x],x])^2==0,{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}e^{-\frac {1}{3} \cos (K[1])}dK[1]\&\right ]\left [\int _1^x-e^{-\frac {1}{3} \sin (K[2])} c_1dK[2]+c_2\right ] \]