\documentclass[12pt]{article}
\usepackage{latexsym}
\input psfig.sty
\usepackage{maple2e}
 \def\emptyline{\vspace{12pt}}
\DefineParaStyle{Maple Output}
\DefineParaStyle{Maple Plot}
\DefineCharStyle{2D Math}
\DefineCharStyle{2D Output}
\input spec_frac
\begin{document}
\title{Solutions, 316-XIV}
\maketitle

\section{Problem 4.9.2}
Find the general solution by variation of parameters
for the ode
\[ y^{\prime \prime} + y = \sec{t} \ .\]
{\bf Solution:}\\
The homogeneous solution can be written as
\[ y_h(t) = C_1 y_1(t) + C_2 y_2(t) := C_1 \cos{t} + C_2 \sin{t} \ . \]
Introducing the unknown functions $u_1(t)$, $u_2(t)$ as usual,
we are led to the system:
\begin{eqnarray*}
y_1 u_1^\prime + y_2 u_2^\prime & = & 0 \\
y_1^\prime u_1^\prime + y_2^\prime u_2^\prime & = & \sec{t} 
\end{eqnarray*}
or, substituting $y_1(t)=\cos{t}$, $y_2(t)=\sin{t}$
\begin{eqnarray*}
u_1^\prime \cos{t} + u_2^\prime \sin{t} & = & 0 \\
-u_1^\prime \sin{t} + u_2^\prime \cos{t} & = & \sec{t} 
\end{eqnarray*}
and solving, using $W(y_1,y_2) = 1$:
\[ u_1^\prime = - \sec{t} \sin{t} = -\tan{t} \ ,
\ u_2^\prime = \sec{t} \cos{t} = 1 \ . \]
Integrating:
\begin{eqnarray*}
u_1(t)  & = &  \log{\left|\cos{t}\right|} \\
u_2(t)  & = & t 
\end{eqnarray*}
Finally, putting it all together:
\[ y_g(t) = y_h(t) + \log{\left|\cos{t}\right|} \cos{t} + t\sin{t} \ . \] 

\newpage

\section{Problem 4.9.3}
Find the general solution by variation of parameters
for the ode
\[ 2 x^{\prime \prime}-2x^{\prime} - 4x = 2e^{3t} \ .\]
{\bf Solution:} \\
To get the equation into canonical form, divede by $2$ to get:
$x^{\prime \prime}-x^{\prime} - 2x = e^{3t}$.
The characteristic equation is
\[ r^2 - r - 2 = 0 \Rightarrow r = 
\frac{-(-1) \pm \sqrt{(-1)^2-4*1*(-2)}}{2*1} = \frac{1}{2}\pm {3}{2} = 2, -1 \]
The homogeneous solution can be written as
\[ y_h(t) = C_1 y_1(t) + C_2 y_2(t) := C_1 e^{2t} + C_2 e^{-t} \ . \]
Introducing the unknown functions $u_1(t)$, $u_2(t)$ as usual,
we are led to the system:
\begin{eqnarray*}
y_1 u_1^\prime + y_2 u_2^\prime & = & 0 \\
y_1^\prime u_1^\prime + y_2^\prime u_2^\prime & = & e^{3t} 
\end{eqnarray*}
or, substituting $y_1(t)=e^{2t}$, $y_2(t)=e^{-t}$
\begin{eqnarray*}
u_1^\prime e^{2t} + u_2^\prime e^{-t} & = & 0 \\
2u_1^\prime e^{2t} - u_2^\prime e^{-t} & = & e^{3t} 
\end{eqnarray*}
and solving, using $W(y_1,y_2) = -e^{2t}e^{-t}-2e^{2t}e^{-t}=-3e^{t}$:
\[ u_1^\prime =-\frac{e^{-t} e^{3t}}{-3e^{t}} = \frac{1}{3} e^{t} \ ,
\ u_2^\prime = \frac{e^{2t} e^{3t}}{-3e^{t}} = -\frac{1}{3} e^{4t} \ . \]
Integrating:
\begin{eqnarray*}
u_1(t)  & = & \frac{1}{3} e^{t} \\
u_2(t)  & = &  -\frac{1}{12} e^{4t}
\end{eqnarray*}
Finally, putting it all together:
\[ y_g(t) = y_h(t) + \frac{1}{3} e^{t}e^{2t} -\frac{1}{12} e^{4t} e^{-t} =
y_h(t) + \frac{1}{4} e^{3t} \ . \] 

\newpage

\section{Problem 4.9.6}
Find the general solution by variation of parameters
for the ode
\[   y^{\prime \prime}+2y^{\prime} + y =  e^{-t} \ .\]
{\bf Solution:} \\

