Example 3. Integrate the equation

$$
y^{\prime \prime}-4 y^{\prime}+4 y=e^{2 x}
$$
Solution. The corresponding homogeneous equation

$$
y^{\prime \prime}-4 y^{\prime}+4 y=0
$$

has the general solution

$$
y_{0}=\left(C_{1}+C_{2} x\right) e^{2 x}
$$

since the characteristic equation

$$
k^{2}-4 k+4=0
$$

has equal roots $k_{1}=k_{2}=2$.

A particular solution of the original equation is sought in the form $\bar{y}=A x^{2} e^{2 x}$, because $m=2$ is a double root of the characteristic equation. We find the derivatives of the function $\bar{y}$:

$$
\bar{y}^{\prime}=2 A x e^{2 x}+2 A x^{2} e^{2 x} ; \quad \bar{y}^{\prime \prime}=2 A e^{2 x}+8 A x e^{2 x}+4 A x^{2} e^{2 x}
$$

and substitute the expressions for $\bar{y}, \bar{y}^{\prime}, \bar{y}^{\prime \prime}$ into the equation, we get

$$
2 A e^{2 x}+8 A x e^{2 x}+4 A x^{2} e^{2 x}-4\left(2 A x e^{2 x}+2 A x^{2} e^{2 x}\right)+4 A x^{2} e^{2 x} \equiv e^{2 x}
$$

or

$$
2 A e^{2 x} \equiv e^{2 x}
$$

from which

$$
2 A=1, A=\frac{1}{2}
$$

Thus, the particular solution is $y=\frac{1}{2} x^{2} e^{2 x}$, and the general solution is given by the formula

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