Example 3. Solve the system

$$
\left\{\begin{array}{l}
\frac{d x}{d t}=x+2 y \\
\frac{d y}{d t}=x-5 \sin t
\end{array}\right.
$$
Solution. The characteristic equation

$$
\left|\begin{array}{cc}
1-\lambda & 2 \\
1 & -\lambda
\end{array}\right|=0, \quad \text { or } \quad \lambda^{2}-\lambda-2=0
$$

The roots of the characteristic equation are $\lambda_{1}=-1, \lambda_{2}=2$. The general solution of the corresponding homogeneous system:

$$
\tilde{x}=C_{1} e^{-t}+2 C_{2} e^{2 t}, \quad \tilde{y}=-C_{1} e^{-t}+C_{2} e^{2 t}
$$

We find a particular solution of the non-homogeneous system (14), given that $f_{1}(t)=0, f_{2}(t)=-5 \sin t$. Write $x_{4, \text { and }}$ and $y_{4, \text {. }}$ as

$$
x_{\text {Y.H }}=A \cos t+B \sin t, \quad y_{\text {Y.H }}=M \cos t+N \sin t
$$

and substitute into system (14):

$$
\begin{aligned}
-A \sin t+B \cos t & =A \cos t+B \sin t+2 M \cos t+2 N \sin t \\
-M \sin t+N \cos t & =A \cos t+B \sin t-5 \sin t
\end{aligned}
$$

Equate the coefficients of $\sin t$ and $\cos t$ on both sides of the equations:

$$
\left\{\begin{aligned}
-A & =B+2 N \\
B & =A+2 M \\
-M & =B-5 \\
N & =A
\end{aligned}\right.
$$

from which $\boldsymbol{A}=-1, \boldsymbol{B}=3, M=2, N=-1$, so that

$$
x_{\text {Y.H }}=-\cos t+3 \sin t, \quad y_{\text {Y.H. }}=2 \cos t-\sin t .
$$

The general solution of the original system:

$$
\begin{aligned}
& x=\widetilde{x}+x_{\text {Y.H }}=C_{1} e^{-t}+2 C_{2} e^{2 t}-\cos t+3 \sin t \\
& y=\widetilde{y}+y_{\text {Y.H }}=-C_{1} e^{-t}+C_{2} e^{2 t}+2 \cos t-\sin t
\end{aligned}
$$