Particular solution to $y'' - 3y' + 2y = 2e^x$ Im trying to find the particular solution to: $$y'' - 3y' + 2y = 2e^x$$
I already have the homogenous solution so this is not my problem.
Assuming that $y_p = Ae^x \to {y'}_p = Ae^x \to {y''}_p = Ae^x$ we have:
$$Ae^x - 3Ae^x + 2Ae^x = 2e^x$$
$$0 \cdot Ae^x = 2e^x$$
$$0 = 2$$
Which is very bad. What am I doing wrong here?
 A: $y^{\prime \prime}−3y^{\prime}+2y= 2e^x$. Use operator D:
Let $D = d/dx$. So, $(D^2 - 3D + 2)y_p = 2e^x \quad \Rightarrow \quad (D-1)(D-2)y_p = 2e^x \quad \Rightarrow$
$y_p = \dfrac{1}{(D-1)(D-2)}\cdot 2e^x = 2e^x\dfrac{1}{(D+1-1)(D+1-2)}\cdot 1 = 2e^x\dfrac{1}{D(D-1)}\cdot 1 \quad \Rightarrow$
$y_p = 2e^x\dfrac{1}{D(0-1)\cdot 1} = -2e^x\dfrac{1}{D}\cdot 1 = -2xe^x$ 
Look this blog: http://fatosmatematicos.blogspot.com/2011/02/o-metodo-da-chave-invertida-para-achar.html
A: This is too long for a comment, so I posted it as an answer. First solve for the homogeneous equation $y'' - 3y' + 2y =0$ by setting the right hand side to be zero. The auxiliary equation is $m^2-3m+2=0$, which has roots $m=2,1$. Therefore the solution for this homogeneous equation is $e^x$ and $e^{2x}$. Now we want to find a particular solution $y'' - 3y' + 2y = 2e^x$. Normally we set the particular solution to be $Ae^{x}$. However, it duplicates with the solution of the homogeneous solution, therefore, we multiple it with $x$ until no duplication occurs. Therefore, the particular solution is given by $Axe^{x}$.
Let me do another example: to solve $y'' - 2y' + y = 2e^x$. First solve the homogenous equation $y'' - 2y' + y = 0$. The auxiliary equation is $m^2-2m+1=0$ which has double roots $m=1$. Therefore, the solution for this homogeneous equation is $e^x$ and $xe^{x}$. Now if we want to find a particular solution $y'' - 2y' + y = 2e^x$. Normally we set the particular solution to be $Ae^{x}$. However, it duplicates with the solution of the homogeneous solution, therefore, we multiple it with $x$ and it becomes $Axe^x$, but it still duplicates with $xe^{x}$. Therefore, we mupltiply it by $x^2$, and the particular solution is given by $Ax^2e^{x}$.
A: The simplest thing in your case is probably to use this (easily justified) trick:
If $p(x)$ is a one variable polynomial with complex coefficients and $c$ a complex number, then the ODE
$$
p\left(\frac{d}{dx}\right)y=e^{cx}
$$
has a solution of the form $e^{cx}\,q(x)$ where $q(x)$ is a polynomial whose degree is the number of roots of $p(x)$ equal to $c$. 
In you case, $p(x)=(x-1)(x-2)$, $c=1$, so the trick tells you to look for a solution of the form 
$$
(ax+b)\ e^x,
$$
and you can clearly assume $b=0$.
