Second-order nonhomogenous differential equation $y''-6y'+5y=3e^t$ Consider the differential equation
$$y''-6y'+5y=3e^t$$
I have problem with finding particular solutions.
Find $r_+,r_-$ roots of the characteristic polynomial of the equation above.
$$r_+=5,r_-=1$$
Find $y_+,y_-$, real-valued fundamental solutions to the differential equation. These solutions must satisfy the initial conditions
$$y_+=e^{5t},y_-=e^t$$
$$y_+(0)=1,\ y'_+(0)=5$$
$$y_-(0)=1,\ y'_-(0)=1$$

Now I need to find a particular solution $y_p$ to the nonhomogeneous equation. If I try to guess according to my table:
$$y_p=y'=y''=ke^t$$
Plugging it into the original equation:
$$ke^t-6ke^t+5ke^t=3e^t$$
but the left hand side is zero so I can't find a particular solution this way. Any other way?
 A: Consider the ansatz $y=Ate^t$ where $A$ is a constant to be determined. This has derivatives
$$y'=A(t+1)e^t$$
$$y''=A(t+2)e^t$$
The differential equation requires
$$y''-6y'+5y=3e^t$$
$$A((t+2)e^t-6(t+1)e^t+5te^t)=3e^t$$
$$A((t+2)-6(t+1)+5t)=3$$
The $t$'s in the LHS cancel out, since 1 is a root of $x^2-6x+5=0$:
$$-4A=3\qquad A=-\frac34$$
Therefore a solution to the inhomogeneous equation is $y=-\frac34te^t$ and the general solution is
$$y=Ae^t+Be^{5t}-\frac34te^t$$
where $A,B$ are arbitrary constants.
A: If you are really bad at guessing (like me), you could use what's called Variation of parameter. It works like this. First, we compute the Wronskian of two solutions to the corresponding homogeneous equation. 
$$W(y_1,y_2)=
        \begin{vmatrix}
        e^{5t} & e^t \\
        5e^{5t} & e^t\\
        \end{vmatrix}
        =e^{6t}-5e^{6t}=-4e^{6t}
$$
Then you can find a particular solution using
$$y_p=-y_1\int\frac{y_2(t) g(t)}{W(y_1,y_2)}dt+y_2\int\frac{y_1(t) g(t)}{W(y_1,y_2)}dt$$
In our case, $g(t)=3e^t$. Plug in, we have
$$y_p=-e^{5t}\int\frac{3e^{2t}}{-4e^{6t}}dt+e^t\int\frac{3e^{6t}}{-4e^{6t}}dt=-\frac{3}{16}e^{t}-\frac{3}{4}te^t$$
As you can see, you already have the $e^t$ part, so you only need the $te^t$ part.
You can read more about this method here: http://www.sosmath.com/diffeq/second/variation/variation.html