The characteristic equation is
\[ r^2 + 2r + 1 = 0 \Rightarrow r = 
\frac{-(2) \pm \sqrt{(2)^2-4*1*(1)}}{2*1} = -1 \mbox{(double root)} \]

The homogeneous solution can be written as
\[ y_h(t) = C_1 y_1(t) + C_2 y_2(t) := C_1 e^{-t} + C_2 t e^{-t} \ . \]
Introducing the unknown functions $u_1(t)$, $u_2(t)$ as usual,
we are led to the system:
\begin{eqnarray*}
y_1 u_1^\prime + y_2 u_2^\prime & = & 0 \\
y_1^\prime u_1^\prime + y_2^\prime u_2^\prime & = & e^{-t} 
\end{eqnarray*}
or, substituting $y_1(t)=e^{-t}$, $y_2(t)=te^{-t}$
 and $y_1^\prime(t)=-e^{-t}$, $y_2^\prime(t)=(1-t)e^{-t}$
\begin{eqnarray*}
u_1^\prime e^{-t} + u_2^\prime te^{-t} & = & 0 \\
-u_1^\prime e^{-t} + u_2^\prime (1-t)e^{-t} & = & e^{-t} 
\end{eqnarray*}
or, simplifying:
\begin{eqnarray*}
u_1^\prime  + u_2^\prime t& = & 0 \\
-u_1^\prime + u_2^\prime (1-t) & = & 1 
\end{eqnarray*}
and solving, ($W(y_1,y_2) = (1-t)e^{-t}e^{-t}+te^{2t}e^{-t}=e^{-2t}$
but we don't need it!):
\[ u_1^\prime = -t \ ,
\ u_2^\prime = 1 \ . \]
Integrating:
\begin{eqnarray*}
u_1(t)  & = & -\frac{t^2}{2} \\
u_2(t)  & = &  t
\end{eqnarray*}
Finally, putting it all together:
\[ y_g(t) = y_h(t) -\frac{t^2}{2}e^{-t} + t^2 e^{-t} =
y_h(t) + \frac{t^2}{2} e^{-t} \ . \]
\newpage

\section{Problem 4.9.26}
Find the general solution by variation of parameters
for the ode
\[ x y^{\prime \prime}+(1-2x)y^{\prime} + (x-1)y =  xe^{x} \ .\]
given the homogeneous solutions
\[ y_1 = e^x\ ,\ y_2 = e^x \log{x} \ .\]
{\bf Solution:} \\
The homogeneous solution can be written as
\[ y_h(x) = C_1 y_1(x) + C_2 y_2(x) := C_1 e^{x} + C_2 \log{x} e^{x} \ . \]
Introducing the unknown functions $u_1(x)$, $u_2(x)$ as usual,
and after dividing the ODE by $x$, the coefficient
of the leading term, to bring to standard form:
\[y^{\prime \prime}+\frac{1-2x}{x}y^{\prime} + \frac{x-1}{x}y =  e^{x} \ .\]
we are led to the system 
\begin{eqnarray*}
y_1 u_1^\prime + y_2 u_2^\prime & = & 0 \\
y_1^\prime u_1^\prime + y_2^\prime u_2^\prime & = & e^{x} 
\end{eqnarray*}
or, substituting $y_1()=e^{x}$, $y_2(t)=\log{x}e^{x}$
 and $y_1^\prime(x)=e^{x}$, $y_2^\prime(x)=(\log{x}+1/x)e^{x}$
\begin{eqnarray*}
u_1^\prime e^{x} + u_2^\prime \log{x}e^{x} & = & 0 \\
-u_1^\prime e^{x} + u_2^\prime \left(\log{x}+\frac{1}{x}\right)e^{x} 
& = & e^{x} 
\end{eqnarray*}
or, simplifying:
\begin{eqnarray*}
u_1^\prime  + u_2^\prime \log{x}& = & 0 \\
u_1^\prime + u_2^\prime \left(\log{x}+\frac{1}{x}\right) & = & 1 
\end{eqnarray*}
and solving, 
\[ u_1^\prime = -x\log{x} \ ,
\ u_2^\prime = x \ . \]
Integrating:
\begin{eqnarray*}
u_1(t)  & = & -\frac{x^2}{2}\left(\log{x} -\frac{1}{2}\right) \\
u_2(t)  & = &  \frac{x^2}{2}
\end{eqnarray*}
Finally, putting it all together:
\[ y_g(t) = y_h(t) - \frac{x^2}{2}\left(\log{x} -\frac{1}{2}\right)e^{x} 
+  \frac{x^2}{2} \log{x} e^{x} =
y_h(t) + \frac{x^2}{2} e^{x} \ . \]
\end{document}
