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.

Hint
It may not be a very academic solution but since you found the solution for the homogenous part, let us set, because the rhs is a polynomial, that $$y=c_1 e^x+c_2 x e^{x}+c_3 e^{2x}+P(x)$$ Differentiate three times and substitute. You end with $$P'''(x)-4 P''(x)+5 P'(x)-2 P(x)=-x^2+5x+2$$
Try $P(x)=a+bx+x^2+dx^3$ and identify.
