2.2.22 Problem 23
Internal
problem
ID
[10433]
Book
:
Second
order
enumerated
odes
Section
:
section
2
Problem
number
:
23
Date
solved
:
Monday, December 08, 2025 at 08:54:17 PM
CAS
classification
:
[[_2nd_order, _with_linear_symmetries]]
2.2.22.1 second order change of variable on x method 2
0.352 (sec)
\begin{align*}
y^{\prime \prime }+\tan \left (x \right ) y^{\prime }+y \cos \left (x \right )^{2}&=0 \\
\end{align*}
Entering second order change of variable on \(x\) method 2 solverIn normal form the ode
\begin{align*} y^{\prime \prime }+\tan \left (x \right ) y^{\prime }+y \cos \left (x \right )^{2} = 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 )&=\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}^{-\int p \left (x \right )d x}d x\\ &= \int {\mathrm e}^{-\int \tan \left (x \right )d x}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 {\cos \left (x \right )^{2}}{\cos \left (x \right )^{2}}\\ &= 1\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 )+y \left (\tau \right )&=0 \end{align*}
The above ode is now solved for \(y \left (\tau \right )\).Entering second order linear constant coefficient ode
solver
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=1\). Let the solution be \(y \left (\tau \right )=e^{\lambda \tau }\). Substituting this into the ODE
gives \[ \lambda ^{2} {\mathrm e}^{\tau \lambda }+{\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}+1 = 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=1\) 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 (1\right )}\\ &= \pm i \end{align*}
Hence
\begin{align*} \lambda _1 &= + i\\ \lambda _2 &= - i \end{align*}
Which simplifies to
\begin{align*}
\lambda _1 &= i \\
\lambda _2 &= -i \\
\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 =1\). Therefore the final solution, when using Euler relation, can be written as \[
y \left (\tau \right ) = e^{\alpha \tau } \left ( c_1 \cos (\beta \tau ) + c_2 \sin (\beta \tau ) \right )
\]
Which
becomes \[
y \left (\tau \right ) = e^{0}\left (c_1 \cos \left (\tau \right )+c_2 \sin \left (\tau \right )\right )
\]
Or \[
y \left (\tau \right ) = c_1 \cos \left (\tau \right )+c_2 \sin \left (\tau \right )
\]
The above solution is now transformed back to \(y\) using (6) which results in
\[
y = c_1 \cos \left (\sin \left (x \right )\right )+c_2 \sin \left (\sin \left (x \right )\right )
\]
Summary of solutions found
\begin{align*}
y &= c_1 \cos \left (\sin \left (x \right )\right )+c_2 \sin \left (\sin \left (x \right )\right ) \\
\end{align*}
0.485 (sec)
\begin{align*}
y^{\prime \prime }+\tan \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
\[
\frac {\left (-\tau ^{3}+\tau \right ) \left (\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )\right )+y \left (\tau \right ) \tau ^{3}-\frac {d}{d \tau }y \left (\tau \right )}{\tau } = 0
\]
Which is now
solved for \(y \left (\tau \right )\). Entering second order change of variable on \(x\) method 2 solverIn normal form the ode
\begin{align*} \frac {\left (-\tau ^{3}+\tau \right ) \left (\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )\right )+y \left (\tau \right ) \tau ^{3}-\frac {d}{d \tau }y \left (\tau \right )}{\tau } = 0\tag {1} \end{align*}
Becomes
\begin{align*} \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )+p \left (\tau \right ) \left (\frac {d}{d \tau }y \left (\tau \right )\right )+q \left (\tau \right ) y \left (\tau \right )&=0 \tag {2} \end{align*}
Where
\begin{align*} p \left (\tau \right )&=\frac {1}{\tau ^{3}-\tau }\\ q \left (\tau \right )&=-\frac {\tau ^{2}}{\tau ^{2}-1} \end{align*}
Applying change of variables \(\tau = g \left (\tau \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 {\frac {d^{2}}{d \tau ^{2}}\tau \left (\tau \right )+p \left (\tau \right ) \left (\frac {d}{d \tau }\tau \left (\tau \right )\right )}{\left (\frac {d}{d \tau }\tau \left (\tau \right )\right )^{2}}\tag {4} \\ q_{1} \left (\tau \right ) &=\frac {q \left (\tau \right )}{\left (\frac {d}{d \tau }\tau \left (\tau \right )\right )^{2}}\tag {5} \end{align*}
Let \(p_{1} = 0\). Eq (4) simplifies to
\begin{align*} \frac {d^{2}}{d \tau ^{2}}\tau \left (\tau \right )+p \left (\tau \right ) \left (\frac {d}{d \tau }\tau \left (\tau \right )\right )&=0 \end{align*}
This ode is solved resulting in
\begin{align*} \tau &= \int {\mathrm e}^{-\int p \left (\tau \right )d \tau }d \tau \\ &= \int {\mathrm e}^{-\int \frac {1}{\tau ^{3}-\tau }d \tau }d \tau \\ &= \int e^{\ln \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{2}-\frac {\ln \left (\tau +1\right )}{2}} \,d\tau \\ &= \int \frac {\tau }{\sqrt {\tau -1}\, \sqrt {\tau +1}}d \tau \\ &= \sqrt {\tau -1}\, \sqrt {\tau +1}\tag {6} \end{align*}
Using (6) to evaluate \(q_{1}\) from (5) gives
\begin{align*} q_{1} \left (\tau \right ) &= \frac {q \left (\tau \right )}{\left (\frac {d}{d \tau }\tau \left (\tau \right )\right )^{2}}\\ &= \frac {-\frac {\tau ^{2}}{\tau ^{2}-1}}{\frac {\tau ^{2}}{\left (\tau -1\right ) \left (\tau +1\right )}}\\ &= -1\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 )-y \left (\tau \right )&=0 \end{align*}
The above ode is now solved for \(y \left (\tau \right )\).Entering second order linear constant coefficient ode
solver
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=-1\). Let the solution be \(y \left (\tau \right )=e^{\lambda \tau }\). Substituting this into the ODE
gives \[ \lambda ^{2} {\mathrm e}^{\tau \lambda }-{\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}-1 = 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=-1\) 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 (-1\right )}\\ &= \pm 1 \end{align*}
Hence
\begin{align*}
\lambda _1 &= + 1 \\
\lambda _2 &= - 1 \\
\end{align*}
Which simplifies to \begin{align*}
\lambda _1 &= 1 \\
\lambda _2 &= -1 \\
\end{align*}
Since roots are distinct, then the solution is \begin{align*}
y \left (\tau \right ) &= c_3 e^{\lambda _1 \tau } + c_4 e^{\lambda _2 \tau } \\
y \left (\tau \right ) &= c_3 e^{\left (1\right )\tau } +c_4 e^{\left (-1\right )\tau } \\
\end{align*}
Or \[
y \left (\tau \right ) =c_3 \,{\mathrm e}^{\tau }+c_4 \,{\mathrm e}^{-\tau }
\]
The above solution
is now transformed back to \(y \left (\tau \right )\) using (6) which results in \[
y \left (\tau \right ) = c_3 \,{\mathrm e}^{\sqrt {\tau -1}\, \sqrt {\tau +1}}+c_4 \,{\mathrm e}^{-\sqrt {\tau -1}\, \sqrt {\tau +1}}
\]
Applying change of variable \(\tau = \cos \left (x \right )\) to the
solutions above gives \begin{align*}
y &= c_3 \,{\mathrm e}^{\sqrt {\cos \left (x \right )-1}\, \sqrt {\cos \left (x \right )+1}}+c_4 \,{\mathrm e}^{-\sqrt {\cos \left (x \right )-1}\, \sqrt {\cos \left (x \right )+1}} \\
\end{align*}
2.2.22.3 ✓ Maple. Time used: 0.019 (sec). Leaf size: 15
ode:=diff(diff(y(x),x),x)+tan(x)*diff(y(x),x)+y(x)*cos(x)^2 = 0;
dsolve(ode,y(x), singsol=all);
\[
y = c_1 \sin \left (\sin \left (x \right )\right )+c_2 \cos \left (\sin \left (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
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power \
@ Moebius
-> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x),\
dx)) * 2F1([a1, a2], [b1], f)
-> Trying changes of variables to rationalize or make the ODE simpler
trying a quadrature
checking if the LODE has constant coefficients
<- constant coefficients successful
Change of variables used:
[x = arcsin(t)]
Linear ODE actually solved:
(-2*t^2+2)*u(t)+(-2*t^2+2)*diff(diff(u(t),t),t) = 0
<- change of variables successful
2.2.22.4 ✓ Mathematica. Time used: 1.194 (sec). Leaf size: 37
ode=D[y[x],{x,2}]+Tan[x]*D[y[x],x]+Cos[x]^2*y[x]==0;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to c_1 \cosh \left (\sqrt {-\sin ^2(x)}\right )+i c_2 \sinh \left (\sqrt {-\sin ^2(x)}\right ) \end{align*}
2.2.22.5 ✗ Sympy
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(y(x)*cos(x)**2 + tan(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
False