# Multiply by $t$ to account for $e^t$ in the homogeneous solution

$$y'' - y' = e^t \sin{t}$$

So far I have $\lambda(\lambda - 1) = 0 \quad\implies\quad \lambda_1 = 0 \quad\land\quad \lambda_2 = 1 \qquad\implies y_h(t) = c_1+c_2e^t$

This line brings me my question: $$y_p(t) = t\left(c_1e^t\sin{t} + c_2e^t\cos{t} \right)$$

Why do I not have to multiply by $t$? I noticed WolframAlpha disagreed.

The general method I was under the impression of, was that if anything in the form of a solution I am currently looking for was in the homogeneous solution, I had to expand by $t$. Clearly that is not correct(?).. Would a kind soul be able to shed some light on this matter?

Thank you so much for any help. :-)

-
If you multiply by $e^{-t}$ at the beginning you then have an integrating factor and it becomes easier to solve. – user88595 May 2 '14 at 13:51
@user88595, I'm aware - but I need practice with undetermined coefficients. :-) – Erlend May 2 '14 at 14:20
$e^t$ is a solution to the homogeneous equation, but neither $e^t\cos(t)$ nor $e^t\sin(t)$ are solutions to the homogeneous equation, so it suffices to try a particular solution of the form $Ae^t\sin(t) + Be^t\cos(t)$. This might be easier to see using annihilators. Your equation is $(D^2-D)y = e^t\sin(t)$, and $e^t\sin(t)$ is annihilated by $(D-1)^2 + 1$, so $y$ satisfies $(D^2-D)((D-1)^2+1)y = 0$, whence $y = c_1 + c_2 e^t + Ae^t\cos(t) + Be^t\sin(t)$, and noting that the first two terms are the complementary solution, the last two must be the particular solution. – Nicholas Stull May 2 '14 at 14:34
You should make that an answer, because it did answer my question! Thank you, @NicholasStull – Erlend May 2 '14 at 14:50

Note that while $e^t$ is a solution to the homogeneous equation, neither $e^t\cos(t)$ nor $e^t\sin(t)$ are solutions to the homogeneous equation, so it suffices to try a particular solution of the form $$Ae^t\sin(t) + Be^t\cos(t)$$
If instead you had an equation such as $y'' - 2y' + 2y = e^t\sin(t)$, then because the complementary solution is $y_c = c_1 e^t\cos(t) + c_2 e^t\sin(t)$, here, you do need to multiply by $t$, so that you would have a trial solution for the particular solution of the form $$y_p = t(Ae^t\cos(t) + Be^t\sin(t))$$
One thing I might add is (as I said in my comment), this might be easier to see in terms of annihilators. Looking at your equation, which was (with $D$ the derivative) $$y'' - y' = (D^2-D)y = e^t\sin(t)$$ we notice that $D^2 - D = D(D-1)$ exactly annihilates all functions of the form $c_1 + c_2e^t$, which is our complementary solution, and then we notice that $(D-1)^2+1$ annihilates $e^t\sin(t)$ (this is an easy thing to check, and is just a computation). So our equation could be written $$((D-1)^2+1)D(D-1)y = 0$$ which has solution precisely $$y = c_1 + c_2 e^t + Ae^t\cos(t) + Be^t\sin(t)$$ and since the first two terms are exactly our complementary solution, the rest of the terms must be the trial solution which will give the particular solution after we use the method of undetermined coefficients.
Also, returning to the example above, in terms of annihilators, if we had the equation $$y'' - 2y' + 2y = e^t\sin(t)$$ then this can be rewritten (as above) in terms of annihilators as $$((D-1)^2+1)^2y = 0$$ which has solution of the form $$y = c_1 e^t \cos(t) + c_2 e^t\sin(t) + t\left( A e^t \cos(t) + B e^t\sin(t)\right)$$ and since the first two terms are exactly the complementary solution, the rest of the terms give the form of the trial solution we use the method of undetermined coefficients on to find the particular solution.