\documentclass{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{pgfplots}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tabularx,ragged2e}
\usepackage{hyperref}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage{enumerate}
\usepackage{tabularx,ragged2e}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

\newcommand{\dd}{\mathrm{d}}
\renewcommand*{\arraystretch}{2}
\cfoot{}
\begin{document}

\begin{coverpages}
\begin{center}{\huge MATH 3504 - EXAM 2 FALL 2019 \\
\vspace*{0.4in}
SOLUTION
%\large Name: \makebox[3in]{\hrulefill}\\
}
\end{center}

\begin{flushleft}\vspace{0.5in}
Friday, 8 March \\
Instructor: Tom Cuchta
\end{flushleft}

\textbf{Instructions:}
\begin{itemize}
	\item  Show all work, clearly and in order, if you want to get full
	credit. If you claim something is true \textbf{you must show work backing up your claim}. I reserve the right to take off points if I cannot see how you arrived at your answer (even if your final answer is correct).
	\item Justify your answers algebraically whenever possible to ensure full credit. 	
	\item  Circle or otherwise indicate your final answers.
	\item  Please keep your written answers brief; be clear and to the point.
	\item  Good luck!
\end{itemize}

\begin{center}\underline{Formulas}\end{center}
\begin{center} \begin{itemize}
    \item \textbf{Cauchy-Euler}: $t^2 x'' + btx' + cx = 0$; to solve, guess $x=t^m$ and plug in -- solve for $m$
    \begin{itemize}
        \item if two distinct real roots $m_1, m_2$, then solution is $x(t)=c_1 t^{m_1} + c_2t^{m_2}$
        \item if two repeated real roots $m$, then solution is $x(t)=c_1 t^m + c_2 \ln(t)t^m$
        \item if two complex roots $\alpha \pm \beta i$, then solution is $x(t)=c_1t^{\alpha}\cos(\beta \ln(t)) + c_2 t^{\alpha} \sin(\beta \ln(t))$
    \end{itemize}
    \item \textbf{Variation of parameters}
    \begin{itemize} 
    \item if solution to homogeneous equation $ax''+bx'+cx=0$ is of the form $c_1 x_1(t) + c_2 x_2(t)$, then the Wronskian $W(t)$ is defined by $W(t)=x_1(t)x_2'(t)-x_2(t)x_1'(t)$
    \item the particular solution of a nonhomogeneous equation $ax''+bx'+c=f(t)$ is given by the formula $x_p(t)=-x_1(t) \displaystyle\int \dfrac{x_2(t)f(t)}{W(t)} \mathrm{d}t + x_2(t) \displaystyle\int \dfrac{x_1(t)f(t)}{W(t)} \mathrm{d}t$
    \end{itemize}
    \item \textbf{Definition} of Laplace transform: $\mathscr{L}\{f\}(s) = \displaystyle\int_0^{\infty} f(t) e^{-st} \mathrm{d}t$
    \item Definition of convolution: $(f*g)(t) = \displaystyle\int_0^t f(\tau) g(t-\tau) \mathrm{d}\tau$
    \item Convolution commutes: $f*g=g*f$
    \item ``convolution property": $\mathscr{L}^{-1}\{F(s)G(s)\} = (f(t) * g(t))$
    \item ``sifting property" $\displaystyle\int_0^{\infty} \delta_a(t)f(t) \mathrm{d}t = f(a)$
\end{itemize} \end{center}

\end{coverpages}

