Finding solutions of $y'''-4y''+5y'-2y=-x^2+5x+2$ Find all solutions of $$y'''-4y''+5y'-2y=-x^2+5x+2.$$
I know how to find the solutions of the corresponding homogenous differential equation $y'''-4y''+5y'-2y=0$. I've done that in the following way:
The characteristic equation is $$P(x) = x^3 - 4x^2 +5x-2=(x-1)^2(x-2).$$
So if we put $$f_1:x\mapsto e^x\\f_2:x\mapsto xe^x\\f_3:x\mapsto e^{2x}$$ then the solution basis is $$\{f_1, f_2, f_3\}$$ and all solutions are linear combinations of this basis.
However, I am not sure how to deal with the inhomogenous part of the differential equation.
Please share the general approach with me.

For the particular solution, I usually just guess. For this particular problem, a quadratic polynomial $y(x)=ax^2+bx+c$ seems like a reasonable candidate (edit: because the RHS is also a quadratic polynomial). If you play around with the arithmetic, you will see that 
$$
y(x)=\frac{1}{2}x^2-3
$$ 
works.
