2.10 problem 11

2.10.1 Solving as second order ode missing y ode
2.10.2 Solving as second order nonlinear solved by mainardi lioville method ode

Internal problem ID [7451]
Internal file name [OUTPUT/6418_Sunday_June_05_2022_04_51_34_PM_21417269/index.tex]

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

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

Maple gives the following as the ode type

[[_2nd_order, _missing_y], _Liouville, [_2nd_order, _reducible, _mu_xy]]

\[ \boxed {y^{\prime \prime }+\sin \left (x \right ) y^{\prime }+{y^{\prime }}^{2}=0} \]

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

Which is now solve for \(p(x)\) as first order ode. Writing the ode as \begin {align*} p^{\prime }\left (x \right )&=-\left (\sin \left (x \right )+p \right ) p\\ p^{\prime }\left (x \right )&= \omega \left ( x,p\right ) \end {align*}

The condition of Lie symmetry is the linearized PDE given by \begin {align*} \eta _{x}+\omega \left ( \eta _{p}-\xi _{x}\right ) -\omega ^{2}\xi _{p}-\omega _{x}\xi -\omega _{p}\eta =0\tag {A} \end {align*}

The type of this ode is known. It is of type Bernoulli. Therefore we do not need to solve the PDE (A), and can just use the lookup table shown below to find \(\xi ,\eta \)

Table 34: Lie symmetry infinitesimal lookup table for known first order ODE’s

ODE class

Form

\(\xi \)

\(\eta \)

linear ode

\(y'=f(x) y(x) +g(x)\)

\(0\)

\(e^{\int fdx}\)

separable ode

\(y^{\prime }=f\left ( x\right ) g\left ( y\right ) \)

\(\frac {1}{f}\)

\(0\)

quadrature ode

\(y^{\prime }=f\left ( x\right ) \)

\(0\)

\(1\)

quadrature ode

\(y^{\prime }=g\left ( y\right ) \)

\(1\)

\(0\)

homogeneous ODEs of Class A

\(y^{\prime }=f\left ( \frac {y}{x}\right ) \)

\(x\)

\(y\)

homogeneous ODEs of Class C

\(y^{\prime }=\left ( a+bx+cy\right ) ^{\frac {n}{m}}\)

\(1\)

\(-\frac {b}{c}\)

homogeneous class D

\(y^{\prime }=\frac {y}{x}+g\left ( x\right ) F\left (\frac {y}{x}\right ) \)

\(x^{2}\)

\(xy\)

First order special form ID 1

\(y^{\prime }=g\left ( x\right ) e^{h\left (x\right ) +by}+f\left ( x\right ) \)

\(\frac {e^{-\int bf\left ( x\right )dx-h\left ( x\right ) }}{g\left ( x\right ) }\)

\(\frac {f\left ( x\right )e^{-\int bf\left ( x\right ) dx-h\left ( x\right ) }}{g\left ( x\right ) }\)

polynomial type ode

\(y^{\prime }=\frac {a_{1}x+b_{1}y+c_{1}}{a_{2}x+b_{2}y+c_{2}}\)

\(\frac {a_{1}b_{2}x-a_{2}b_{1}x-b_{1}c_{2}+b_{2}c_{1}}{a_{1}b_{2}-a_{2}b_{1}}\)

\(\frac {a_{1}b_{2}y-a_{2}b_{1}y-a_{1}c_{2}-a_{2}c_{1}}{a_{1}b_{2}-a_{2}b_{1}}\)

Bernoulli ode

\(y^{\prime }=f\left ( x\right ) y+g\left ( x\right ) y^{n}\)

\(0\)

\(e^{-\int \left ( n-1\right ) f\left ( x\right ) dx}y^{n}\)

Reduced Riccati

\(y^{\prime }=f_{1}\left ( x\right ) y+f_{2}\left ( x\right )y^{2}\)

\(0\)

\(e^{-\int f_{1}dx}\)

The above table shows that \begin {align*} \xi \left (x,p\right ) &=0\\ \tag {A1} \eta \left (x,p\right ) &=p^{2} {\mathrm e}^{-\cos \left (x \right )} \end {align*}

The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( x,p\right ) \to \left ( R,S \right )\) where \(\left ( R,S \right )\) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is \begin {align*} \frac {d x}{\xi } &= \frac {d p}{\eta } = dS \tag {1} \end {align*}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial p}\right ) S(x,p) = 1\). Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable \(R\) in the canonical coordinates, where \(S(R)\). Since \(\xi =0\) then in this special case \begin {align*} R = x \end {align*}

\(S\) is found from \begin {align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{p^{2} {\mathrm e}^{-\cos \left (x \right )}}} dy \end {align*}

