<s>[INST] Solve $y''-3y'+2y=x^2$ Solve $$y''-3y'+2y=x^2$$
My approach:
Homogen solution:
$$y = Ae^x +Be^{2x}$$
Particular solution:
$$ y_p = x(Ax^2+Bx+C) = Ax^3+Bx^2+Cx $$
$$ y_p' = 3Ax^2 + 2Bx + C$$
$$y_p'' = 6Ax + 2B$$
Put his into the initial equartion to get A, B and C gives me:
$A=0, B=1/2, C=3/2$
This leads me to the answer:
$$y = Ae^x +Be^{2x}  + x^2/2 + 3x/2$$
However the correct answer is
$$y = Ae^x +Be^{2x}  + x^2/2 + 3x/2+ 7/4$$
Where's my miss? Where comes the last term from?
 [/INST] Another way is to use the operator D:
$$
y^{\prime \prime} -3y^{\prime} + 2y = x^2 \quad \Rightarrow \quad (D^2-3D + 2)y = x^2 \quad \Rightarrow 
$$
$$
(D-1)(D-2)y = 0 + x^2 \quad \Rightarrow \quad y(x) = \dfrac{1}{(D-1)(D-2)}\cdot 0 + \dfrac{1}{2 - 3D + D^2}\cdot x^2 
$$
Hence,
$$
y(x) = C_1e^x + C_2e^{2x} + \biggl[\dfrac{1}{2} + \dfrac{3D}{4} + \dfrac{7D^2}{8} + \dfrac{15D^3}{8} + \ldots\biggr]x^2
$$
$$
y(x) = C_1e^x + C_2e^{2x} + \dfrac{x^2}{2} + \dfrac{3x}{2} + \dfrac{7}{4}
$$
</s>