5
« on: October 30, 2013, 08:54:48 PM »
Let the solution $y=y_c+Y$,
The characteristic equation for the homogeneous equation $y''-y'-2y=0$ is
$$r^2-r-2=0$$
Solving the equation we have $r_1=2, r_2=-1$ and hence $$y_c=C_1\exp(2t)+C_2\exp(-t)$$
Let $Y=At^2+Bt+C$, $Y'=2tA+B$, $Y''=2A$.
$Y''-Y'-2Y=(2A)-(2tA+B)-2(At^2+Bt+C)=(-2A)t^2+(-2A-2B)t+(2A-B-2C)=-2t+4t^2$
By comparing the coefficients,
$$
\left\{\begin{aligned}
&-2A=4,\\
&-2A-2B=-2,\\
&2A-B-2C=0.
\end{aligned}\right.
$$
Then,
$$
\left\{\begin{aligned}
&A=-2,\\
&B=3,\\
&C=-7/2.
\end{aligned}\right.
$$
So, $Y=-2t^2+3t-\frac{7}{2}$ and hence $$y=y_c+Y=C_1\exp(2t)+C_2\exp(-t)-2t^2+3t-\frac{7}{2}$$