2.25 problem 25
Internal
problem
ID
[8114]
Book
:
Second
order
enumerated
odes
Section
:
section
2
Problem
number
:
25
Date
solved
:
Monday, October 21, 2024 at 04:53:22 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
Solve
\begin{align*} \cos \left (x \right ) y^{\prime \prime }+\sin \left (x \right ) y^{\prime }-2 y \cos \left (x \right )^{3}&=2 \cos \left (x \right )^{5} \end{align*}
2.25.1 Solved as second order ode using change of variable on x method 2
Time used: 0.819 (sec)
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
\[
\cos \left (x \right ) y^{\prime \prime }+\sin \left (x \right ) y^{\prime }-2 y \cos \left (x \right )^{3} = 0
\]
In normal form the ode
\begin{align*} \cos \left (x \right ) y^{\prime \prime }+\sin \left (x \right ) y^{\prime }-2 y \cos \left (x \right )^{3}&=0 \tag {1} \end{align*}
Becomes
\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 )&=\tan \left (x \right )\\ q \left (x \right )&=-2 \cos \left (x \right )^{2} \end{align*}
Applying change of variables \(\tau = g \left (x \right )\) to (2) gives
\begin{align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+p_{1} \left (\frac {d}{d \tau }y \left (\tau \right )\right )+q_{1} y \left (\tau \right )&=0 \tag {3} \end{align*}
Where \(\tau \) is the new independent variable, and
\begin{align*} p_{1} \left (\tau \right ) &=\frac {\tau ^{\prime \prime }\left (x \right )+p \left (x \right ) \tau ^{\prime }\left (x \right )}{{\tau ^{\prime }\left (x \right )}^{2}}\tag {4} \\ q_{1} \left (\tau \right ) &=\frac {q \left (x \right )}{{\tau ^{\prime }\left (x \right )}^{2}}\tag {5} \end{align*}
Let \(p_{1} = 0\). Eq (4) simplifies to
\begin{align*} \tau ^{\prime \prime }\left (x \right )+p \left (x \right ) \tau ^{\prime }\left (x \right )&=0 \end{align*}
This ode is solved resulting in
\begin{align*} \tau &= \int {\mathrm e}^{-\left (\int p \left (x \right )d x \right )}d x\\ &= \int {\mathrm e}^{-\left (\int \tan \left (x \right )d x \right )}d x\\ &= \int e^{\ln \left (\cos \left (x \right )\right )} \,dx\\ &= \int \cos \left (x \right )d x\\ &= \sin \left (x \right )\tag {6} \end{align*}
Using (6) to evaluate \(q_{1}\) from (5) gives
\begin{align*} q_{1} \left (\tau \right ) &= \frac {q \left (x \right )}{{\tau ^{\prime }\left (x \right )}^{2}}\\ &= \frac {-2 \cos \left (x \right )^{2}}{\cos \left (x \right )^{2}}\\ &= -2\tag {7} \end{align*}
Substituting the above in (3) and noting that now \(p_{1} = 0\) results in
\begin{align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+q_{1} y \left (\tau \right )&=0 \\ \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )-2 y \left (\tau \right )&=0 \end{align*}
The above ode is now solved for \(y \left (\tau \right )\).This is second order with constant coefficients homogeneous
ODE. In standard form the ODE is
\[ A y''(\tau ) + B y'(\tau ) + C y(\tau ) = 0 \]
Where in the above \(A=1, B=0, C=-2\). Let the solution be \(y \left (\tau \right )=e^{\lambda \tau }\). Substituting
this into the ODE gives
\[ \lambda ^{2} {\mathrm e}^{\tau \lambda }-2 \,{\mathrm e}^{\tau \lambda } = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2)
throughout by \(e^{\lambda \tau }\) gives
\[ \lambda ^{2}-2 = 0 \tag {2} \]
Equation (2) is the characteristic equation of the ODE. Its roots
determine the general solution form.Using the quadratic formula
\[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \]
Substituting \(A=1, B=0, C=-2\) into the
above gives
\begin{align*} \lambda _{1,2} &= \frac {0}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {0^2 - (4) \left (1\right )\left (-2\right )}\\ &= \pm \sqrt {2} \end{align*}
Hence
\begin{align*}
\lambda _1 &= + \sqrt {2} \\
\lambda _2 &= - \sqrt {2} \\
\end{align*}
Which simplifies to
\begin{align*}
\lambda _1 &= \sqrt {2} \\
\lambda _2 &= -\sqrt {2} \\
\end{align*}
Since roots are real and distinct, then the solution is
\begin{align*}
y \left (\tau \right ) &= c_1 e^{\lambda _1 \tau } + c_2 e^{\lambda _2 \tau } \\
y \left (\tau \right ) &= c_1 e^{\left (\sqrt {2}\right )\tau } +c_2 e^{\left (-\sqrt {2}\right )\tau } \\
\end{align*}
Or
\[
y \left (\tau \right ) =c_1 \,{\mathrm e}^{\tau \sqrt {2}}+c_2 \,{\mathrm e}^{-\tau \sqrt {2}}
\]
Will
add steps showing solving for IC soon.
The above solution is now transformed back to \(y\) using (6) which results in
\[
y = c_1 \,{\mathrm e}^{\sin \left (x \right ) \sqrt {2}}+c_2 \,{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}
\]
Therefore the
homogeneous solution \(y_h\) is
\[
y_h = c_1 \,{\mathrm e}^{\sin \left (x \right ) \sqrt {2}}+c_2 \,{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}
\]
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 &= {\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \\
y_2 &= {\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \\
\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} {\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} & {\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \\ \frac {d}{dx}\left ({\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}\right ) & \frac {d}{dx}\left ({\mathrm e}^{\sin \left (x \right ) \sqrt {2}}\right ) \end {vmatrix} \]
Which gives
\[ W = \begin {vmatrix} {\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} & {\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \\ -{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \cos \left (x \right ) \sqrt {2} & \cos \left (x \right ) \sqrt {2}\, {\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \end {vmatrix} \]
Therefore
\[
W = \left ({\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}\right )\left (\cos \left (x \right ) \sqrt {2}\, {\mathrm e}^{\sin \left (x \right ) \sqrt {2}}\right ) - \left ({\mathrm e}^{\sin \left (x \right ) \sqrt {2}}\right )\left (-{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \cos \left (x \right ) \sqrt {2}\right )
\]
Which simplifies to
\[
W = 2 \cos \left (x \right ) \sqrt {2}
\]
Which simplifies to
\[
W = 2 \cos \left (x \right ) \sqrt {2}
\]
Therefore Eq. (2) becomes
\[
u_1 = -\int \frac {2 \,{\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \cos \left (x \right )^{5}}{2 \cos \left (x \right )^{2} \sqrt {2}}\,dx
\]
Which simplifies to
\[
u_1 = - \int \frac {{\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \cos \left (x \right )^{3} \sqrt {2}}{2}d x
\]
Hence
\[
u_1 = \frac {{\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \sin \left (x \right )^{2}}{2}-\frac {\sin \left (x \right ) \sqrt {2}\, {\mathrm e}^{\sin \left (x \right ) \sqrt {2}}}{2}
\]
And Eq. (3) becomes
\[
u_2 = \int \frac {2 \,{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \cos \left (x \right )^{5}}{2 \cos \left (x \right )^{2} \sqrt {2}}\,dx
\]
Which
simplifies to
\[
u_2 = \int \frac {{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \cos \left (x \right )^{3} \sqrt {2}}{2}d x
\]
Hence
\[
u_2 = \frac {{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \sin \left (x \right )^{2}}{2}+\frac {\sin \left (x \right ) \sqrt {2}\, {\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}}{2}
\]
Therefore the particular solution, from equation (1) is
\[
y_p(x) = \left (\frac {{\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \sin \left (x \right )^{2}}{2}-\frac {\sin \left (x \right ) \sqrt {2}\, {\mathrm e}^{\sin \left (x \right ) \sqrt {2}}}{2}\right ) {\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}+{\mathrm e}^{\sin \left (x \right ) \sqrt {2}} \left (\frac {{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}} \sin \left (x \right )^{2}}{2}+\frac {\sin \left (x \right ) \sqrt {2}\, {\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}}{2}\right )
\]
Which
simplifies to
\[
y_p(x) = \sin \left (x \right )^{2}
\]
Therefore the general solution is
\begin{align*}
y &= y_h + y_p \\
&= \left (c_1 \,{\mathrm e}^{\sin \left (x \right ) \sqrt {2}}+c_2 \,{\mathrm e}^{-\sin \left (x \right ) \sqrt {2}}\right ) + \left (\sin \left (x \right )^{2}\right ) \\
\end{align*}
Will add steps showing solving for IC
soon.
2.25.2 Solved as second order ode using change of variable on x method 1
Time used: 1.926 (sec)
This is second order non-homogeneous ODE. In standard form the ODE is
\[ A y''(x) + B y'(x) + C y(x) = f(x) \]
Where \(A=\cos \left (x \right ), B=\sin \left (x \right ), C=-2 \cos \left (x \right )^{3}, f(x)=2 \cos \left (x \right )^{5}\). 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)\). Solving for \(y_h\) from
\[ \cos \left (x \right ) y^{\prime \prime }+\sin \left (x \right ) y^{\prime }-2 y \cos \left (x \right )^{3} = 0 \]
In normal form the ode
\begin{align*} \cos \left (x \right ) y^{\prime \prime }+\sin \left (x \right ) y^{\prime }-2 y \cos \left (x \right )^{3}&=0 \tag {1} \end{align*}
Becomes
\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 )&=\tan \left (x \right )\\ q \left (x \right )&=-2 \cos \left (x \right )^{2} \end{align*}
Applying change of variables \(\tau = g \left (x \right )\) to (2) results
\begin{align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+p_{1} \left (\frac {d}{d \tau }y \left (\tau \right )\right )+q_{1} y \left (\tau \right )&=0 \tag {3} \end{align*}
Where \(\tau \) is the new independent variable, and
\begin{align*} p_{1} \left (\tau \right ) &=\frac {\tau ^{\prime \prime }\left (x \right )+p \left (x \right ) \tau ^{\prime }\left (x \right )}{{\tau ^{\prime }\left (x \right )}^{2}}\tag {4} \\ q_{1} \left (\tau \right ) &=\frac {q \left (x \right )}{{\tau ^{\prime }\left (x \right )}^{2}}\tag {5} \end{align*}
Let \(q_1=c^2\) where \(c\) is some constant. Therefore from (5)
\begin{align*} \tau ' &= \frac {1}{c}\sqrt {q}\\ &= \frac {\sqrt {-2 \cos \left (x \right )^{2}}}{c}\tag {6} \\ \tau '' &= \frac {2 \sin \left (x \right ) \cos \left (x \right )}{c \sqrt {-2 \cos \left (x \right )^{2}}} \end{align*}
Substituting the above into (4) results in
\begin{align*} p_{1} \left (\tau \right ) &=\frac {\tau ^{\prime \prime }\left (x \right )+p \left (x \right ) \tau ^{\prime }\left (x \right )}{{\tau ^{\prime }\left (x \right )}^{2}}\\ &=\frac {\frac {2 \sin \left (x \right ) \cos \left (x \right )}{c \sqrt {-2 \cos \left (x \right )^{2}}}+\tan \left (x \right )\frac {\sqrt {-2 \cos \left (x \right )^{2}}}{c}}{\left (\frac {\sqrt {-2 \cos \left (x \right )^{2}}}{c}\right )^2} \\ &=0 \end{align*}
Therefore ode (3) now becomes
\begin{align*} y \left (\tau \right )'' + p_1 y \left (\tau \right )' + q_1 y \left (\tau \right ) &= 0 \\ \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+c^{2} y \left (\tau \right ) &= 0 \tag {7} \end{align*}
The above ode is now solved for \(y \left (\tau \right )\). Since the ode is now constant coefficients, it can be easily
solved to give
\begin{align*} y \left (\tau \right ) &= c_1 \cos \left (c \tau \right )+c_2 \sin \left (c \tau \right ) \end{align*}
Now from (6)
\begin{align*} \tau &= \int \frac {1}{c} \sqrt q \,dx \\ &= \frac {\int \sqrt {-2 \cos \left (x \right )^{2}}d x}{c}\\ &= -\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}\, c} \end{align*}
Substituting the above into the solution obtained gives
\[
y = c_1 \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )-c_2 \sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\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 &= \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \\
y_2 &= -\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \\
\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} \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) & -\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \\ \frac {d}{dx}\left (\cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right ) & \frac {d}{dx}\left (-\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right ) \end {vmatrix} \]
Which gives
\[ W = \begin {vmatrix} \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) & -\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \\ -\left (\frac {2 \cos \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}-\frac {\sin \left (2 x \right )^{2}}{\left (-1-\cos \left (2 x \right )\right )^{{3}/{2}}}\right ) \sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) & -\left (\frac {2 \cos \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}-\frac {\sin \left (2 x \right )^{2}}{\left (-1-\cos \left (2 x \right )\right )^{{3}/{2}}}\right ) \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \end {vmatrix} \]
Therefore
\[
W = \left (\cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right )\left (-\left (\frac {2 \cos \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}-\frac {\sin \left (2 x \right )^{2}}{\left (-1-\cos \left (2 x \right )\right )^{{3}/{2}}}\right ) \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right ) - \left (-\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right )\left (-\left (\frac {2 \cos \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}-\frac {\sin \left (2 x \right )^{2}}{\left (-1-\cos \left (2 x \right )\right )^{{3}/{2}}}\right ) \sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right )
\]
Which simplifies to
\[
W = \frac {\left (\sin \left (2 x \right )^{2}+2 \cos \left (2 x \right )^{2}+2 \cos \left (2 x \right )\right ) \left (\cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )^{2}+\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )^{2}\right )}{\left (-1-\cos \left (2 x \right )\right )^{{3}/{2}}}
\]
Which simplifies to
\[
W = -\frac {\cos \left (x \right )^{2} \sqrt {2}}{\sqrt {-\cos \left (x \right )^{2}}}
\]
Therefore Eq. (2) becomes
\[
u_1 = -\int \frac {-2 \sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \cos \left (x \right )^{5}}{-\frac {\cos \left (x \right )^{3} \sqrt {2}}{\sqrt {-\cos \left (x \right )^{2}}}}\,dx
\]
Which simplifies to
\[
u_1 = - \int \sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \cos \left (x \right )^{2} \sqrt {2}\, \sqrt {-\cos \left (x \right )^{2}}d x
\]
Hence
\[
u_1 = -\left (\int _{0}^{x}\sin \left (\frac {\sin \left (2 \alpha \right )}{\sqrt {-1-\cos \left (2 \alpha \right )}}\right ) \cos \left (\alpha \right )^{2} \sqrt {2}\, \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right )
\]
And Eq. (3) becomes
\[
u_2 = \int \frac {2 \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \cos \left (x \right )^{5}}{-\frac {\cos \left (x \right )^{3} \sqrt {2}}{\sqrt {-\cos \left (x \right )^{2}}}}\,dx
\]
Which
simplifies to
\[
u_2 = \int -\cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \cos \left (x \right )^{2} \sqrt {2}\, \sqrt {-\cos \left (x \right )^{2}}d x
\]
Hence
\[
u_2 = \int _{0}^{x}-\cos \left (\frac {\sin \left (2 \alpha \right )}{\sqrt {-1-\cos \left (2 \alpha \right )}}\right ) \cos \left (\alpha \right )^{2} \sqrt {2}\, \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha
\]
Therefore the particular solution, from equation (1) is
\[
y_p(x) = -\left (\int _{0}^{x}\sin \left (\frac {\sin \left (2 \alpha \right )}{\sqrt {-1-\cos \left (2 \alpha \right )}}\right ) \cos \left (\alpha \right )^{2} \sqrt {2}\, \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right ) \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )-\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \left (\int _{0}^{x}-\cos \left (\frac {\sin \left (2 \alpha \right )}{\sqrt {-1-\cos \left (2 \alpha \right )}}\right ) \cos \left (\alpha \right )^{2} \sqrt {2}\, \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right )
\]
Which
simplifies to
\[
y_p(x) = \left (\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \left (\int _{0}^{x}\cos \left (\frac {\sin \left (2 \alpha \right ) \sqrt {2}}{2 \sqrt {-\cos \left (\alpha \right )^{2}}}\right ) \cos \left (\alpha \right )^{2} \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right )-\left (\int _{0}^{x}\sin \left (\frac {\sin \left (2 \alpha \right ) \sqrt {2}}{2 \sqrt {-\cos \left (\alpha \right )^{2}}}\right ) \cos \left (\alpha \right )^{2} \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right ) \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right ) \sqrt {2}
\]
Therefore the general solution is
\begin{align*}
y &= y_h + y_p \\
&= \left (c_1 \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )-c_2 \sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right ) + \left (\left (\sin \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right ) \left (\int _{0}^{x}\cos \left (\frac {\sin \left (2 \alpha \right ) \sqrt {2}}{2 \sqrt {-\cos \left (\alpha \right )^{2}}}\right ) \cos \left (\alpha \right )^{2} \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right )-\left (\int _{0}^{x}\sin \left (\frac {\sin \left (2 \alpha \right ) \sqrt {2}}{2 \sqrt {-\cos \left (\alpha \right )^{2}}}\right ) \cos \left (\alpha \right )^{2} \sqrt {-\cos \left (\alpha \right )^{2}}d \alpha \right ) \cos \left (\frac {\sin \left (2 x \right )}{\sqrt {-1-\cos \left (2 x \right )}}\right )\right ) \sqrt {2}\right ) \\
\end{align*}
Will add steps showing solving for IC
soon.
2.25.3 Maple step by step solution
2.25.4 Maple trace
Methods for second order ODEs:
2.25.5 Maple dsolve solution
Solving time : 0.010
(sec)
Leaf size : 30
dsolve(cos(x)*diff(diff(y(x),x),x)+sin(x)*diff(y(x),x)-2*y(x)*cos(x)^3 = 2*cos(x)^5,
y(x),singsol=all)
\[
y = \sinh \left (\sin \left (x \right ) \sqrt {2}\right ) c_2 +\cosh \left (\sin \left (x \right ) \sqrt {2}\right ) c_1 +\frac {1}{2}-\frac {\cos \left (2 x \right )}{2}
\]
2.25.6 Mathematica DSolve solution
Solving time : 23.596
(sec)
Leaf size : 167
DSolve[{Cos[x]*D[y[x],{x,2}]+Sin[x]*D[y[x],x]-2*y[x]*Cos[x]^3==2*Cos[x]^5,{}},
y[x],x,IncludeSingularSolutions->True]
\[
y(x)\to \cos \left (\sqrt {-\cos (2 x)-1} \tan (x)\right ) \int _1^x\cos ^2(K[1]) \sqrt {-\cos (2 K[1])-1} \sin \left (\sqrt {-\cos (2 K[1])-1} \tan (K[1])\right )dK[1]+\sin \left (\sqrt {-\cos (2 x)-1} \tan (x)\right ) \int _1^x-\cos ^2(K[2]) \sqrt {-\cos (2 K[2])-1} \cos \left (\sqrt {-\cos (2 K[2])-1} \tan (K[2])\right )dK[2]+c_1 \cos \left (\sqrt {-\cos (2 x)-1} \tan (x)\right )+c_2 \sin \left (\sqrt {-\cos (2 x)-1} \tan (x)\right )
\]