Differential equations - show solution given by expression Show that the solution of the problem of Cauchy
$\ddot{x}(t)=-a^2x(t)+ b(t)$ with $ x(0)=x_0$ and $\dot{x}(0)=v_0$
Is given by 
$\displaystyle x(t)=x_0 \cos(at)+\frac{v_0}{a} \sin(at)+\frac{1}{a}\int_{0}^{t}b(s) \sin(a(t-s))ds$
Well, already tried to solve the problem using the methods of differential equations, in which calculated values ​​and eigenvectors. But do not get to anything feasible, and fatigue is already one, which does not help.
Thanks for all help
 A: As suggested in the comments, we can use the Laplace Transform.
$$\tag 1 x''(t)=-a^2x(t)+ b(t)$$
with $ x(0)=x_0$ and $x'(0)=v_0.$
So, we have:
$$\mathcal{L}(1) \rightarrow s^2 x(s) - sx(0) -x'(0) = -a^2 x(s) + b(s)$$
Substituting IC's, grouping  like terms and solving for $x(s)$, yields:
$$\displaystyle x(s) = \frac{s x_0}{s^2 + a^2} + \frac{v_0}{s^2 + a^2} + \frac{b(s)}{s^2 + a^2}$$
Now, using the inverse Laplace Transform, we have:
$$\displaystyle \mathcal{L}^{-1} x(s) = x(t) = x_0 \cos at + \frac{v_0}{a} \sin at + \frac{1}{a} \int_0^t b(s) \sin(a (t-s))~~ds$$
You can actually verify that this solves the DEQ.
As an alternate approach (it is not too bad for this example), you could have solved for the homogenous equation (convert second order system to two first-order systems) and found eigenvalues/eigenvectors and then solved for the particular solution. I recommend doing this approach too, just to get your hands around it!
So, we can write $x'(t) = Ax(t) + B(t)$, as:
$$x'(t) = \begin{bmatrix}0 & 1\\-a^2 & 0\end{bmatrix}x(t) + \begin{bmatrix}0 \\b(t) \end{bmatrix}$$
Find the eigenvalues/eigenvectors, solve for the IC's and then find $x(t)$.
This yields:


*

*$\displaystyle \lambda_1 = -i a, v_1 = \left(\frac{i}{a}, 1 \right)$ 

*$\displaystyle \lambda_2 = i a, v_2 = \left(-\frac{i}{a}, 1 \right)$


From these, you can already see the $\sin at$ and $\cos at$ terms from the homogeneous solution.
Next, you would find the particular solution for the time-varying forcing function.
