Find a particular solution of a nonhomogenous equation Find a particular solution to $y''-2y' + y= {e^{px}}$ 
where p is any real constant.
My attempt/idea is as follows:
Since $Y_p$ is ${e^{px}}$ and it appears in the complementary solution, $Y_c$ is $c_1{e^x} + c_2x{e^x}$ , we will have to multiply $Y_p$ by $x^2$ so that $Y_p$ becomes $A{x^2}e^x$
Then, find $Y_p'$ and $Y_p''$ to get:
$2Ae^x = e^{px}$
$2A = 1$
$A= \frac{1}{2}$
Then, $Y_p = \frac{1}{2}x^2e^{px}$
Is this right?

Working the differential equation in the most general manner, the particular solution is $$y_p=\frac{e^{p x}}{(p-1)^2}$$ which shows that  the  case of $p=1$ is totally different from the other possible cases just as Dylan pointed it out.