Which results in \begin {align*} S&= -\frac {{\mathrm e}^{\cos \left (x \right )}}{p} \end {align*}

Now that \(R,S\) are found, we need to setup the ode in these coordinates. This is done by evaluating \begin {align*} \frac {dS}{dR} &= \frac { S_{x} + \omega (x,p) S_{p} }{ R_{x} + \omega (x,p) R_{p} }\tag {2} \end {align*}

Where in the above \(R_{x},R_{p},S_{x},S_{p}\) are all partial derivatives and \(\omega (x,p)\) is the right hand side of the original ode given by \begin {align*} \omega (x,p) &= -\left (\sin \left (x \right )+p \right ) p \end {align*}

Evaluating all the partial derivatives gives \begin {align*} R_{x} &= 1\\ R_{p} &= 0\\ S_{x} &= \frac {\sin \left (x \right ) {\mathrm e}^{\cos \left (x \right )}}{p}\\ S_{p} &= \frac {{\mathrm e}^{\cos \left (x \right )}}{p^{2}} \end {align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates. \begin {align*} \frac {dS}{dR} &= -{\mathrm e}^{\cos \left (x \right )}\tag {2A} \end {align*}

We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,p\) in terms of \(R,S\) from the result obtained earlier and simplifying. This gives \begin {align*} \frac {dS}{dR} &= -{\mathrm e}^{\cos \left (R \right )} \end {align*}

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates \(R,S\). Integrating the above gives \begin {align*} S \left (R \right ) = \int -{\mathrm e}^{\cos \left (R \right )}d R +c_{1}\tag {4} \end {align*}

To complete the solution, we just need to transform (4) back to \(x,p\) coordinates. This results in \begin {align*} -\frac {{\mathrm e}^{\cos \left (x \right )}}{p \left (x \right )} = \int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1} \end {align*}

Which simplifies to \begin {align*} -\frac {{\mathrm e}^{\cos \left (x \right )}}{p \left (x \right )} = \int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1} \end {align*}

Which gives \begin {align*} p \left (x \right ) = -\frac {{\mathrm e}^{\cos \left (x \right )}}{\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1}} \end {align*}

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

Writing the ode as \begin {align*} y^{\prime }&=-\frac {{\mathrm e}^{\cos \left (x \right )}}{\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1}}\\ y^{\prime }&= \omega \left ( x,y\right ) \end {align*}

The condition of Lie symmetry is the linearized PDE given by \begin {align*} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta =0\tag {A} \end {align*}

