Example 6. Find the general solution of the equation

$$
y^{\prime \prime}-3 y^{\prime}=x^{2}
$$
Solution. Since in this case $q=0$ (the term containing $y$ is absent in the left part), according to formula (10.34), we look for a particular solution in the form

$$
\bar{y}=x\left(A x^{2}+B x+C\right), \bar{y}=A x^{3}+B x^{2}+C x
$$

Substituting the expressions

$$
\bar{y}^{\prime}=3 A x^{2}+2 B x+C, \bar{y}^{\prime \prime}=6 A x+2 B,
$$

we get

$$
(6 A x+2 B)-3\left(3 A x^{2}+2 B x+C\right) \equiv x^{2}
$$

or

$$
-9 A x^{2}+(6 A-6 B) x+2 B-3 C \equiv x^{2}
$$

from which

$$
-9 A=1,6 A-6 B=0,2 B-3 C=0
$$

Therefore,

$$
\bar{y}=-\frac{1}{9} x^{3}-\frac{1}{9} x^{2}-\frac{2}{27} x
$$

The corresponding homogeneous equation

$$
y^{\prime \prime}-3 y^{\prime}=0
$$

has the general solution

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

since for the characteristic equation $k^{2}-3 k=0$ we get $k_{1}=0, k_{2}=3$

By formula (10.21), we obtain the general solution

$$
y=C_{1}+C_{2} e^{3 x}-\frac{1}{9} x^{3}-\frac{1}{9} x^{2}-\frac{2}{27} x
$$