Unwarranted Factor of t in Particular Solution 
$y'' + 3y' + 2y = t^2e^{-2t}$

The associated homogeneous solution is $y_h = Ce^{-2t} + De^{-t}$.  My understanding is that a product of any number of functions, which are each termwise-proportional to their own derivatives, is itself termwise-proportional to its own derivative.
If this is correct, then the guess for a particular solution would be $y_p = (at^2 + bt + c)(e^{-2t})$ (the proportionality constant for $e^{-2t}$ gets lumped into $a$, $b$, and $c$).  However, this yields an inconsistent algebraic system for $a$, $b$, and $c$.  I have been told to multiply the guess by $t$ because this makes the correct terms pop out, but I don't understand why.  After checking via two different methods, I am confident that $e^{-2t}$, $e^{-t}$, and $t^2e^{-2t}$ are linearly independent.  While multiplication by $t$ works, it seems unwarranted, as this maneuver is supposed to come into play only when the associated homogeneous solution and forcing term are linearly dependent, as implied here and in pretty much every explanation of the undetermined coefficients.
The rule cannot be that for $y'' + p(x)y' + q(x)y = f(t)g(t)h(t)...$, each factor in the forcing term has to be linearly independent with the associated homogeneous solution, as $y'' + 3y' + 2y = (e^{-2t})(e^{-3t})(e^{-4t})$ would serve as a counterexample.  Why is the guess in this problem multiplied by an additional factor of $t$, even though the homogeneous solution and forcing term are linearly independent?
 A: Problems of the form $p(D) y = q(t) e^{at}$ where $p,q$ are polynomials, $D$ is the derivative operator, and $a$ is a complex number, have a rather algorithmic way to construct the particular solution. Namely:


*

*Determine the order $k$ of the zero of $p$ at $t=a$.

*Take a particular solution of the form $t^k r(t) e^{at}$ where $r$ is a polynomial of the same degree as $q$.


In your problem, $p(t)=t^2+3t+2$ has a zero of order $1$ at $t=-2$, so you take a solution of the form $t(at^2+bt+c) e^{at}$. 
Why does this extra $t^k$ come into play? A reason to start with is that if you tried to use a polynomial of the same degree as $q$, the lowest $k$ coefficients would be killed by $p(D)$, so you would have fewer free coefficients than there are coefficients in $q$. So you have to do something different. 
But a followup question is, why does this not break entirely, i.e. why isn't $p(D) t^3 e^{at}$ a cubic times $e^{at}$ (as it would be if $p(a)$ were not zero)? You can see that by thinking of the product rule: the cubic part of $p(D) t^3 e^{at}$ is given by applying all the derivatives to the $e^{at}$, which results in a factor of $p(a)$, so that term disappears. Once any derivatives hit $t^3$, you're getting a quadratic.
A different answer for intuition is to look back at first order equations: consider that $y'-ay=e^{at}$ easily gives the factor of $t$ by using the method of integrating factors. This intuition can then be used for actual calculation by operator-factoring $p(D)$. In your example, $p(D)=(D+2)(D+1)$, so replacing $u=(D+1)y=y'+y$ results in $(D+2)u=t^2 e^{-2t}$ which can be solved by the method of integrating factors, and doing so gives the extra factor of $t$ "automatically".
A: Another way to solve this ODE consists in reducing it to a first order ODE
\begin{align*}
y^{\prime\prime} + 3y^{\prime} + 2y = t^{2}e^{-2t} = 0 \Longleftrightarrow (y^{\prime} + y)^{\prime} + 2(y^{\prime} + y) = t^{2}e^{-2t} \Longleftrightarrow w^{\prime} + 2w = t^{2}e^{-2t}
\end{align*}
where $w = y^{\prime} + y$. Multiplying both sides by $e^{2t}$, one obtains
\begin{align*}
e^{2t}w^{\prime} + 2e^{2t}w = t^{2} \Longleftrightarrow (e^{2t}w)^{\prime} = t^{2} \Longleftrightarrow e^{2t}w = \frac{t^{3}}{3} + k \Longleftrightarrow w = \frac{t^{3}e^{-2t}}{3} + ke^{-2t}
\end{align*}
Finally, we are led to solve
\begin{align*}
y^{\prime} + y = \frac{t^{3}e^{-2t}}{3} + ke^{-2t}
\end{align*}
A: To expand a bit on Ian’s answer, let’s look more closely at what goes wrong when we try a particular solution of the form $py_h$, where $p$ is a polynomial in $t$ and $y_h$ a solution to the homogeneous equation: $$\begin{align} (py_h)''+3(py_h)'+2(py_h) &= (p''y_h+2p'y_h'+py_h'')+3(p'y_h+py_h')+2py_h \\
&=(y_h''+3y_h'+2y_h)p + (2y_h'+3y_h)p' + y_hp''. \end{align}$$ The first term vanishes, while $y_h$ and $y_h'$ are various linear combinations of exponentials, so we must look to $p'$ and $p''$ to produce a term in $t^2$. This means that $p$ must be at least cubic.  
More generally, for the equation $p(D)y=q(t)e^{at}$, if you try $r(t)e^{at}$, where $r$ is some polynomial in $t$, the left-hand side term with the highest power of $t$ comes from $(p(D)e^{at})r$, but if $e^{at}$ is a solution to the homogeneous equation, this term vanishes. The other terms all involve derivatives of $r$, so $r$ must be a higher-degree polynomial than $q$. Ian’s answer tells you just how much higher it needs to be.
