\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\ud}{\underline}
\newcommand{\lin}{\int_0^\infty}
\parindent=0pt
\begin{document}


{\bf Question}

Use the method of variation of parameters to find the general
solution to each of the following equations.
\medskip

\begin{description}
\item[(a)] $y''-2y'+y=4e^x$
\item[(b)] $y''-2y'+2y=4e^x\sin x$
\item[(c)] $ y''-4y'+4y=xe^{2x}$
\end{description}



\vspace{.5in}

{\bf Answer}

\begin{description}
\item[(a)]

\begin{eqnarray*}y'' - 2y' + y & = & 0 \\ {\rm A.E. \ \ }
m^2 - 2m + 1 & =& 0 \\ (m-1)^2 & =& 0 \\ m = 1 {\rm \ \ twice} \\
{\rm so\ \ } y_1  = e^x & {\rm and} &  y_2 = xe^{x}
\end{eqnarray*} are the solutions of the homogeneous equation.

Looking at the Wronskian:

$W = \left|\begin{array}{cc} e^x & xe^x \\ e^x  & (1+x)e^x
\end{array} \right| = e^{2x}$

The general solution has the form $\ds y = v_1y_1 + v_2 y_2$
where:

$\ds v_1' = -\frac{y_2R}{W} = -4x \Rightarrow v_1 = -2x^2 + A$

$\ds v_2' = \frac{y_1R}{W} = 4 \Rightarrow v_2 = 4x + B$

Hence $$y = (A + B + 2x^2)e^x$$




\item[(b)]
\begin{eqnarray*} y''-2y'+2y & = & 0 \\ {\rm A.E. \ \ }
m^2 - 2m + 2 & =& 0 \\  m = 1 \pm i \\ {\rm so\ \ } y_1 = e^x\cos
x & {\rm and} &  y_2 = e^{x}\sin x
\end{eqnarray*} are the solutions of the homogeneous equation.

Looking at the Wronskian:

$W = \left|\begin{array}{cc} e^x\cos x & e^x\sin x \\ e^x(\cos x -
\sin x) &  e^x(\sin x + \cos x)
\end{array} \right| = e^{2x}$

The general solution has the form $\ds y = v_1y_1 + v_2 y_2$
where:

$\ds v_1' = -\frac{y_2R}{W} = -4\sin^2 x  = 2 \cos^22x - 2
\Rightarrow v_1 = \sin2x - 2x + A$

$\ds v_2' = \frac{y_1R}{W} = 4\sin x \cos x =  2\sin 2x
\Rightarrow v_2 = -\cos x + B$

Hence \begin{eqnarray*} y & = & (\sin 2x - 2x + A) e^x \cos x +
(-\cos 2x + B)e^x \sin x  \\ & = & (\sin 2x \cos x - \cos 2x \sin
x ) e^x - 2x \cos x e^x \\ & & + ( A \cos x + B \sin x ) e^x \\ &
= & [ ( A \cos x + C \sin x ) - 2x \cos x ] e^x \end{eqnarray*}


\item[(c)]
\begin{eqnarray*} y''-4y'+4y & = & 0 \\ {\rm A.E. \ \ }
m^2 - 4m + 4 & =& 0 \\  (m - 2) & =  & 0 \\ m = 2 {\rm \ \ twice}
\\ {\rm so\ \ } y_1 = e^{2x} & {\rm and} &  y_2 = xe^{2x}
\end{eqnarray*} are the solutions of the homogeneous equation.

Looking at the Wronskian:

$W = \left|\begin{array}{cc} e^{2x} & xe^{2x} \\ 2e^{2x} & (1 +
2x) e^{2x} \end{array} \right| = e^{4x}$

The general solution has the form $\ds y = v_1y_1 + v_2 y_2$
where:

$\ds v_1' = -\frac{y_2R}{W} = -x^2  \Rightarrow v_1 =
-\frac{1}{3}x^3 + A$

$\ds v_2' = \frac{y_1R}{W} =  x \Rightarrow v_2 = \frac{1}{2}x^2 +
B$

Hence \begin{eqnarray*} y & = & \left(-\frac{1}{3}x^3 +
A\right)e^{2x} + \left(\frac{1}{2}x^2 + B\right)xe^{2x} \\ & = &
\left(A + Bx + \frac{1}{6}x^3\right)e^{2x} \end{eqnarray*}



\end{description}


\end{document}
