\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt

{\bf Question}

Find the general solution for the differential equation
$$\frac{d^2x}{dt^2} - 2\frac{dx}{dt} + 2x = t + \cos t$$

\vspace{.25in} {\bf Answer}

Need general solution of $$\frac{d^2x}{dt^2} - 2\frac{dx}{dt} + 2x
= t + \cos t = L[x]$$

Complementary Function: $m^2 - 2m + 2 = 0 \Rightarrow (m-1)^2 = -1
\Rightarrow m = -1 \pm j$

$\Rightarrow x(t) = e^t(A \cos t + B \sin t)$

For the particular integral to $L[x_1^*]  =  t$  try
\begin{eqnarray*}   x_1^* & = & a_1t + a_0  \Rightarrow
\frac{dx_1^*}{dt} = a_1 \Rightarrow \frac{d^2x_1^*}{dt^2} = 0 \\
L[x_1^*] & = & 0 - 2a_1 + 2(a_1 + a_0) \\ & = & (2a_0 - 2a_1) +
2a_1t \\ & \equiv & t \end{eqnarray*}

Solving gives $a_1 = \frac{1}{2}$, $a_0 = \frac{1}{2}$
$\Rightarrow x_1^* = \frac{1}{2}(t+1)$

\bigskip
For the particular integral to $L[x_2^*]  =  \cos t$ try

\begin{eqnarray*}  x_2^* & = & b_1 \cos t + b_2 \sin t
\\ \frac{dx_2^*}{dt} & = & b_2 \cos t - b_1 \sin t \\
\frac{d^2x_2^*}{dt^2} & = & -b_1 \cos t - b_2 \sin t \\ L[x_2^*] &
= & -b_1 \cos t - b_2 \sin t - 2(b_2 \cos t - b_1 \sin t) + 2(b_1
\cos t + b_2 \sin t) \\ & = & \cos t[-b_1 - 2b_2 + 2b_1] + \sin
t[-b_2 + 2b_1 + 2b_2] \\ & = & \cos t[b_1 - 2b_2] + \sin t[b_2 +
2b_1] \\ & \equiv & \cos t + 0 \times \sin t {\rm \ \ \ \ \ \ by\
hypothesis}
\end{eqnarray*}
Hence $\begin{array}{rcl} {b_1 - 2b_2} & = & 1 \\ {b_2 + 2b_1} & =
& 0 \end{array} \Rightarrow b_1 = \frac{1}{5} \hspace{.1in} b_2 =
-\frac{2}{5}$

Hence $x_2^* = \frac{1}{5} \cos t - \frac{2}{5} \sin t$

The General Solution is: \begin{eqnarray*} x & = & x_c + x_1^* +
x_2^* \\ & = & e^t(A \cos t + B \sin t) + \frac{1}{2}(t + 1) +
\frac{1}{5} \cos t - \frac{2}{5} \sin t \end{eqnarray*}



\end{document}