The type of this ode is not in the lookup table. To determine \(\xi ,\eta \) then (A) is solved using ansatz. Making bivariate polynomials of degree 1 to use as anstaz gives \begin{align*} \tag{1E} \xi &= x a_{2}+y a_{3}+a_{1} \\ \tag{2E} \eta &= x b_{2}+y b_{3}+b_{1} \\ \end{align*} Where the unknown coefficients are \[ \{a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}\} \] Substituting equations (1E,2E) and \(\omega \) into (A) gives \begin{equation} \tag{5E} b_{2}-\frac {{\mathrm e}^{\cos \left (x \right )} \left (b_{3}-a_{2}\right )}{\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1}}-\frac {{\mathrm e}^{2 \cos \left (x \right )} a_{3}}{\left (\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1} \right )^{2}}-\left (\frac {\sin \left (x \right ) {\mathrm e}^{\cos \left (x \right )}}{\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1}}-\frac {{\mathrm e}^{2 \cos \left (x \right )}}{\left (\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1} \right )^{2}}\right ) \left (x a_{2}+y a_{3}+a_{1}\right ) = 0 \end{equation} Putting the above in normal form gives \[ \frac {-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) x a_{2}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) y a_{3}-{\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) c_{1} x a_{2}-{\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) c_{1} y a_{3}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) a_{1}+{\mathrm e}^{2 \cos \left (x \right )} x a_{2}+{\mathrm e}^{2 \cos \left (x \right )} y a_{3}-{\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) c_{1} a_{1}+\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right )^{2} b_{2}+\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} a_{2}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} b_{3}+2 \left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) c_{1} b_{2}+{\mathrm e}^{2 \cos \left (x \right )} a_{1}-{\mathrm e}^{2 \cos \left (x \right )} a_{3}+{\mathrm e}^{\cos \left (x \right )} c_{1} a_{2}-{\mathrm e}^{\cos \left (x \right )} c_{1} b_{3}+c_{1}^{2} b_{2}}{\left (\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1} \right )^{2}} = 0 \] Setting the numerator to zero gives \begin{equation} \tag{6E} -\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) x a_{2}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) y a_{3}-{\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) c_{1} x a_{2}-{\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) c_{1} y a_{3}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) a_{1}+{\mathrm e}^{2 \cos \left (x \right )} x a_{2}+{\mathrm e}^{2 \cos \left (x \right )} y a_{3}-{\mathrm e}^{\cos \left (x \right )} \sin \left (x \right ) c_{1} a_{1}+\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right )^{2} b_{2}+\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} a_{2}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} b_{3}+2 \left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) c_{1} b_{2}+{\mathrm e}^{2 \cos \left (x \right )} a_{1}-{\mathrm e}^{2 \cos \left (x \right )} a_{3}+{\mathrm e}^{\cos \left (x \right )} c_{1} a_{2}-{\mathrm e}^{\cos \left (x \right )} c_{1} b_{3}+c_{1}^{2} b_{2} = 0 \end{equation} Simplifying the above gives \begin{equation} \tag{6E} \left (-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) x a_{2}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) y a_{3}-c_{1} x a_{2}-c_{1} y a_{3}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) a_{1}-c_{1} a_{1}\right ) \sin \left (x \right ) {\mathrm e}^{\cos \left (x \right )}-{\mathrm e}^{\cos \left (x \right )} c_{1} b_{3}+{\mathrm e}^{2 \cos \left (x \right )} x a_{2}+{\mathrm e}^{2 \cos \left (x \right )} y a_{3}-\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} b_{3}-{\mathrm e}^{2 \cos \left (x \right )} a_{3}+{\mathrm e}^{\cos \left (x \right )} c_{1} a_{2}+\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) {\mathrm e}^{\cos \left (x \right )} a_{2}+{\mathrm e}^{2 \cos \left (x \right )} a_{1}+2 \left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right ) c_{1} b_{2}+c_{1}^{2} b_{2}+\left (\int -{\mathrm e}^{\cos \left (x \right )}d x \right )^{2} b_{2} = 0 \end{equation} Looking at the above PDE shows the following are all the terms with \(\{x, y\}\) in them. \[ \{x, y, \int -{\mathrm e}^{\cos \left (x \right )}d x, \cos \left (x \right ), {\mathrm e}^{2 \cos \left (x \right )}, {\mathrm e}^{\cos \left (x \right )}, \sin \left (x \right )\} \] The following substitution is now made to be able to collect on all terms with \(\{x, y\}\) in them \[ \{x = v_{1}, y = v_{2}, \int -{\mathrm e}^{\cos \left (x \right )}d x = v_{3}, \cos \left (x \right ) = v_{4}, {\mathrm e}^{2 \cos \left (x \right )} = v_{5}, {\mathrm e}^{\cos \left (x \right )} = v_{6}, \sin \left (x \right ) = v_{7}\} \] The above PDE (6E) now becomes \begin{equation} \tag{7E} \left (-c_{1} a_{2} v_{1}-c_{1} a_{3} v_{2}-v_{3} v_{1} a_{2}-v_{3} v_{2} a_{3}-c_{1} a_{1}-v_{3} a_{1}\right ) v_{7} v_{6}-v_{6} c_{1} b_{3}+v_{5} v_{1} a_{2}+v_{5} v_{2} a_{3}-v_{3} v_{6} b_{3}-v_{5} a_{3}+v_{6} c_{1} a_{2}+v_{3} v_{6} a_{2}+v_{5} a_{1}+2 v_{3} c_{1} b_{2}+c_{1}^{2} b_{2}+v_{3}^{2} b_{2} = 0 \end{equation} Collecting the above on the terms \(v_i\) introduced, and these are \[ \{v_{1}, v_{2}, v_{3}, v_{4}, v_{5}, v_{6}, v_{7}\} \] Equation (7E) now becomes \begin{equation} \tag{8E} -a_{2} c_{1} v_{6} v_{7} v_{1}-a_{2} v_{7} v_{6} v_{1} v_{3}+v_{5} v_{1} a_{2}-c_{1} a_{3} v_{6} v_{7} v_{2}-a_{3} v_{7} v_{6} v_{2} v_{3}+v_{5} v_{2} a_{3}+v_{3}^{2} b_{2}-a_{1} v_{6} v_{7} v_{3}+\left (-b_{3}+a_{2}\right ) v_{6} v_{3}+2 v_{3} c_{1} b_{2}+\left (a_{1}-a_{3}\right ) v_{5}-c_{1} a_{1} v_{7} v_{6}+\left (c_{1} a_{2}-c_{1} b_{3}\right ) v_{6}+c_{1}^{2} b_{2} = 0 \end{equation} Setting each coefficients in (8E) to zero gives the following equations to solve \begin {align*} a_{2}&=0\\ a_{3}&=0\\ b_{2}&=0\\ c_{1}^{2} b_{2}&=0\\ -a_{1}&=0\\ -a_{2}&=0\\ -a_{3}&=0\\ -c_{1} a_{1}&=0\\ -c_{1} a_{3}&=0\\ -c_{1} a_{2}&=0\\ 2 b_{2} c_{1}&=0\\ a_{1}-a_{3}&=0\\ -b_{3}+a_{2}&=0\\ c_{1} a_{2}-c_{1} b_{3}&=0 \end {align*}

