A Differential Equation with Trigonometric Coefficients Suppose we have the following second-order differential equation:
$\cos^2(x)y'' -\sin(x)y' + y = 0$
How do we determine its general solution? I couldn't even guess a particular solution; all my efforts led nowhere. I started off with something like $y = Ae^{B\cos(x)}$ but needless to say, that also looked like a dead-end.

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 $u=\cos x$ ,
Then $\dfrac{dy}{dx}=\dfrac{dy}{du}\dfrac{du}{dx}=-(\sin x)\dfrac{dy}{du}$
$\dfrac{d^2y}{dx^2}=\dfrac{d}{dx}\left(-(\sin x)\dfrac{dy}{du}\right)=-(\sin x)\dfrac{d}{dx}\left(\dfrac{dy}{du}\right)-(\cos x)\dfrac{dy}{du}=-(\sin x)\dfrac{d}{du}\left(\dfrac{dy}{du}\right)\dfrac{du}{dx}-(\cos x)\dfrac{dy}{du}=-(\sin x)\dfrac{d^2y}{du^2}(-\sin x)-(\cos x)\dfrac{dy}{du}=(\sin^2x)\dfrac{d^2y}{du^2}-(\cos x)\dfrac{dy}{du}$
$\therefore(\cos^2x)\left((\sin^2x)\dfrac{d^2y}{du^2}-(\cos x)\dfrac{dy}{du}\right)+(\sin^2 x)\dfrac{dy}{du}+y=0$
$(\cos^2x)(1-\cos^2x)\dfrac{d^2y}{du^2}+(1-\cos^2 x-\cos^3x)\dfrac{dy}{du}+y=0$
$u^2(1-u^2)\dfrac{d^2y}{du^2}+(1-u^2-u^3)\dfrac{dy}{du}+y=0$
$u^2(u^2-1)\dfrac{d^2y}{du^2}+(u^3+u^2-1)\dfrac{dy}{du}-y=0$
$\dfrac{d^2y}{du^2}+\dfrac{u^3+u^2-1}{u^2(u^2-1)}\dfrac{dy}{du}-\dfrac{y}{u^2(u^2-1)}=0$
$\dfrac{d^2y}{du^2}+\left(\dfrac{1}{u^2}+\dfrac{u}{u^2-1}\right)\dfrac{dy}{du}+\left(\dfrac{1}{u^2}-\dfrac{1}{u^2-1}\right)y=0$