\begin{questions}
\question[6] Compute the convolution $e^{3t} * e^{-7t}$. \\
\textit{Solution}: Using the definition,
\[\begin{array}{ll}
e^{3t} * e^{-7t} &= \displaystyle\int_0^t e^{3\tau} e^{-7(t-\tau)} \mathrm{d}\tau \\
&= e^{-7t} \displaystyle\int_0^t e^{3\tau+7\tau} \mathrm{d}\tau \\
&= e^{-7t} \displaystyle\int_0^t e^{10\tau} \mathrm{d}\tau \\
&= e^{-7t} \Bigg[ \dfrac{1}{10} e^{10\tau} \Bigg|_0^t \\
&= \dfrac{e^{-7t}}{10} \Big( e^{10t}-e^0 \Big) \\
&= \dfrac{e^{3t}-e^{-7t}}{10} 
\end{array}\]
\question[12] Find the general solution of 
\[t^2 x'' + 3t x' + 4x = 0.\]
\textit{Solution}: This is a Cauchy-Euler equation, so make the guess $x=t^m$ which yields $x'=mt^{m-1}$ and $x''=m(m-1)t^{m-2}$. Plugging these into the differential equation yields
\[ t^2 \Big( m(m-1)t^{m-2} \Big) +3t mt^{m-1} + 4t^m=0,\]
or in other words
\[ m(m-1)t^m + 3mt^m + 4t^m=0.\]
Divide off $t^m$ to get the ``characteristic equation"
\[ m(m-1)+3m+4=0\]
which expanded becomes
\[ m^2-m+3m+4 =0,\]
and simplified,
\[ m^2+2m+4=0.\]
By the quadratic formula,
\[ m=\dfrac{-2\pm \sqrt{4-4(4)}}{2} = -1 \pm \dfrac{1}{2} \sqrt{-12} = -1 \pm \dfrac{\sqrt{12}}{2} i.\]
Therefore, the general solution is
\[ x(t) = c_1 t^{-1}\cos\left( \dfrac{\sqrt{12}}{2}\ln(t) \right) + c_2 t^{-1}\sin\left( \dfrac{\sqrt{12}}{2} \ln(t) \right). \]
\question[15] Consider the nohomogeneous second order linear differential equation
\[ x''-2x'+x=\dfrac{e^t}{t^2+1}. \] 
The homogeneous solution (i.e. solution to $x''-2x'+x=0$) is
\[ x(t)=c_1 \underbrace{e^t}_{=x_1(t)} + c_2\underbrace{te^t}_{=x_2(t)}. \]
In this problem, you will find the particular solution $x_p(t)$.
\begin{parts}
\part[5] Find the Wronskian $W(t)$. \\
\textit{Solution}: First note that 
\[ x_1'(t) = e^t, \quad x_2'(t) = (t+1)e^t.\] 
Now compute
\[ \begin{array}{ll}
W(t) &= x_1(t)x_2'(t) - x_2(t)x_1'(t) \\
&= e^t \Big[ (t+1)e^t \Big] - te^t \Big[e^t \Big] \\
&= e^{2t} \Big[ t+1-t \Big] \\
&= e^{2t}.
\end{array}\]
\part[10] Use your answer to (a) to find the particular solution $x_p(t)$ to the nonhomogeneous equation using variation of parameters. \\
(\textit{hint: recall that $\displaystyle\int \dfrac{1}{t^2+1} \mathrm{d}t=\arctan(t)+C$}) \\
\textit{Solution}: The ``$f(t)$" in this problem is $f(t)=\dfrac{e^t}{t^2+1}$. To use the method of variation of parameters, we first compute
\[ \begin{array}{ll}
-x_1(t) \displaystyle\int \dfrac{x_2(t)f(t)}{W(t)} \mathrm{d}t &= -e^t \displaystyle\int \dfrac{te^t \left[ \frac{e^t}{t^2+1} \right]}{e^{2t}} \mathrm{d}t \\
&= -e^t \displaystyle\int \dfrac{e^{2t}t}{e^{2t}(t^2+1)} \mathrm{d}t \\
&= -e^t \left( \displaystyle\int \dfrac{t}{t^2+1} \right) \\
&\stackrel{u=t^2+1, \frac{1}{2}\mathrm{d}u=t \mathrm{d}t}{=} -\dfrac{1}{2} e^t \displaystyle\int \dfrac{1}{u} \mathrm{d}u \\
&= -\dfrac{e^t}{2} \Big( \ln(u) \underbrace{+ C}_{\text{take }=0} \Big) \\
&= -\dfrac{e^t\ln(t)}{2}.
\end{array}\]
Similarly, compute
\[ \begin{array}{ll}
x_2(t) \displaystyle\int \dfrac{x_1(t)f(t)}{W(t)} \mathrm{d}t &= te^t \displaystyle\int \dfrac{e^t \left[ \frac{e^t}{t^2+1} \right]}{e^{2t}} \mathrm{d}t \\
&= te^t \displaystyle\int \dfrac{e^{2t}}{e^{2t}(t^2+1)} \mathrm{d}t \\
&= te^t \displaystyle\int \dfrac{1}{t^2+1} \mathrm{d}t \\
&= te^t \arctan(t) \underbrace{+ D}_{\text{take }=0}.
\end{array} \]
Therefore, by the method of variation of parameters, the particular solution is
\[ \begin{array}{ll}
x_p(t) &= -x_1(t) \displaystyle\int \dfrac{x_2(t)f(t)}{W(t)} \mathrm{d}t + x_2(t) \displaystyle\int \dfrac{x_1(t)f(t)}{W(t)} \mathrm{d}t \\
&= -\dfrac{e^t\ln(t)}{2} + te^t \arctan(t).
\end{array}\]
\vfill 
\end{parts}
\vfill 
\newpage 
\question[7] Use the \textbf{definition} of the Laplace transform as an improper integral to compute $\mathscr{L}\{e^{7t}\}(s)$. \\
\textit{Solution}: By definition,
\[ \begin{array}{ll}
\mathscr{L}\left\{e^{7t}\right\}(s) &\stackrel{\text{def}}{=} \displaystyle\int_0^{\infty} e^{7\tau}e^{-s\tau} \mathrm{d}\tau \\
&= \displaystyle\lim_{b \rightarrow \infty} \displaystyle\int_0^b e^{(7-s)\tau}\mathrm{d}\tau \\
&=\displaystyle\lim_{b \rightarrow\infty} \dfrac{1}{7-s}e^{(7-s)\tau} \Bigg|_0^b \\
&= \dfrac{1}{7-s} \displaystyle\lim_{b \rightarrow \infty} \Big[ e^{(7-s)b} - e^{(7-s)0} \Big] \\
&\stackrel{s>7}{=} \dfrac{1}{7-s} (0-1) \\
&= \dfrac{1}{s-7}.
\end{array} \]
\question[15] Solve
\[ \left\{ \begin{array}{ll}
x''-x'-6x=0 \\
x(0)=0, \quad x'(0)=1.
\end{array} \right. \] \\
\textit{Solution}: Take the Laplace transform of both sides to get 
\[ \Big( s^2 X - sx(0)-x'(0) \Big) - \Big( sX-x(0) \Big) - 6X = 0. \]
Plugging in the initial conditions $x(0)=0$ and $x'(0)=1$ yields
\[ s^2X-0-1-sX+0-6X=0.\]
Simplifying yields
\[ (s^2-s-6)X-1=0,\]
and so solving for $X$ yields
\[ X = \dfrac{1}{s^2-s-6} = \dfrac{1}{(s-3)(s+2)}.\]
From the Laplace transform inversion table, we conclude that 
\[ x(t) = \mathscr{L}^{-1} \left\{ \dfrac{1}{(s-3)(s-(-2))} \right\} = \dfrac{1}{3-(-2)} \Big( e^{3t} - e^{-2t} \Big)=\dfrac{1}{5} \Big( e^{3t} - e^{-2t} \Big). \]
\question[15] Solve \[ \left\{ \begin{array}{ll}
x'' + x = H(t-13) \\
x(0)=1, \quad x'(0)=0.
\end{array} \right. \] 
\textit{Solution}: Take the Laplace transform of both sides to arrive at
\[ \Big( s^2X-sx'(0)-x(0) \Big) + X=\dfrac{e^{-13s}}{s} .\]
Hence
\[ (s^2+1)X = \dfrac{e^{-13s}}{s}.\]
We get 
\[ X = \dfrac{e^{-13s}}{s(s^2+1)}.\]
At this point there are two reasonable approaches to complete the problem. \\ 
\textbf{Solution 1} (convolution property): Using the convolution property, 
\[ \begin{array}{ll}
x(t) &= \mathscr{L}^{-1} \left\{ \dfrac{e^{-13s}}{s(s^2+1)} \right\} \\
&= \mathscr{L}^{-1} \left\{ \dfrac{e^{-13s}}{s} \right\} * \mathscr{L}^{-1} \left\{ \dfrac{1}{s^2+1} \right\} \\
&= H(t-13) * \sin(t) \\
&\stackrel{\text{def of convolution}}{=} \displaystyle\int_0^t H(\tau-13)\sin(t-\tau) \mathrm{d}\tau \\
&= \displaystyle\int_0^{13}\underbrace{H(\tau-13)}_{=0}\sin(t-\tau) \mathrm{d}\tau + \displaystyle\int_{13}^t \underbrace{H(\tau-13)}_{=1 \text{ (only when }t>13\text{, otherwise this }=0)}\sin(t-\tau) \mathrm{d}\tau \\
&=\displaystyle\int_{13}^t \sin(t-\tau) \mathrm{d}\tau \\
&=\cos(t-\tau)\Bigg|_{13}^t \\
&= \cos(0) - \cos(t-13) \\
&= \left\{ \begin{array}{ll}
0, \quad t<13 \\
1-\cos(t-13), \quad t>13.
\end{array} \right. \\
&= H(t-13)\Big(1-\cos(t-13)\Big)
\end{array} \]
\textbf{Solution 2} (partial fractions): The method of partial fractions tells us to decompose the integrand (without the exponential factor) as 
\[ \dfrac{1}{s(s^2+1)} = \dfrac{A}{s} + \dfrac{Bs+C}{s^2+1}.\]
Multiplying by the common denominator $s(s^2+1)$ yields 
\[ 1 = A(s^2+1)+(Bs+C)(s) = (A+B)s^2+Cs+A.\]
Equating coefficients yields the system
\[ \left\{ \begin{array}{ll}
A+B = 0 \\
C = 0 \\
A = 1.
\end{array} \right.\]
Therefore $A=1$, $B=-1$, and $C=0$ and so we have shown that 
\[ X(s) = \dfrac{e^{-13s}}{s} - \dfrac{e^{-13s}s}{s^2+1}\]
From the table, we may conclude that
\[ \mathscr{L}^{-1} \left\{ \dfrac{e^{-13s}}{s} \right\} = H(t-13) \]
and
\[ \mathscr{L}^{-1} \left\{ e^{-13s} \dfrac{s}{s^2+1} \right\} = H(t-13)\cos(t-13).\]
Therefore, we conclude that 
\[ x(t) = H(t-13)\Big( 1 - \cos(t-13) \Big).\]
\question[15] Solve 
\[ \left\{ \begin{array}{ll}
x'' + 9x = \delta_{17}(t) \\
x(0)=0, \quad x'(0)=0.
\end{array} \right. \] \\
\textit{Solution}: Taking the Laplace transform (and using the sifting property) yields
\[ \Big(s^2X - sx'(0)-x(0) \Big)+ 9X =e^{-17s},\]
equivalently
\[ (s^2+9)X-0-0=e^{-17s}. \]
Therefore, solving for $X$ yields
\[ X = \dfrac{e^{-17s}}{s^2+9} = \dfrac{1}{3}\dfrac{e^{-17s}}{s^2+3^2}.\]
From this we may conclude that 
\[ x(t) = H(t-17)\sin(3(t-17)).\]
\question[15] Solve 
\[ \left\{ \begin{array}{ll}
x'' + \omega x = f(t) \\
x(0)=0, \quad x'(0)=0.
\end{array} \right. \]
(\textit{hint: your answer should involve convolution with the unspecified function $f$}) \\
\textit{Solution}: Taking convolution yields
\[ \Big( s^2X-s(0)-0 \Big) + \omega X = F.\]
Therefore solving for $X$ yields
\[ X = \dfrac{F}{s^2+\omega}.\]
Now we use the convolution property to see that 
\[ \begin{array}{ll}
x(t) &= \mathscr{L}^{-1} \left\{ \dfrac{F(s)}{s^2+\omega} \right\} \\
&= \underbrace{\mathscr{L}^{-1} \left\{ \dfrac{1}{s^2+\omega} \right\}}_{=\frac{1}{\omega}\sin(\omega t)} * \underbrace{\mathscr{L}^{-1}\{F\}}_{=f(t)} \\
&= \dfrac{1}{\omega} \sin(\omega t) * f(t) \\
&= \dfrac{1}{\omega} \displaystyle\int_0^t \sin(\omega \tau) f(t-\tau) \mathrm{d}\tau.
\end{array}\]

\question[5] (\textbf{BONUS}) Consider the Laplace transform
\[ \mathscr{L}\{f\}(s) = \displaystyle\int_0^{\infty} f(t) e^{-st} \mathrm{d}t.\]
It is possible to justify the following commuting of the derivative of integral operators:
\[ \dfrac{\mathrm{d}}{\mathrm{d}s} \mathscr{L}\{f\}(s) = \dfrac{\mathrm{d}}{\mathrm{d}s} \displaystyle\int_0^{\infty} f(t) e^{-st} \mathrm{d}t = \displaystyle\int_0^{\infty} f(t) \dfrac{\mathrm{d}}{\mathrm{d}s} e^{-st} \mathrm{d}t.\]
Compute that derivative and then fill in the blank in the following expression:
\[(*) \hspace{35pt}  \dfrac{\mathrm{d}}{\mathrm{d}s} \mathscr{L}\{f\}(s) = \mathscr{L}\{ \underline{-t f(t)}\}(s) \]
Now use the formula $(*)$ to take the Laplace transform of the Airy differential equation
\[ \left\{ \begin{array}{ll} x''=tx \\
x(0)=1, \quad x'(0)=0
\end{array} \right. \]
\textbf{Do not try to invert what you find!} \\
\textit{Solution}: Taking $\mathscr{L}$ of both sides yields
\[ s^2 X(s) - s (1) - 0 = \dfrac{\mathrm{d}}{\mathrm{d}s} X(s),\]
i.e. a differential equation in the $s$-variable! We can clean this up to get
\[ X'(s) = s^2X-s, \]
which is a nonhomogenous first order linear differential equation, which can be solved using an integrating factor. The solution is not very nice, though:
\[ x(t) = c_1 e^{\frac{t^3}{3}} + \dfrac{e^{\frac{t^3}{3}} \Gamma \left( \frac{2}{3}, \frac{t^3}{3} \right)}{\sqrt[3]{3}},\]
where here, $\Gamma$ here denotes the ``incomplete" gamma function. So, inverting the transform to find $x$ is not easy! The solution of the initial value problem is called the ``Airy function of the first kind" which was used by George Airy in the study of optics (namely, in studying rainbows).
\end{questions}

\newpage 
\begin{center} \begin{tabular}{|l|l|}
\hline
$x(t)$ & $X(s)$ \\
\hline 
$e^{at}$ & $\dfrac{1}{s-a}$ \\
$1$ & $\dfrac{1}{s}$ \\
$t^n$ & $\dfrac{n!}{s^{n+1}}$ \\
$f(t) e^{at}$ & $F(s-a)$ \\
$H(t-a)$ & $\dfrac{1}{s}e^{-as}$ \\
$H(t-a)f(t-a)$ & $e^{-as}F(s)$ \\
$f(t)H(t-a)$ & $e^{-as}\mathscr{L}\{f(t+a)\}$ \\
$\sin(kt)$ & $\dfrac{k}{s^2+k^2}$ \\
$\cos(kt)$ & $\dfrac{s}{s^2+k^2}$ \\
$\sinh(kt)$ & $\dfrac{k}{s^2-k^2}$ \\
$\cosh(kt)$ & $\dfrac{s}{s^2-k^2}$ \\
$e^{at}\sin(kt)$ & $\dfrac{k}{(s-a)^2+k^2}$ \\
$e^{at}\cos(kt)$ & $\dfrac{s-a}{(s-a)^2+k^2}$ \\
$\dfrac{1}{a-b}\Big( e^{at} - e^{bt} \Big)$ & $\dfrac{1}{(s-a)(s-b)}$ \\
$x'$ & $sX(s)-x(0)$ \\
$x''$ & $s^2X(s)-sx(0)-x'(0)$ \\
$\delta_a(t)$ & $e^{-as}$ \\
\hline
\end{tabular} \end{center}
\end{document}