Solution (source code)

= Solution

The <characteristic equation> of the <homogeneous linear differential equation> is $m^2+m-2=(m-1)(m+2)=0$, giving the <homogeneous solution> $Ae^t+Be^{-2t}$. For the first forcing, a <particular solution> of the form $Ce^{-t}$ gives $-2C=1$, so
$$
y=Ae^t+Be^{-2t}-\tfrac12e^{-t}.
$$
The <initial conditions> impose $A+B=1/2$ and $A-2B=-1/2$, whence $A=1/6$, $B=1/3$. Thus \b[the first solution is]
$$
\boxed{y(t)=\tfrac16e^t+\tfrac13e^{-2t}-\tfrac12e^{-t}.}
$$
For the second forcing, $e^t$ is already a <homogeneous solution>, so the usual exponential trial must be multiplied by $t$. Substitution of the <particular solution> $Cte^t$ gives $3Ce^t=e^t$, hence $C=1/3$. Now $y=Ae^t+Be^{-2t}+te^t/3$, and the <initial conditions> give $A+B=0$, $A-2B=-1/3$. Therefore \b[the resonant solution is]
$$
\boxed{y(t)=\left(\tfrac t3-\tfrac19\right)e^t+\tfrac19e^{-2t}.}
$$
The additional factor $t$ reflects <resonance in a differential equation>.