Solve $y''''-2y'''+2y'-y=e^x.$ My attempt: The characteristic polynomial and the solutions gives the homogenous solutions $$p(r)=r^4-2r^3+2r-1=(r+1)(r-1)^3\Rightarrow y_h=Ae^{-x}+(B+Cx+Dx^2)e^{x}.$$
In order to find the particular solution, let's substitute $y=ze^x,$ where $z=z(x).$ We obtain a new differential equation in terms of $z(x)$, whose characteristic equation is
$$p(r-1)=(r-1)^4-2(r-1)^3+2(r-1)-1=r^4-6r^3+12r^2-8r.$$
This means that we get $z''''-6z'''+23z''-8z'=1,$ after dividing both sides with $e^x>0.$ So the particular solution in terms of $z$ is $z_p=-\frac{x}{8}$ and this gives $y_p=z_pe^x=-\frac{xe^x}{8}.$ Finally we have that
$$y(x)=y_h+y_p=Ae^{-x}+(B+Cx+Dx^2)e^x-\frac{xe^x}{8}.$$
Which is wrong, because the last term should be $+\frac{x^3e^x}{12}.$ Need help sorting this out, but other methods of solving are welcome.
 A: made for the particular solution the ansatz $$y_P=Ae^xx^3+Be^xx^2+Ce^xx+De^x$$
A: Let $D$ be a shorthand for the operator $\frac{d}{dx}$. For any constant $a$ and function $f(x)$, we have the identity
$$e^{ax} D(e^{-ax}f(x)) = (D-a) f(x)$$
We will abuse notation and write this sort of relation as 
$$e^{ax} D e^{-ax} = D - a$$
The $e^{\pm ax}$ here should be interpreted as an operator on the space of function whose effect on any function is pointwise multiplication by $e^{\pm ax}$.
For any polynomial $P(t)$, we have following identity on operators.
$$e^{ax}P(D)e^{-ax} = P(D-a)$$
Notice $r^4 - 2r^3 + 2r - 1 = \color{red}{(r-1)^3(r+1)}$ instead of what stated in the original version of question. The ODE at hand can be rewritten as
$$(D-1)^3(D+1) y = e^x \iff \left[ e^x D^3(D+2) e^{-x} \right] y = e^x
\iff \left[ D^3(D+2) \right] (e^{-x}y) = 1
$$
It is easy to see $\frac12\frac{x^3}{3!} = \frac{x^3}{12}$ is a solution for
$D^3(D+2) f = 1$. As a consequence, the original equation has $\frac{x^3}{12} e^x$ as a particular solution.
