General solution to $x'' + 2 x' \sin t + \left( \cos t - 1 \right) x = 0$ I wanted to find the general solution of the equation
$$x'' + 2 x' \sin t + \left( \cos t - 1 \right) x = 0$$
Although there are methods based on series expansion and Fourier series, I do not want to apply them. I want to know if there is some other method to solve this analytically and obtain a general solutions.
Many textbooks suggest that we first convert this equation to a system as follows
\begin{align}
x_1' &= x_2 \\
x_2' &= -2x_2 \sin \theta + \left( \cos \theta - 1 \right) x_1 \\
\theta' &= 1
\end{align}
and then solve the system. However, I do not know how to solve the system of nonlinear equations, especially of this type.
Is there any method to solve it or can we only talk about qualitative properties through this?
 A: This is not a simple equation to solve. You can make it nicer using $x(t)=y(t)\,e^{\cos(t)}$ to get
$$y''(t)-y(t) \left(1+\sin ^2(t)\right)=0$$ or better
$$ y''(t)-y(t) \left(\frac 32 -\frac 12 \cos(2t)\right)=0$$
the solution of which being
$$y(t)=c_1 \text{MathieuC}\left[-\frac{3}{2},-\frac{1}{4},t\right]+c_2
   \text{MathieuS}\left[-\frac{3}{2},-\frac{1}{4},t\right]$$ where appear Mathieu cosine and sine functions (have a look here and here).
A: This is a linear ODE of trigonometric function coefficients. The current approach of solving it is to transform it to a linear ODE of polynomial function coefficients first.
Let $r=\cos t-1$ ,
Then $\dfrac{dx}{dt}=\dfrac{dx}{dr}\dfrac{dr}{dt}=-(\sin t)\dfrac{dx}{dr}$
$\dfrac{d^2x}{dt^2}=\dfrac{d}{dt}\left(-(\sin t)\dfrac{dx}{dr}\right)=-(\sin t)\dfrac{d}{dt}\left(\dfrac{dx}{dr}\right)-(\cos t)\dfrac{dx}{dr}=-(\sin t)\dfrac{d}{dr}\left(\dfrac{dx}{dr}\right)\dfrac{dr}{dt}-(\cos t)\dfrac{dx}{dr}=-(\sin t)\dfrac{d^2x}{dr^2}(-\sin t)-(\cos t)\dfrac{dx}{dr}=(\sin^2t)\dfrac{d^2x}{dr^2}-(\cos t)\dfrac{dx}{dr}$
$\therefore(\sin^2t)\dfrac{d^2x}{dr^2}-(\cos t)\dfrac{dx}{dr}-2(\sin^2t)\dfrac{dx}{dr}+(\cos t-1)x=0$
$(1-\cos^2t)\dfrac{d^2x}{dr^2}+(2\cos^2t-\cos t-2)\dfrac{dx}{dr}+(\cos t-1)x=0$
$(1-(r+1)^2)\dfrac{d^2x}{dr^2}+(2(r+1)^2-(r+1)-2)\dfrac{dx}{dr}+rx=0$
$-r(r+2)\dfrac{d^2x}{dr^2}+(2r^2+3r-1)\dfrac{dx}{dr}+rx=0$
$r(r+2)\dfrac{d^2x}{dr^2}-(2r^2+3r-1)\dfrac{dx}{dr}-rx=0$
Which relates to Heun's Confluent Equation.
