2.2.29 Problem 29
Internal
problem
ID
[10440]
Book
:
Second
order
enumerated
odes
Section
:
section
2
Problem
number
:
29
Date
solved
:
Monday, December 08, 2025 at 08:56:04 PM
CAS
classification
:
[_Lienard]
2.2.29.1 second order change of variable on y method 1
0.322 (sec)
\begin{align*}
\cos \left (x \right )^{2} y^{\prime \prime }-2 \cos \left (x \right ) \sin \left (x \right ) y^{\prime }+y \cos \left (x \right )^{2}&=0 \\
\end{align*}
Entering second order change of variable on \(y\) method 1 solverIn 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 )}{\cos \left (x \right )^{2}}\\ q \left (x \right )&=1 \end{align*}
Calculating the Liouville ode invariant \(Q\) given by
\begin{align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= 1 - \frac {\left (-\frac {\sin \left (2 x \right )}{\cos \left (x \right )^{2}}\right )'}{2}- \frac {\left (-\frac {\sin \left (2 x \right )}{\cos \left (x \right )^{2}}\right )^2}{4} \\ &= 1 - \frac {\left (-\frac {2 \cos \left (2 x \right )}{\cos \left (x \right )^{2}}-\frac {2 \sin \left (2 x \right ) \sin \left (x \right )}{\cos \left (x \right )^{3}}\right )}{2}- \frac {\left (\frac {\sin \left (2 x \right )^{2}}{\cos \left (x \right )^{4}}\right )}{4} \\ &= 1 - \left (-\frac {\cos \left (2 x \right )}{\cos \left (x \right )^{2}}-\frac {\sin \left (2 x \right ) \sin \left (x \right )}{\cos \left (x \right )^{3}}\right )-\frac {\sin \left (2 x \right )^{2}}{4 \cos \left (x \right )^{4}}\\ &= 2 \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}^{-\int \frac {p \left (x \right )}{2}d x}\\ &= e^{-\int \frac {-\frac {\sin \left (2 x \right )}{\cos \left (x \right )^{2}}}{2} }\\ &= \sec \left (x \right )\tag {5} \end{align*}
Hence (3) becomes
\begin{align*} y = v \left (x \right ) \sec \left (x \right )\tag {4} \end{align*}
Applying this change of variable to the original ode results in
\begin{align*} \cos \left (x \right ) \left (2 v \left (x \right )+v^{\prime \prime }\left (x \right )\right ) = 0 \end{align*}
Which is now solved for \(v \left (x \right )\).
The above ode simplifies to
\begin{align*} 2 v \left (x \right )+v^{\prime \prime }\left (x \right ) = 0 \end{align*}
Entering second order linear constant coefficient ode solver
This is second order with constant coefficients homogeneous ODE. In standard form the
ODE is
\[ A v''(x) + B v'(x) + C v(x) = 0 \]
Where in the above \(A=1, B=0, C=2\). Let the solution be \(v \left (x \right )=e^{\lambda x}\). Substituting this into the ODE
gives \[ \lambda ^{2} {\mathrm e}^{x \lambda }+2 \,{\mathrm e}^{x \lambda } = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\)
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 i \sqrt {2} \end{align*}
Hence
\begin{align*} \lambda _1 &= + i \sqrt {2}\\ \lambda _2 &= - i \sqrt {2} \end{align*}
Which simplifies to
\begin{align*}
\lambda _1 &= i \sqrt {2} \\
\lambda _2 &= -i \sqrt {2} \\
\end{align*}
Since roots are complex conjugate of each others, then let the roots be \[
\lambda _{1,2} = \alpha \pm i \beta
\]
Where \(\alpha =0\) and \(\beta =\sqrt {2}\). Therefore the final solution, when using Euler relation, can be written as \[
v \left (x \right ) = e^{\alpha x} \left ( c_1 \cos (\beta x) + c_2 \sin (\beta x) \right )
\]
Which
becomes \[
v \left (x \right ) = e^{0}\left (c_1 \cos \left (\sqrt {2}\, x \right )+c_2 \sin \left (\sqrt {2}\, x \right )\right )
\]
Or \[
v \left (x \right ) = c_1 \cos \left (\sqrt {2}\, x \right )+c_2 \sin \left (\sqrt {2}\, x \right )
\]
Now that \(v \left (x \right )\) is known, then \begin{align*} y&= v \left (x \right ) z \left (x \right )\\ &= \left (c_1 \cos \left (\sqrt {2}\, x \right )+c_2 \sin \left (\sqrt {2}\, x \right )\right ) \left (z \left (x \right )\right )\tag {7} \end{align*}
But from (5)
\begin{align*} z \left (x \right )&= \sec \left (x \right ) \end{align*}
Hence (7) becomes
\begin{align*} y = \left (c_1 \cos \left (\sqrt {2}\, x \right )+c_2 \sin \left (\sqrt {2}\, x \right )\right ) \sec \left (x \right ) \end{align*}
Summary of solutions found
\begin{align*}
y &= \left (c_1 \cos \left (\sqrt {2}\, x \right )+c_2 \sin \left (\sqrt {2}\, x \right )\right ) \sec \left (x \right ) \\
\end{align*}
1.091 (sec)
\begin{align*}
\cos \left (x \right )^{2} y^{\prime \prime }-2 \cos \left (x \right ) \sin \left (x \right ) y^{\prime }+y \cos \left (x \right )^{2}&=0 \\
\end{align*}
Applying change of variable \(x = \arccos \left (\tau \right )\) to the above ode results in the following new ode
\[
-\left (\left (\tau ^{3}-\tau \right ) \left (\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )\right )+3 \left (\frac {d}{d \tau }y \left (\tau \right )\right ) \tau ^{2}-y \left (\tau \right ) \tau -2 \frac {d}{d \tau }y \left (\tau \right )\right ) \tau = 0
\]
Which is now
solved for \(y \left (\tau \right )\). Entering kovacic solverWriting the ode as \begin{align*} \left (-\tau ^{4}+\tau ^{2}\right ) \left (\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )\right )+\left (-3 \tau ^{3}+2 \tau \right ) \left (\frac {d}{d \tau }y \left (\tau \right )\right )+\tau ^{2} y \left (\tau \right ) &= 0 \tag {1} \\ A \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right ) + B \frac {d}{d \tau }y \left (\tau \right ) + C y \left (\tau \right ) &= 0 \tag {2} \end{align*}
Comparing (1) and (2) shows that
\begin{align*} A &= -\tau ^{4}+\tau ^{2} \\ B &= -3 \tau ^{3}+2 \tau \tag {3} \\ C &= \tau ^{2} \end{align*}
Applying the Liouville transformation on the dependent variable gives
\begin{align*} z(\tau ) &= y \left (\tau \right ) e^{\int \frac {B}{2 A} \,d\tau } \end{align*}
Then (2) becomes
\begin{align*} z''(\tau ) = r z(\tau )\tag {4} \end{align*}
Where \(r\) is given by
\begin{align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end{align*}
Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives
\begin{align*} r &= \frac {7 \tau ^{2}-10}{4 \left (\tau ^{2}-1\right )^{2}}\tag {6} \end{align*}
Comparing the above to (5) shows that
\begin{align*} s &= 7 \tau ^{2}-10\\ t &= 4 \left (\tau ^{2}-1\right )^{2} \end{align*}
Therefore eq. (4) becomes
\begin{align*} z''(\tau ) &= \left ( \frac {7 \tau ^{2}-10}{4 \left (\tau ^{2}-1\right )^{2}}\right ) z(\tau )\tag {7} \end{align*}
Equation (7) is now solved. After finding \(z(\tau )\) then \(y \left (\tau \right )\) is found using the inverse transformation
\begin{align*} y \left (\tau \right ) &= z \left (\tau \right ) e^{-\int \frac {B}{2 A} \,d\tau } \end{align*}
The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases
depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table summarizes these
cases.
| | |
| Case |
Allowed pole order for \(r\) |
Allowed value for \(\mathcal {O}(\infty )\) |
| | |
| 1 |
\(\left \{ 0,1,2,4,6,8,\cdots \right \} \) |
\(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \) |
| | |
|
2
|
Need to have at least one pole
that is either order \(2\) or odd order
greater than \(2\). Any other pole order
is allowed as long as the above
condition is satisfied. Hence the
following set of pole orders are all
allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\). |
no condition |
| | |
| 3 |
\(\left \{ 1,2\right \} \) |
\(\left \{ 2,3,4,5,6,7,\cdots \right \} \) |
| | |
Table 2.40: Necessary conditions for each Kovacic case
The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore
\begin{align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 4 - 2 \\ &= 2 \end{align*}
The poles of \(r\) in eq. (7) and the order of each pole are determined by solving for the roots of \(t=4 \left (\tau ^{2}-1\right )^{2}\).
There is a pole at \(\tau =1\) of order \(2\). There is a pole at \(\tau =-1\) of order \(2\). Since there is no odd order pole larger
than \(2\) and the order at \(\infty \) is \(2\) then the necessary conditions for case one are met. Since there is a
pole of order \(2\) then necessary conditions for case two are met. Since pole order is not larger than \(2\)
and the order at \(\infty \) is \(2\) then the necessary conditions for case three are met. Therefore
\begin{align*} L &= [1, 2, 4, 6, 12] \end{align*}
Attempting to find a solution using case \(n=1\).
Unable to find solution using case one
Attempting to find a solution using case \(n=2\).
Looking at poles of order 2. The partial fractions decomposition of \(r\) is
\[
r = -\frac {17}{16 \left (\tau +1\right )}-\frac {3}{16 \left (\tau +1\right )^{2}}-\frac {3}{16 \left (\tau -1\right )^{2}}+\frac {17}{16 \left (\tau -1\right )}
\]
For the pole at \(\tau =1\) let \(b\) be the
coefficient of \(\frac {1}{ \left (\tau -1\right )^{2}}\) in the partial fractions decomposition of \(r\) given above. Therefore \(b=-{\frac {3}{16}}\). Hence
\begin{align*} E_c &= \{2, 2+2\sqrt {1+4 b}, 2-2\sqrt {1+4 b} \} \\ &= \{1, 2, 3\} \end{align*}
For the pole at \(\tau =-1\) let \(b\) be the coefficient of \(\frac {1}{ \left (\tau +1\right )^{2}}\) in the partial fractions decomposition of \(r\) given above.
Therefore \(b=-{\frac {3}{16}}\). Hence
\begin{align*} E_c &= \{2, 2+2\sqrt {1+4 b}, 2-2\sqrt {1+4 b} \} \\ &= \{1, 2, 3\} \end{align*}
Since the order of \(r\) at \(\infty \) is 2 then let \(b\) be the coefficient of \(\frac {1}{\tau ^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \).
which can be found by dividing the leading coefficient of \(s\) by the leading coefficient of \(t\) from
\begin{alignat*}{2} r &= \frac {s}{t} &&= \frac {7 \tau ^{2}-10}{4 \left (\tau ^{2}-1\right )^{2}} \end{alignat*}
Since the \(\text {gcd}(s,t)=1\). This gives \(b={\frac {7}{4}}\). Hence
\begin{align*} E_\infty &= \{2, 2+2\sqrt {1+4 b}, 2-2\sqrt {1+4 b} \} \\ &= \{2\} \end{align*}
The following table summarizes the findings so far for poles and for the order of \(r\) at \(\infty \) for case 2 of
Kovacic algorithm.
| | |
| pole \(c\) location |
pole order |
\(E_c\) |
| | |
| \(1\) | \(2\) | \(\{1, 2, 3\}\) |
| | |
| \(-1\) | \(2\) | \(\{1, 2, 3\}\) |
| | |
| |
| Order of \(r\) at \(\infty \) |
\(E_\infty \) |
| |
| \(2\) |
\(\{2\}\) |
| |
Using the family \(\{e_1,e_2,\dots ,e_\infty \}\) given by
\[ e_1=1,\hspace {3pt} e_2=1,\hspace {3pt} e_\infty =2 \]
Gives a non negative integer \(d\) (the degree of the polynomial \(p(\tau )\)), which
is generated using \begin{align*} d &= \frac {1}{2} \left ( e_\infty - \sum _{c \in \Gamma } e_c \right )\\ &= \frac {1}{2} \left ( 2 - \left (1+\left (1\right )\right )\right )\\ &= 0 \end{align*}
We now form the following rational function
\begin{align*} \theta &= \frac {1}{2} \sum _{c \in \Gamma } \frac {e_c}{\tau -c} \\ &= \frac {1}{2} \left (\frac {1}{\left (\tau -\left (1\right )\right )}+\frac {1}{\left (\tau -\left (-1\right )\right )}\right ) \\ &= \frac {1}{2 \tau -2}+\frac {1}{2 \tau +2} \end{align*}
Now we search for a monic polynomial \(p(\tau )\) of degree \(d=0\) such that
\[ p'''+3 \theta p'' + \left (3 \theta ^2 + 3 \theta ' - 4 r\right )p' + \left (\theta '' + 3 \theta \theta ' + \theta ^3 - 4 r \theta - 2 r' \right ) p = 0 \tag {1A} \]
Since \(d=0\), then letting \[ p = 1\tag {2A} \]
Substituting \(p\) and \(\theta \) into Eq. (1A) gives \[
0 = 0
\]
And solving for \(p\) gives \[ p = 1 \]
Now that \(p(\tau )\) is found let
\begin{align*} \phi &= \theta + \frac {p'}{p}\\ &= \frac {1}{2 \tau -2}+\frac {1}{2 \tau +2} \end{align*}
Let \(\omega \) be the solution of
\begin{align*} \omega ^2 - \phi \omega + \left ( \frac {1}{2} \phi ' + \frac {1}{2} \phi ^2 - r \right ) &= 0 \end{align*}
Substituting the values for \(\phi \) and \(r\) into the above equation gives
\[
w^{2}-\left (\frac {1}{2 \tau -2}+\frac {1}{2 \tau +2}\right ) w +\frac {-7 \tau ^{2}+8}{4 \left (\tau ^{2}-1\right )^{2}} = 0
\]
Solving for \(\omega \) gives
\begin{align*} \omega &= \frac {\tau +2 \sqrt {2 \tau ^{2}-2}}{2 \left (\tau -1\right ) \left (\tau +1\right )} \end{align*}
Therefore the first solution to the ode \(z'' = r z\) is
\begin{align*} z_1(\tau ) &= e^{ \int \omega \,d\tau } \\ &= {\mathrm e}^{\int \frac {\tau +2 \sqrt {2 \tau ^{2}-2}}{2 \left (\tau -1\right ) \left (\tau +1\right )}d \tau }\\ &= \left (\tau ^{2}-1\right )^{{1}/{4}} 2^{\frac {\sqrt {2}}{2}} \left (\tau +\sqrt {\tau ^{2}-1}\right )^{\sqrt {2}} \end{align*}
The first solution to the original ode in \(y \left (\tau \right )\) is found from
\begin{align*}
y_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,d\tau } \\
&= z_1 e^{ -\int \frac {1}{2} \frac {-3 \tau ^{3}+2 \tau }{-\tau ^{4}+\tau ^{2}} \,d\tau } \\
&= z_1 e^{-\ln \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{4}-\frac {\ln \left (\tau +1\right )}{4}} \\
&= z_1 \left (\frac {1}{\tau \left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}\right ) \\
\end{align*}
Which simplifies to \[
y_1 = \frac {\left (\tau ^{2}-1\right )^{{1}/{4}} 2^{\frac {\sqrt {2}}{2}} \left (\tau +\sqrt {\tau ^{2}-1}\right )^{\sqrt {2}}}{\tau \left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}
\]
The second solution \(y_2\)
to the original ode is found using reduction of order \[ y_2 = y_1 \int \frac { e^{\int -\frac {B}{A} \,d\tau }}{y_1^2} \,d\tau \]
Substituting gives \begin{align*}
y_2 &= y_1 \int \frac { e^{\int -\frac {-3 \tau ^{3}+2 \tau }{-\tau ^{4}+\tau ^{2}} \,d\tau }}{\left (y_1\right )^2} \,d\tau \\
&= y_1 \int \frac { e^{-2 \ln \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{2}-\frac {\ln \left (\tau +1\right )}{2}}}{\left (y_1\right )^2} \,d\tau \\
&= y_1 \left (-\frac {2^{-\sqrt {2}} \sqrt {2}\, \left (\tau +\sqrt {\tau ^{2}-1}\right )^{-2 \sqrt {2}}}{4}\right ) \\
\end{align*}
Therefore the solution
is
\begin{align*}
y \left (\tau \right ) &= c_1 y_1 + c_2 y_2 \\
&= c_1 \left (\frac {\left (\tau ^{2}-1\right )^{{1}/{4}} 2^{\frac {\sqrt {2}}{2}} \left (\tau +\sqrt {\tau ^{2}-1}\right )^{\sqrt {2}}}{\tau \left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}\right ) + c_2 \left (\frac {\left (\tau ^{2}-1\right )^{{1}/{4}} 2^{\frac {\sqrt {2}}{2}} \left (\tau +\sqrt {\tau ^{2}-1}\right )^{\sqrt {2}}}{\tau \left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}\left (-\frac {2^{-\sqrt {2}} \sqrt {2}\, \left (\tau +\sqrt {\tau ^{2}-1}\right )^{-2 \sqrt {2}}}{4}\right )\right ) \\
\end{align*}
Applying change of variable \(\tau = \cos \left (x \right )\) to the solutions above gives \begin{align*}
y &= \frac {c_1 \left (\cos \left (x \right )^{2}-1\right )^{{1}/{4}} 2^{\frac {\sqrt {2}}{2}} \left (\cos \left (x \right )+\sqrt {\cos \left (x \right )^{2}-1}\right )^{\sqrt {2}}}{\cos \left (x \right ) \left (\cos \left (x \right )-1\right )^{{1}/{4}} \left (\cos \left (x \right )+1\right )^{{1}/{4}}}-\frac {c_2 2^{-\frac {\sqrt {2}}{2}+\frac {1}{2}} \left (\cos \left (x \right )^{2}-1\right )^{{1}/{4}} \left (\cos \left (x \right )+\sqrt {\cos \left (x \right )^{2}-1}\right )^{-\sqrt {2}}}{4 \cos \left (x \right ) \left (\cos \left (x \right )-1\right )^{{1}/{4}} \left (\cos \left (x \right )+1\right )^{{1}/{4}}} \\
\end{align*}
2.2.29.3 ✓ Maple. Time used: 0.003 (sec). Leaf size: 24
ode:=cos(x)^2*diff(diff(y(x),x),x)-2*cos(x)*sin(x)*diff(y(x),x)+y(x)*cos(x)^2 = 0;
dsolve(ode,y(x), singsol=all);
\[
y = \sec \left (x \right ) \left (c_1 \sin \left (\sqrt {2}\, x \right )+c_2 \cos \left (\sqrt {2}\, x \right )\right )
\]
Maple trace
Methods for second order ODEs:
--- Trying classification methods ---
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
Group is reducible or imprimitive
<- Kovacics algorithm successful
2.2.29.4 ✓ Mathematica. Time used: 0.04 (sec). Leaf size: 51
ode=Cos[x]^2*D[y[x],{x,2}]-2*Cos[x]*Sin[x]*D[y[x],x]+y[x]*Cos[x]^2==0;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to \frac {1}{4} e^{-i \sqrt {2} x} \left (4 c_1-i \sqrt {2} c_2 e^{2 i \sqrt {2} x}\right ) \sec (x) \end{align*}
2.2.29.5 ✗ Sympy
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(y(x)*cos(x)**2 - 2*sin(x)*cos(x)*Derivative(y(x), x) + cos(x)**2*Derivative(y(x), (x, 2)),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
False