Problem: Consider the second-order linear ordinary differential equation:
\[
y'' - 4y' + 4y = e^{2x}.
\]
Find the general solution to this equation.
Solution: The given differential equation is:
\[
y'' - 4y' + 4y = e^{2x}.
\]
The homogeneous equation corresponding to the given ODE is:
\[
y'' - 4y' + 4y = 0.
\]
The characteristic equation is:
\[
r^2 - 4r + 4 = 0.
\]
Solving this, we get a repeated root:
\[
r = 2 \quad \text{(with multiplicity 2)}.
\]
Therefore, the general solution to the homogeneous equation is:
\[
y_h(x) = (C_1 + C_2 x) e^{2x},
\]
where \( C_1 \) and \( C_2 \) are arbitrary constants.
Since the right-hand side of the equation is \( e^{2x} \) and \( r = 2 \) is a repeated root of the characteristic equation, we assume a particular solution of the form:
\[
y_p(x) = A x^2 e^{2x},
\]
where \( A \) is a constant to be determined. Differentiating \( y_p(x) \) twice, we get:
\[
y_p'(x) = A (2x + 2x^2) e^{2x},
\]
\[
y_p''(x) = A (2 + 8x + 4x^2) e^{2x}.
\]
Substituting \( y_p(x) \), \( y_p'(x) \), and \( y_p''(x) \) into the original equation, we obtain:
\[
A (2 + 8x + 4x^2) e^{2x} - 4A (2x + 2x^2) e^{2x} + 4A x^2 e^{2x} = e^{2x}.
\]
Simplifying, we find:
\[
2A e^{2x} = e^{2x}.
\]
Thus, \( A = \frac{1}{2} \), and the particular solution is:
\[
y_p(x) = \frac{1}{2} x^2 e^{2x}.
\]
The general solution to the non-homogeneous equation is the sum of the homogeneous solution and the particular solution:
\[
y(x) = y_h(x) + y_p(x) = (C_1 + C_2 x) e^{2x} + \frac{1}{2} x^2 e^{2x}.
\]