Ansatz of particular solution, 2nd order ODE Find the particular solution of $y'' -4y' +4y = e^{x}$
Helping a student with single variable calculus but perhaps I need some brushing up myself. I suggested y should have the form $Ce^{x}$. This produced the correct answer, but the solution sheet said the correct ansatz would be $z(x)e^x$. I don't understand the point of the $z$ here when $e^x$ isn't accompanied by a polynomial or whatever. Am I missing something?

Exp[x] alone is a particular equation of the ODE. On the othe hand, the canonical equation has two identical roots corresponding to r=2. Then the general equation will contain a term Exp[2x] and, because of the degeneracy a term x Exp[2x].  
So, the general solution of the ODE is y[x] = Exp[x] + (C1 + C2 x) Exp[2 x] 
