It is asked to solve the ODE $x''(t)-2x'(t) + x(t) = 2 \sin(3t)$ for $x(0)=10, \; x'(0)=0$
It is equivalent to the first order system in two variables
$$\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix}0 \\ 1 \end{bmatrix} 2 \sin(3t), \; \begin{bmatrix}x_0 \\ y_0 \end{bmatrix} = \begin{bmatrix} 10 \\ 0 \end{bmatrix}$$
If
$$A = \begin{bmatrix} 0 & 1 \\ -1 & 2 \end{bmatrix} , B = \begin{bmatrix}0 \\ 1 \end{bmatrix}$$
the solution for this ODE of first order is
$$ e^{tA} \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} + \int_0^t e^{(t-s)A}2B\sin(3s)ds $$
I know we could look for the characteristic polynomial of the equation and try to find a solution which combines sines and cosines terms, but since I am studying resolution of second order systems using first order ones, I would like to check if this is a good way of solving it. The exponential of the matrix $tA$, for example, doesn't seems to have a good form (except if I wrote something wrong). So, what is the better way of solving it?
Thanks in advance!
Edit:
$$A = \begin{bmatrix} 0 & 1 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 1&-1 \\ 1&0 \end{bmatrix} \begin{bmatrix} 1&1 \\0 &1 \end{bmatrix} \begin{bmatrix}0 &1 \\ -1&1 \end{bmatrix}$$
$$\Rightarrow e^{t\begin{bmatrix} 1& 1\\0 &1 \end{bmatrix}} = e^{t\begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix} + \begin{bmatrix} 0&t \\ 0&0 \end{bmatrix}}=\begin{bmatrix}e^t &0 \\0 &e^t \end{bmatrix} \begin{bmatrix} 1&t \\0 &1 \end{bmatrix}$$
Let $D=\dfrac d{dt}$
We have particular solution: $$D^2(x)-2Dx+x=2\sin(3t)$$ $$(D^2-2D+1)x=2\sin(3t)$$ $$x=\dfrac 2{D^2-2D+1} (\sin(3t))$$ $$=\dfrac 2{-9-2D+1}(\sin(3t))$$ $$=-\dfrac 1{D+4}(\sin(3t))$$ $$=-\dfrac{D-4}{D^2-16}(\sin(3t))$$ $$=\dfrac{D-4}{25}(\sin(3t))$$ $$=\dfrac 3{25}\cos(3t)-\dfrac 4{25}\sin(3t)$$ And the general solution is $x=\dfrac 3{25}\cos(3t)-\dfrac 4{25}\sin(3t)+C_1e^x+C_2xe^x$
I have used the fact that $f(D^2)\sin(ax)=f(-a^2)\sin(ax)$ for polynomial $f$.
This can be easily verified so I am not showing it here.