# Solve the differential equation $y''-2(\sin x)y'-(\cos x-\sin^2x)y=0$

Solve the differential equation $y'' -2(\sin x)y'-(\cos x-\sin^2x)y=0$

I tried substituting some common functions but that didn't work. How should I go about solving this question?

• Regular trig functions seem unlikely to work as well as polynomials, but you could try $A\sin^3(x)+B\cos^3(x)+C\sin^2(x)+D\cos^2(x)+E\sin(x)+F\cos(x)$ and maybe be able to solve for whatever possible coefficients could satisfy the equation. From experience, it looks like a mix of exponential and trig might also work (like $Ae^{B\sin(x)}, Ce^{D\cos(x)}$ or similar) – user12345 Mar 31 '17 at 2:17
• Actually, Wolfram Alpha says it's $y(x)=c_1e^{-\cos(x)}+c_2xe^{-\cos(x)}$ – user12345 Mar 31 '17 at 2:18

Hint:

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(\sin^2x)\dfrac{d^2y}{du^2}-(\cos x)\dfrac{dy}{du}+2(\sin^2x)\dfrac{dy}{du}-(\cos x-\sin^2x)y=0$

$(1-\cos^2x)\dfrac{d^2y}{du^2}+(2-2\cos^2x-\cos x)\dfrac{dy}{du}-(\cos x+\cos^2x-1)y=0$

$(1-u^2)\dfrac{d^2y}{du^2}-(2u^2+u-2)\dfrac{dy}{du}-(u^2+u-1)y=0$

$y=e^{-u}$ is the trivial solution of the above ODE.

Then solve it by reduction of order.