Finding the general solution to a non-homogeneous ordinary differential equation

How do I go about solving this question?:

Find the general solution of the non-homogeneous ODE

$y''+\frac 12y'+\frac{1}{16}y=cos(\frac x4)$.

Solving the homogeneous equation, I get the real root $\lambda$ = $\frac{-1}{4}$.

This gives the general solution $y_h=e^{\frac{-x}{4}}(C_1 + C_2x)$.

What do I do next?

• look at the solution to $y'' = 0.$ see what happens. – abel May 4 '15 at 19:26

yes and the homogeneous equation has the solution $C_1xe^{-1/4x}+C_2e^{-1/4x}$
When the auxiliary equation has a double root $\lambda$ as you have here, the complementary function must be of the form $$(Ax+B)e^{\lambda x}$$ Your next step is to find the particular integral which must be of the form$$y=P\cos(\frac x4)+Q\sin(\frac x4)$$ Substitute this expression into the entire differential equation to find the constants $P$ and $Q$ and then you're done.