Internal problem ID [12270]
Internal file name [OUTPUT/10923_Thursday_September_28_2023_01_09_00_AM_30179084/index.tex
]
Book: APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A.
Dobrushkin. CRC Press 2015
Section: Chapter 4, Second and Higher Order Linear Differential Equations. Problems page
221
Problem number: Problem 19(c).
ODE order: 2.
ODE degree: 1.
The type(s) of ODE detected by this program : "second_order_integrable_as_is"
Maple gives the following as the ode type
[[_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_xy]]
\[ \boxed {\left (x \cos \left (y\right )+\sin \left (x \right )\right ) y^{\prime \prime }-x {y^{\prime }}^{2} \sin \left (y\right )+2 \left (\cos \left (y\right )+\cos \left (x \right )\right ) y^{\prime }-y \sin \left (x \right )=0} \]
Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (\left (x \cos \left (y\right )+\sin \left (x \right )\right ) y^{\prime \prime }+\left (-x \sin \left (y\right ) y^{\prime }+2 \cos \left (y\right )+2 \cos \left (x \right )\right ) y^{\prime }-y \sin \left (x \right )\right )d x &= 0 \\ \sin \left (y\right )+y \cos \left (x \right )+\left (x \cos \left (y\right )+\sin \left (x \right )\right ) y^{\prime } = c_{1} \end {align*}
Which is now solved for \(y\).
Entering Exact first order ODE solver. (Form one type)
To solve an ode of the form\begin {equation} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}=0\tag {A} \end {equation} We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives\[ \frac {d}{dx}\phi \left ( x,y\right ) =0 \] Hence\begin {equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B} \end {equation} Comparing (A,B) shows that\begin {align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end {align*}
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\] If the above condition is satisfied, then the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is \[ M(x,y) \mathop {\mathrm {d}x}+ N(x,y) \mathop {\mathrm {d}y}=0 \tag {1A} \] Therefore \begin {align*} \left (x \cos \left (y \right )+\sin \left (x \right )\right )\mathop {\mathrm {d}y} &= \left (-\sin \left (y \right )-\cos \left (x \right ) y +c_{1}\right )\mathop {\mathrm {d}x}\\ \left (\cos \left (x \right ) y +\sin \left (y \right )-c_{1}\right )\mathop {\mathrm {d}x} + \left (x \cos \left (y \right )+\sin \left (x \right )\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end {align*}
Comparing (1A) and (2A) shows that \begin {align*} M(x,y) &= \cos \left (x \right ) y +\sin \left (y \right )-c_{1}\\ N(x,y) &= x \cos \left (y \right )+\sin \left (x \right ) \end {align*}
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied \[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial x} \] Using result found above gives \begin {align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (\cos \left (x \right ) y +\sin \left (y \right )-c_{1}\right )\\ &= \cos \left (y \right )+\cos \left (x \right ) \end {align*}
And \begin {align*} \frac {\partial N}{\partial x} &= \frac {\partial }{\partial x} \left (x \cos \left (y \right )+\sin \left (x \right )\right )\\ &= \cos \left (y \right )+\cos \left (x \right ) \end {align*}
Since \(\frac {\partial M}{\partial y}= \frac {\partial N}{\partial x}\), then the ODE is exact The following equations are now set up to solve for the function \(\phi \left (x,y\right )\) \begin {align*} \frac {\partial \phi }{\partial x } &= M\tag {1} \\ \frac {\partial \phi }{\partial y } &= N\tag {2} \end {align*}
Integrating (1) w.r.t. \(x\) gives \begin{align*} \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int M\mathop {\mathrm {d}x} \\ \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int \cos \left (x \right ) y +\sin \left (y \right )-c_{1}\mathop {\mathrm {d}x} \\ \tag{3} \phi &= \sin \left (x \right ) y -x \left (c_{1} -\sin \left (y \right )\right )+ f(y) \\ \end{align*} Where \(f(y)\) is used for the constant of integration since \(\phi \) is a function of both \(x\) and \(y\). Taking derivative of equation (3) w.r.t \(y\) gives \begin{equation} \tag{4} \frac {\partial \phi }{\partial y} = x \cos \left (y \right )+\sin \left (x \right )+f'(y) \end{equation} But equation (2) says that \(\frac {\partial \phi }{\partial y} = x \cos \left (y \right )+\sin \left (x \right )\). Therefore equation (4) becomes \begin{equation} \tag{5} x \cos \left (y \right )+\sin \left (x \right ) = x \cos \left (y \right )+\sin \left (x \right )+f'(y) \end{equation} Solving equation (5) for \( f'(y)\) gives \[ f'(y) = 0 \] Therefore \[ f(y) = c_{2} \] Where \(c_{2}\) is constant of integration. Substituting this result for \(f(y)\) into equation (3) gives \(\phi \) \[ \phi = \sin \left (x \right ) y -x \left (c_{1} -\sin \left (y \right )\right )+ c_{2} \] But since \(\phi \) itself is a constant function, then let \(\phi =c_{3}\) where \(c_{3}\) is new constant and combining \(c_{2}\) and \(c_{3}\) constants into new constant \(c_{2}\) gives the solution as \[ c_{2} = \sin \left (x \right ) y -x \left (c_{1} -\sin \left (y \right )\right ) \]
The solution(s) found are the following \begin{align*} \tag{1} y \sin \left (x \right )-x \left (c_{1} -\sin \left (y\right )\right ) &= c_{2} \\ \end{align*}
Verification of solutions
\[ y \sin \left (x \right )-x \left (c_{1} -\sin \left (y\right )\right ) = c_{2} \] Verified OK.
Writing the ode as \[ \left (x \cos \left (y\right )+\sin \left (x \right )\right ) y^{\prime \prime }+\left (-x \sin \left (y\right ) y^{\prime }+2 \cos \left (y\right )+2 \cos \left (x \right )\right ) y^{\prime }-y \sin \left (x \right ) = 0 \] Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (\left (x \cos \left (y\right )+\sin \left (x \right )\right ) y^{\prime \prime }+\left (-x \sin \left (y\right ) y^{\prime }+2 \cos \left (y\right )+2 \cos \left (x \right )\right ) y^{\prime }-y \sin \left (x \right )\right )d x &= 0 \\ \sin \left (y\right )+y \cos \left (x \right )+\left (x \cos \left (y\right )+\sin \left (x \right )\right ) y^{\prime } = c_{1} \end {align*}
Which is now solved for \(y\).
Entering Exact first order ODE solver. (Form one type)
To solve an ode of the form\begin {equation} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}=0\tag {A} \end {equation} We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives\[ \frac {d}{dx}\phi \left ( x,y\right ) =0 \] Hence\begin {equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B} \end {equation} Comparing (A,B) shows that\begin {align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end {align*}
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\] If the above condition is satisfied, then the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is \[ M(x,y) \mathop {\mathrm {d}x}+ N(x,y) \mathop {\mathrm {d}y}=0 \tag {1A} \] Therefore \begin {align*} \left (x \cos \left (y \right )+\sin \left (x \right )\right )\mathop {\mathrm {d}y} &= \left (-\sin \left (y \right )-\cos \left (x \right ) y +c_{1}\right )\mathop {\mathrm {d}x}\\ \left (\cos \left (x \right ) y +\sin \left (y \right )-c_{1}\right )\mathop {\mathrm {d}x} + \left (x \cos \left (y \right )+\sin \left (x \right )\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end {align*}
Comparing (1A) and (2A) shows that \begin {align*} M(x,y) &= \cos \left (x \right ) y +\sin \left (y \right )-c_{1}\\ N(x,y) &= x \cos \left (y \right )+\sin \left (x \right ) \end {align*}
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied \[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial x} \] Using result found above gives \begin {align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (\cos \left (x \right ) y +\sin \left (y \right )-c_{1}\right )\\ &= \cos \left (y \right )+\cos \left (x \right ) \end {align*}
And \begin {align*} \frac {\partial N}{\partial x} &= \frac {\partial }{\partial x} \left (x \cos \left (y \right )+\sin \left (x \right )\right )\\ &= \cos \left (y \right )+\cos \left (x \right ) \end {align*}
Since \(\frac {\partial M}{\partial y}= \frac {\partial N}{\partial x}\), then the ODE is exact The following equations are now set up to solve for the function \(\phi \left (x,y\right )\) \begin {align*} \frac {\partial \phi }{\partial x } &= M\tag {1} \\ \frac {\partial \phi }{\partial y } &= N\tag {2} \end {align*}
Integrating (1) w.r.t. \(x\) gives \begin{align*} \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int M\mathop {\mathrm {d}x} \\ \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int \cos \left (x \right ) y +\sin \left (y \right )-c_{1}\mathop {\mathrm {d}x} \\ \tag{3} \phi &= \sin \left (x \right ) y -x \left (c_{1} -\sin \left (y \right )\right )+ f(y) \\ \end{align*} Where \(f(y)\) is used for the constant of integration since \(\phi \) is a function of both \(x\) and \(y\). Taking derivative of equation (3) w.r.t \(y\) gives \begin{equation} \tag{4} \frac {\partial \phi }{\partial y} = x \cos \left (y \right )+\sin \left (x \right )+f'(y) \end{equation} But equation (2) says that \(\frac {\partial \phi }{\partial y} = x \cos \left (y \right )+\sin \left (x \right )\). Therefore equation (4) becomes \begin{equation} \tag{5} x \cos \left (y \right )+\sin \left (x \right ) = x \cos \left (y \right )+\sin \left (x \right )+f'(y) \end{equation} Solving equation (5) for \( f'(y)\) gives \[ f'(y) = 0 \] Therefore \[ f(y) = c_{2} \] Where \(c_{2}\) is constant of integration. Substituting this result for \(f(y)\) into equation (3) gives \(\phi \) \[ \phi = \sin \left (x \right ) y -x \left (c_{1} -\sin \left (y \right )\right )+ c_{2} \] But since \(\phi \) itself is a constant function, then let \(\phi =c_{3}\) where \(c_{3}\) is new constant and combining \(c_{2}\) and \(c_{3}\) constants into new constant \(c_{2}\) gives the solution as \[ c_{2} = \sin \left (x \right ) y -x \left (c_{1} -\sin \left (y \right )\right ) \]
The solution(s) found are the following \begin{align*} \tag{1} y \sin \left (x \right )-x \left (c_{1} -\sin \left (y\right )\right ) &= c_{2} \\ \end{align*}
Verification of solutions
\[ y \sin \left (x \right )-x \left (c_{1} -\sin \left (y\right )\right ) = c_{2} \] 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 a quadrature <- quadrature successful <- 2nd order, 2 integrating factors of the form mu(x,y) successful`
✓ Solution by Maple
Time used: 0.047 (sec). Leaf size: 21
dsolve((x*cos(y(x))+sin(x))*diff(y(x),x$2)- x*diff(y(x),x)^2*sin(y(x)) + 2*(cos(y(x))+cos(x))*diff(y(x),x)=y(x)*sin(x),y(x), singsol=all)
\[ -x \sin \left (y \left (x \right )\right )-y \left (x \right ) \sin \left (x \right )-c_{1} x +c_{2} = 0 \]
✓ Solution by Mathematica
Time used: 0.292 (sec). Leaf size: 25
DSolve[(x*Cos[y[x]]+Sin[x])*y''[x]- x*y'[x]^2*Sin[y[x]] + 2*(Cos[y[x]]+Cos[x])*y'[x]==y[x]*Sin[x],y[x],x,IncludeSingularSolutions -> True]
\[ \text {Solve}\left [\sin (y(x))+\frac {y(x) \sin (x)}{x}-\frac {c_1}{x}=c_2,y(x)\right ] \]