# Solving the second-order, linear, inhomogeneous ODE $y'' - 2y'\tan(x)-y=\sin(x)$

I have the following ODE:

$$y'' - 2y'\tan(x)-y=\sin(x)$$

I am at a loss where to start. All the methods described in my textbook assume knowledge of the complementary function to solve $2$nd order ODEs with variable coefficients. However in a case like this, it seems that the roots of the related homogeneous ODE, $$y'' - 2y'\tan(x)-y=0 ,$$ cannot be found.

Could anyone give me a hint on how to start tackling this problem? Or what methods to use?

I don't know a general way of solving differential equations like this, but if you desperately multiply your equation with $\cos (x)$ to get a trigonometric function as a factor in all terms, $$\cos (x)y''-2\sin (x)y'-\cos (x) y=\sin x\cos x,$$ then you might recognize the left-hand side as $$(\cos (x) y)'',$$ so your differential equation is really $$(\cos (x)y)''=\sin x\cos x.$$ Now integrate twice.
Hint Some experimentation with substitutions of the form $y(x) = u(x) v(x)$ (for a fixed function $v$) aimed at eliminating the first-order term shows that substituting $$y(x) := \frac{u(x)}{\cos x}$$ simplifies the differential expression on the l.h.s. of the equation to $$\frac{u''(x)}{\cos x},$$ and so rearranging gives the entirely tractable equation $$u''(x) = \sin x \cos x$$ in $u(x)$: Since only the second derivative of $u$ appears, this amounts to two (easy) integrations.
show that $$\frac{1}{\cos(x)}$$ and $$\frac{x}{\cos(x)}$$ are solutions