Internal problem ID [11852]
Internal file name [OUTPUT/11862_Saturday_April_13_2024_01_13_09_AM_37230/index.tex
]
Book: Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi.
2004.
Section: Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number: 25.
ODE order: 2.
ODE degree: 1.
The type(s) of ODE detected by this program : "second_order_change_of_variable_on_y_method_1"
Maple gives the following as the ode type
[[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {\sin \left (x \right )^{2} y^{\prime \prime }-2 \sin \left (x \right ) \cos \left (x \right ) y^{\prime }+\left (\cos \left (x \right )^{2}+1\right ) y=\sin \left (x \right )^{3}} \]
This is second order non-homogeneous ODE. Let the solution be \[ y = y_h + y_p \] Where \(y_h\) is the solution to the homogeneous ODE \( A y''(x) + B y'(x) + C y(x) = 0\), and \(y_p\) is a particular solution to the non-homogeneous ODE \(A y''(x) + B y'(x) + C y(x) = f(x)\). \(y_h\) is the solution to \[ \sin \left (x \right )^{2} y^{\prime \prime }-y^{\prime } \sin \left (2 x \right )+\left (\cos \left (x \right )^{2}+1\right ) y = 0 \] In normal form the given ode is written as \begin {align*} y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y&=0 \tag {2} \end {align*}
Where \begin {align*} p \left (x \right )&=-\frac {\sin \left (2 x \right )}{\sin \left (x \right )^{2}}\\ q \left (x \right )&=\frac {\cos \left (x \right )^{2}+1}{\sin \left (x \right )^{2}} \end {align*}
Calculating the Liouville ode invariant \(Q\) given by \begin {align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= \frac {\cos \left (x \right )^{2}+1}{\sin \left (x \right )^{2}} - \frac {\left (-\frac {\sin \left (2 x \right )}{\sin \left (x \right )^{2}}\right )'}{2}- \frac {\left (-\frac {\sin \left (2 x \right )}{\sin \left (x \right )^{2}}\right )^2}{4} \\ &= \frac {\cos \left (x \right )^{2}+1}{\sin \left (x \right )^{2}} - \frac {\left (\frac {2 \sin \left (2 x \right ) \cos \left (x \right )}{\sin \left (x \right )^{3}}-\frac {2 \cos \left (2 x \right )}{\sin \left (x \right )^{2}}\right )}{2}- \frac {\left (\frac {\sin \left (2 x \right )^{2}}{\sin \left (x \right )^{4}}\right )}{4} \\ &= \frac {\cos \left (x \right )^{2}+1}{\sin \left (x \right )^{2}} - \left (\frac {\sin \left (2 x \right ) \cos \left (x \right )}{\sin \left (x \right )^{3}}-\frac {\cos \left (2 x \right )}{\sin \left (x \right )^{2}}\right )-\frac {\sin \left (2 x \right )^{2}}{4 \sin \left (x \right )^{4}}\\ &= 0 \end {align*}
Since the Liouville ode invariant does not depend on the independent variable \(x\) then the transformation \begin {align*} y = v \left (x \right ) z \left (x \right )\tag {3} \end {align*}
is used to change the original ode to a constant coefficients ode in \(v\). In (3) the term \(z \left (x \right )\) is given by \begin {align*} z \left (x \right )&={\mathrm e}^{-\left (\int \frac {p \left (x \right )}{2}d x \right )}\\ &= e^{-\int \frac {-\frac {\sin \left (2 x \right )}{\sin \left (x \right )^{2}}}{2} }\\ &= \sin \left (x \right )\tag {5} \end {align*}
Hence (3) becomes \begin {align*} y = v \left (x \right ) \sin \left (x \right )\tag {4} \end {align*}
Applying this change of variable to the original ode results in \begin {align*} v^{\prime \prime }\left (x \right ) = 1 \end {align*}
Which is now solved for \(v \left (x \right )\) The ODE can be written as \[ v^{\prime \prime }\left (x \right ) = 1 \] Integrating once gives \[ v^{\prime }\left (x \right )= x + c_{1} \] Integrating again gives \[ v \left (x \right )= \frac {x^{2}}{2} + c_{1} x + c_{2} \] Now that \(v \left (x \right )\) is known, then \begin {align*} y&= v \left (x \right ) z \left (x \right )\\ &= \left (\frac {1}{2} x^{2}+c_{1} x +c_{2}\right ) \left (z \left (x \right )\right )\tag {7} \end {align*}
But from (5) \begin {align*} z \left (x \right )&= \sin \left (x \right ) \end {align*}
Hence (7) becomes \begin {align*} y = \left (\frac {1}{2} x^{2}+c_{1} x +c_{2} \right ) \sin \left (x \right ) \end {align*}
Therefore the homogeneous solution \(y_h\) is \[ y_h = \left (\frac {1}{2} x^{2}+c_{1} x +c_{2} \right ) \sin \left (x \right ) \] The particular solution \(y_p\) can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on \(x\) as well. Let \begin{equation} \tag{1} y_p(x) = u_1 y_1 + u_2 y_2 \end{equation} Where \(u_1,u_2\) to be determined, and \(y_1,y_2\) are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as \begin{align*} y_1 &= \sin \left (x \right ) \\ y_2 &= \sin \left (x \right ) x \\ \end{align*} In the Variation of parameters \(u_1,u_2\) are found using \begin{align*} \tag{2} u_1 &= -\int \frac {y_2 f(x)}{a W(x)} \\ \tag{3} u_2 &= \int \frac {y_1 f(x)}{a W(x)} \\ \end{align*} Where \(W(x)\) is the Wronskian and \(a\) is the coefficient in front of \(y''\) in the given ODE. The Wronskian is given by \(W= \begin {vmatrix} y_1 & y_{2} \\ y_{1}^{\prime } & y_{2}^{\prime } \end {vmatrix} \). Hence \[ W = \begin {vmatrix} \sin \left (x \right ) & \sin \left (x \right ) x \\ \frac {d}{dx}\left (\sin \left (x \right )\right ) & \frac {d}{dx}\left (\sin \left (x \right ) x\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} \sin \left (x \right ) & \sin \left (x \right ) x \\ \cos \left (x \right ) & \cos \left (x \right ) x +\sin \left (x \right ) \end {vmatrix} \] Therefore \[ W = \left (\sin \left (x \right )\right )\left (\cos \left (x \right ) x +\sin \left (x \right )\right ) - \left (\sin \left (x \right ) x\right )\left (\cos \left (x \right )\right ) \] Which simplifies to \[ W = \sin \left (x \right )^{2} \] Which simplifies to \[ W = \sin \left (x \right )^{2} \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {x \sin \left (x \right )^{4}}{\sin \left (x \right )^{4}}\,dx \] Which simplifies to \[ u_1 = - \int x d x \] Hence \[ u_1 = -\frac {x^{2}}{2} \] And Eq. (3) becomes \[ u_2 = \int \frac {\sin \left (x \right )^{4}}{\sin \left (x \right )^{4}}\,dx \] Which simplifies to \[ u_2 = \int 1d x \] Hence \[ u_2 = x \] Therefore the particular solution, from equation (1) is \[ y_p(x) = \frac {\sin \left (x \right ) x^{2}}{2} \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (\left (\frac {1}{2} x^{2}+c_{1} x +c_{2} \right ) \sin \left (x \right )\right ) + \left (\frac {\sin \left (x \right ) x^{2}}{2}\right ) \\ \end{align*}
The solution(s) found are the following \begin{align*} \tag{1} y &= \left (\frac {1}{2} x^{2}+c_{1} x +c_{2} \right ) \sin \left (x \right )+\frac {\sin \left (x \right ) x^{2}}{2} \\ \end{align*}
Verification of solutions
\[ y = \left (\frac {1}{2} x^{2}+c_{1} x +c_{2} \right ) \sin \left (x \right )+\frac {\sin \left (x \right ) x^{2}}{2} \] Verified OK.
Maple trace Kovacic algorithm successful
`Methods for second order ODEs: --- Trying classification methods --- trying a quadrature trying high order exact linear fully integrable trying differential order: 2; linear nonhomogeneous with symmetry [0,1] trying a double symmetry of the form [xi=0, eta=F(x)] trying symmetries linear in x and y(x) -> Try solving first the homogeneous part of the ODE trying a symmetry of the form [xi=0, eta=F(x)] checking if the LODE is missing y -> Trying a Liouvillian solution using Kovacics algorithm A Liouvillian solution exists Reducible group (found an exponential solution) <- Kovacics algorithm successful <- solving first the homogeneous part of the ODE successful`
✓ Solution by Maple
Time used: 0.0 (sec). Leaf size: 17
dsolve(sin(x)^2*diff(y(x),x$2)-2*sin(x)*cos(x)*diff(y(x),x)+(cos(x)^2+1)*y(x)=sin(x)^3,y(x), singsol=all)
\[ y \left (x \right ) = \sin \left (x \right ) \left (c_{2} +c_{1} x +\frac {1}{2} x^{2}\right ) \]
✓ Solution by Mathematica
Time used: 0.092 (sec). Leaf size: 24
DSolve[Sin[x]^2*y''[x]-2*Sin[x]*Cos[x]*y'[x]+(Cos[x]^2+1)*y[x]==Sin[x]^3,y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \frac {1}{2} \left (x^2+2 c_2 x+2 c_1\right ) \sin (x) \]