How do I solve this ordinary differential equation? Consider the following ODE for $x(t)$:
$x''+ax'+16x=sin(4t)$
where $a$ is a constant.  Find the general solution for $x(t)$ for $a$=0 and then for $a$=1.
This is what I have so far:
So when $a$=0, the equation becomes
$x''+16x=sin(4t)$
Which means the complementary solution is 
$$x_{c}(t)=Acos(4t)+Bsin(4t)$$
I know I need to look for a particular solution $$x_{p}(t)=Ctcos(4t)+Dtsin(4t)$$
However, I do not know what to do past this point.
The general solution for $a=0$ is 
$$x_{c}+x_{p}=Acos(4t)+Bsin(4t)-\frac{1}{8}tcos(4t)$$
And the general solution for $a=1$ is
$$x_{c}+x_{p}=e^\frac{-t}{2}[Acos(\frac{\sqrt(63t)}{2})+Bsin(\frac{\sqrt(63t)}{2})]-\frac{1}{4}cos(4t)$$
I do not know how to get to those solutions.  Thanks for helping!
 A: In first case, particular solution has form $x_{p}(t)=t(C\cos(4t)+D\sin(4t))$ because $\pm 4i$ is solution of degree $1$ of characteristic equation $\lambda^2 + 16=0$ ($x_{p}(t)=t^s(C\cos(4t)+D\sin(4t))$ and $s=1$). Next step is to replace $x_{p}(t)$ in equation and to find $C$ and $D$.

 So, we are looking at equation $$(t C \cos 4t + t D \sin 4t)''+16( t C \cos 4x + t D \sin 4t)= \sin 4t.$$ When we expand this, we get $8D \cos 4t - 8C \sin 4t = \sin 4t$. Note: we just want one particular solution, so we need just one solution for this equation. Easiest way is to equalize parts with $\cos $ and $\sin$ and we have $8D \cos 4t = 0$ and $-8C \sin4t = \sin 4t$, or $D=0$ and $-8C=1 \implies C=-\frac{1}{8}$. So $$x_p(t)= t \cdot \left(-\frac{1}{8}\right)\cos 4t + t \cdot 0 \cdot \sin 4t = -\frac{1}{8} t\cos 4t$$

In second case particular solution has form $x_{p}(t)=C\cos(4t)+D\sin(4t)$, because $\pm 4i$ (we are choosing this number from part $=\sin 4t$) isn't solution of equation $\lambda^2 + \lambda + 16=0$, so $s=0$. Now, similar like in first case, we find $C$ and $D$. And in this case complementary solution is $$x_{c}=e^\frac{-t}{2}\left(A\cos\left(\frac{3\sqrt{7}t}{2}\right)+B\sin\left(\frac{3\sqrt{7}t}{2}\right)\right)$$ because $\lambda_{1/2}=-\frac{1}{2}(-1\pm 3\sqrt{7}i)$ are roots of equation $\lambda^2+\lambda + 16=0$.
