Example 8. Find the general solution of the equation

$$
y^{\prime \prime}+2 y^{\prime}+5 y=e^{-x} \cos 2 x
$$
Solution. The characteristic equation $\lambda^{2}+2 \lambda+5=0$ has roots $\lambda_{1,2}=-1 \pm 2 i$, so

$$
y_{0.0}=\left(C_{1} \cos 2 x+C_{2} \sin 2 x\right) e^{-x}
$$

Since the number $\alpha+i \beta=-1+2 i$ is a simple root of the characteristic equation, we need to look for $y_{\text {ch.n }}$ in the form (see table 1, case IV (2))

$$
y_{\text {ch.H }}=x(A \cos 2 x+B \sin 2 x) e^{-x}
$$

then

$$
\begin{aligned}
& y_{\text {ch.H }}^{\prime}=e^{-x}[(A-A x+2 B x) \cos 2 x+(B-B x-2 A x) \sin 2 x] \\
& y_{4.4}^{\prime \prime}=e^{-x}[(-2 A-3 A x+4 B-4 B x) \cos 2 x+(-2 B-3 B x-4 A+4 A x) \sin 2 x] .
\end{aligned}
$$

Substituting the expressions for $y_{\text {ch.n }}$ and its derivatives into the original equation and canceling by $e^{-x}$, we get

$$
-4 A \sin 2 x+4 B \cos 2 x=\cos 2 x
$$

from which $A=0, B=\frac{1}{4}$ and, therefore,

$$
y_{4.4}=\frac{1}{4} x e^{-x} \sin 2 x
$$

The general solution of the given equation is

$$
y(x)=\left(C_{1} \cos 2 x+C_{2} \sin 2 x\right) e^{-x}+\frac{1}{4} x e^{-x} \sin 2 x
$$

## Problems for Independent Solution

Determine the form of the particular solution of the linear inhomogeneous differential equation, given the roots of its characteristic equation and the right-hand side $f(x)$:

454. $\lambda_{1}=1, \quad \lambda_{2}=2$

$f(x)=a x^{2}+b x+c$.
455. $\lambda_{1}=0, \quad \lambda_{2}=1$

$f(x)=a x^{2}+b x+c$.

456. $\lambda_{1}=0, \quad \lambda_{2}=0$

$f(x)=a x^{2}+b x+c$
457. $\lambda_{1}=1, \quad \lambda_{2}=2$

$f(x)=e^{-x}(a x+b)$.
458. $\lambda_{1}=-1, \quad \lambda_{2}=1$;

$f(x)=e^{-x}(a x+b)$.
459. $\lambda_{1}=-1, \quad \lambda_{2}=-1$;

$f(x)=e^{-x}(a x+b)$.
460. $\lambda_{1}=0, \quad \lambda_{2}=1$

$f(x)=\sin x+\cos x$.

461. $\lambda_{1}=-i, \quad \lambda_{2}=i$;

$f(x)=\sin x+\cos x$.

462. $\lambda_{1}=-2 i, \quad \lambda_{2}=2 i$;

$f(x)=A \sin 2 x+B \cos 2 x$.
463. $\lambda_{1}=-k i, \quad \lambda_{2}=k i$;

$f(x)=A \sin k x+B \cos k x$.
464. $\lambda_{1}=1, \quad \lambda_{2}=1$;

$f(x)=e^{-x}(A \sin x+B \cos x)$.

465. $\lambda_{1}=-1-i, \quad \lambda_{2}