Example 2. Find the general solution of the non-homogeneous system

$$
\left\{\begin{array}{l}
\frac{d x}{d t}=x-2 y+e^{t} \\
\frac{d y}{d t}=x+4 y+e^{2 t}
\end{array}\right.
$$
Solution. First, we find the general solution of the corresponding homogeneous system

$$
\left\{\begin{array}{l}
\frac{d x}{d t}=x-2 y \\
\frac{d y}{d t}=x+4 y
\end{array}\right.
$$

The characteristic equation is

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

The roots of this equation are $\lambda_{1}=2, \lambda_{2}=3$. For the root $\lambda_{1}=2$, the corresponding particular solution of the system is

$$
x_{1}=\mu_{1} e^{2 t}, \quad y_{1}=\nu_{1} e^{2 t}
$$

Substituting $x_{1}$ and $y_{1}$ into (12), we get a system of equations for finding $\mu_{1}$ and $\nu_{1}$:

$$
-\mu_{1}-2 \nu_{1}=0, \quad \mu_{1}+2 \nu_{1}=0
$$

From this, we have, for example, $\mu_{1}=2, \nu_{1}=-1$, so the first particular solution of the homogeneous system (11) is

$$
x_{1}=2 e^{2 t}, \quad y_{1}=-e^{2 t}
$$

For the root $\lambda_{2}=3$, the corresponding particular solution is

$$
x_{2}=\mu_{2} e^{3 t}, \quad y_{2}=\nu_{2} e^{3 t}
$$

The numbers $\mu_{2}$ and $\nu_{2}$ are found from the system

$$
\left\{\begin{aligned}
-2 \mu_{2}-2 \nu_{2} & =0 \\
\mu_{2}+\nu_{2} & =0
\end{aligned}\right.
$$

which is satisfied, for example, by the numbers $\mu_{2}=1, \nu_{2}=-1$. Then the second particular solution of the system (12) is

$$
x_{2}=e^{3 t}, \quad y_{2}=-e^{3 t}
$$

The general solution of the homogeneous system (12):

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

Using the method of undetermined coefficients, we find a particular solution of the non-homogeneous system (11). Based on the form of the right-hand sides $f_{1}(t)=e^{t}$ and $f_{2}(t)=e^{2 t}$, we write the form of the particular solution (see Table 1)

$$
x_{4, H}=K e^{t}+(L t+M) e^{2 t}, \quad y_{4, H}=N e^{t}+(P t+Q) e^{2 t}
$$

Substituting (13) into (11), we get

$$
\begin{aligned}
& K e^{t}+2(L t+M) e^{2 t}+L e^{2 t}=K e^{t}+(L t+M) e^{2 t}-2 N e^{t}-2(P t+Q) e^{2 t}+e^{t} \\
& N e^{t}+2(P t+Q) e^{2 t}+P e^{2 t}=K e^{t}+(L t+M) e^{2 t}+4 N e^{t}+4(P t+Q) e^{2 t}+e^{2 t}
\end{aligned}
$$

Equating the coefficients of $e^{t}, e^{2 t}$, and $t e^{2 t}$ in both parts of these identities, we get from the first:

$$
\begin{array}{l|l}
e^{t} & K=K-2 N+1 \\
e^{2 t} & 2 M+L=M-2 Q \\
t e^{2 t} & 2 L=L-2 P
\end{array}
$$

from the second:

$$
\begin{array}{l|l}
e^{t} & N=K+4 N \\
e^{2 t} & 2 Q+P=M+4 Q+1 \\
t e^{2 t} & 2 P=L+4 P
\end{array}
$$

Solving this system of equations, we find $K=-\frac{3}{2}, L=2, M=0, N=\frac{1}{2}, P=-1$, $Q=-1$. Thus, the particular solution (13) is

$$
x_{\text {Y.H }}=-\frac{3}{2} e^{t}+2 t e^{2 t}, \quad y_{4 \cdot H}=\frac{1}{2} e^{t}-(t+1) e^{2 t} .
$$

The general solution of the non-homogeneous system

$$
\begin{aligned}
& x=2 C_{1} e^{2 t}+C_{2} e^{3 t}-\frac{3}{2} e^{t}+2 t e^{2 t} \\
& y=-C_{1} e^{2 t}-C_{2} e^{3 t}+\frac{1}{2} e^{t}+(t+1) e^{2 t}
\end{aligned}
$$