= Solution
The <characteristic equation> is $m^2+3m+2=(m+1)(m+2)=0$, giving the <complementary function> $C_1e^{-x}+C_2e^{-2x}$. For the forcing term $x$, a linear <particular solution> $ax+b$ gives $2ax+3a+2b=x$, hence $a=1/2$, $b=-3/4$.
The forcing $-e^{-x}$ gives <resonance in a differential equation>, since $e^{-x}$ already appears in the <complementary function>. Try $Kxe^{-x}$. Direct differentiation gives
$$
\left(\frac{d^2}{dx^2}+3\frac d{dx}+2\right)(Kxe^{-x})=Ke^{-x},
$$
so $K=-1$. Combining the two <particular solutions> gives
$$
\boxed{y=(C_1-x)e^{-x}+C_2e^{-2x}+\frac x2-\frac34.}
$$
The factor $x$ in the <resonant exponential particular solution> is required because $-1$ is already a root of the <characteristic equation>.
Back to article page