Example 9. Solve the equation

$$
y^{\prime \prime}-6 y^{\prime}+9 y=4 e^{x}-16 e^{3 x}
$$
Solution. The characteristic equation $\lambda^{2}-6 \lambda+9=0$ has roots $\lambda_{1}=\lambda_{2}=3$, and therefore the general solution of the corresponding homogeneous equation will be

$$
y_{0.0}=C_{1} e^{3 x}+C_{2} x e^{3 x}
$$

To find a particular solution of the non-homogeneous equation (14), we will find particular solutions of two equations

$$
\begin{aligned}
& y^{\prime \prime}-6 y^{\prime}+9 y=4 e^{x} \\
& y^{\prime \prime}-6 y^{\prime}+9 y=-16 e^{3 z}
\end{aligned}
$$

Equation (15) has a particular solution $y_{1}$ of the form $y_{1}=A e^{x}$ (see Table 1, case II (1)). Substituting the expression for $y_{1}$ into equation (15), we find $A=1$, so $y_{1}=e^{x}$. A particular solution of equation (16) is sought in the form $y_{2}=B x^{2} e^{3 x}$ (see Table 1, case II (2)). We find $y_{2}=-8 x^{2} e^{3 x}$.

By the principle of superposition of solutions, a particular solution of the given non-homogeneous equation will be equal to the sum of the particular solutions $y_{1}$ and $y_{2}$ of equations (15) and (16)

$$
y_{\text {I.H }}=y_{1}+y_{2}=e^{x}-8 x^{2} e^{3 x}
$$

The general solution of equation (14)

$$
y=\left(C_{1}+C_{2} x\right) e^{3 x}+e^{x}-8 x^{2} e^{3 x}
$$