\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt

{\bf Question}

Find the general solution of the differential
equation:$$\frac{d^2x}{dt^2} - \frac{dx}{dt} - 2x = e^{-t} + t$$

\vspace{.25in} {\bf Answer}

$$\frac{d^2x}{dt^2} - \frac{dx}{dt} - 2x = e^{-t} + t$$

CF: \begin{eqnarray*} m^2 - m - 2 & = & 0 \\ (m - 2)(m + 1) & = &
0 \\ m & = & 2, \, -1 \\ x_c  & =  & Ae^{-t} + Be^{2t}
\end{eqnarray*}

PI: $x_1^*$ is the solution of $\displaystyle
\frac{d^2x_1^*}{dt^2} - \frac{dx_1^*}{dt} - 2x_1 = t$

Try $x_1^* = Pt + Q, $ so $\displaystyle \frac{dx_1^*}{dt} = P$
and $\displaystyle \frac{d^2x_1^*}{dt^2} = 0$

Therefore \begin{eqnarray*} \frac{d^2x_1^*}{dt^2} -
\frac{dx_1^*}{dt} - 2x_1^* = -P -2(Pt + Q) & \equiv & t
\\ \end{eqnarray*}

$\displaystyle \Rightarrow -2Pt - (-2Q - P)  \equiv  t \\
\Rightarrow 2Q - P = 0 \Rightarrow  2P = 1 \Rightarrow P =
-\frac{1}{2} {\rm \ \ and\ \ \ } Q = \frac{1}{4}$

Hence $$x_1^* = \frac{1}{4}(-2t + 1)$$

$x_2^*$ is the solution of $\displaystyle \frac{d^2x_2^*}{dt^2} -
\frac{dx_2^*}{dt} - 2x = e^{-t}$

Can not try $R e^{-t}$ because this is the same as the
complementary function.  Try instead $x_2^* = Rt e^{-t}$

\begin{eqnarray*} x_2^* & = & Rt e^{-t} \\ \frac{dx_2^*}{dt} & = &
R(1 - t) e^{-t} \\ \frac{d^2 x_2^* }{dt^2} & = & R(-1-(1-t))e^{-t}
= R(t - 2) e^{-t} \end{eqnarray*}

Hence
\begin{eqnarray*} \frac{d^2x_2^*}{dt^2} -
\frac{dx_2^*}{dt} - 2x_2^* & = & Re^{-t} \{(t-2) - (t -1) - 2t\}
\\ & = & -3Re^{-t} \\ & \equiv & e^{-t} \\ \Rightarrow R & = &
-\frac{1}{3}
\\ \end{eqnarray*}

Hence $$x = \left( A - \frac{1}{3}t\right) e^{-t} + Be^{2t} +
\frac{1}{4}(2t + 1)$$



\end{document}