Solving the above equations for the unknowns gives \begin {align*} a_{1}&=0\\ a_{2}&=0\\ a_{3}&=0\\ b_{1}&=b_{1}\\ b_{2}&=0\\ b_{3}&=0 \end {align*}

Substituting the above solution in the anstaz (1E,2E) (using \(1\) as arbitrary value for any unknown in the RHS) gives \begin{align*} \xi &= 0 \\ \eta &= 1 \\ \end{align*} The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( x,y\right ) \to \left ( R,S \right )\) where \(\left ( R,S \right )\) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is \begin {align*} \frac {d x}{\xi } &= \frac {d y}{\eta } = dS \tag {1} \end {align*}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial y}\right ) S(x,y) = 1\). Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable \(R\) in the canonical coordinates, where \(S(R)\). Since \(\xi =0\) then in this special case \begin {align*} R = x \end {align*}

\(S\) is found from \begin {align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{1}} dy \end {align*}

Which results in \begin {align*} S&= y \end {align*}

Now that \(R,S\) are found, we need to setup the ode in these coordinates. This is done by evaluating \begin {align*} \frac {dS}{dR} &= \frac { S_{x} + \omega (x,y) S_{y} }{ R_{x} + \omega (x,y) R_{y} }\tag {2} \end {align*}

Where in the above \(R_{x},R_{y},S_{x},S_{y}\) are all partial derivatives and \(\omega (x,y)\) is the right hand side of the original ode given by \begin {align*} \omega (x,y) &= -\frac {{\mathrm e}^{\cos \left (x \right )}}{\int -{\mathrm e}^{\cos \left (x \right )}d x +c_{1}} \end {align*}

Evaluating all the partial derivatives gives \begin {align*} R_{x} &= 1\\ R_{y} &= 0\\ S_{x} &= 0\\ S_{y} &= 1 \end {align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates. \begin {align*} \frac {dS}{dR} &= \frac {{\mathrm e}^{\cos \left (x \right )}}{\int {\mathrm e}^{\cos \left (x \right )}d x -c_{1}}\tag {2A} \end {align*}

We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,y\) in terms of \(R,S\) from the result obtained earlier and simplifying. This gives \begin {align*} \frac {dS}{dR} &= \frac {{\mathrm e}^{\cos \left (R \right )}}{\int {\mathrm e}^{\cos \left (R \right )}d R -c_{1}} \end {align*}

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates \(R,S\). Integrating the above gives \begin {align*} S \left (R \right ) = \ln \left (\int {\mathrm e}^{\cos \left (R \right )}d R -c_{1} \right )+c_{2}\tag {4} \end {align*}

To complete the solution, we just need to transform (4) back to \(x,y\) coordinates. This results in \begin {align*} y = \ln \left (\int {\mathrm e}^{\cos \left (x \right )}d x -c_{1} \right )+c_{2} \end {align*}

Which simplifies to \begin {align*} y = \ln \left (\int {\mathrm e}^{\cos \left (x \right )}d x -c_{1} \right )+c_{2} \end {align*}

Which gives \begin {align*} y = \ln \left (\int {\mathrm e}^{\cos \left (x \right )}d x -c_{1} \right )+c_{2} \end {align*}

Summary

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

Verification of solutions

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

2.10.2 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) &= \sin \left (x \right )\\ 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=\sin \left (x \right )\), then \begin {align*} \int -g d y &= \int \left (-1\right )d y\\ &= -y\\ \int -f d x &= \int -\sin \left (x \right )d x\\ &= \cos \left (x \right ) \end {align*}

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

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

Summary

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

Verification of solutions

\[ {\mathrm e}^{y}-\left (\int c_{2} {\mathrm e}^{\cos \left (x \right )}d x \right )-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: 14

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

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

Solution by Mathematica

Time used: 60.089 (sec). Leaf size: 43

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

\[ y(x)\to \int _1^x\frac {e^{\cos (K[2])}}{c_1-\int _1^{K[2]}-e^{\cos (K[1])}dK[1]}dK[2]+c_2 \]