\documentclass[12pt]{article}
%\usepackage{ccfonts,euler}
\usepackage{fullpage,amsmath,amsfonts}

\def\R{\mathbb{R}}
\def\e{\mathrm{e}}
\def\d{\mathrm{d}}
\def\x{\boldsymbol{x}}
\def\v{\boldsymbol{v}}
\def\w{\boldsymbol{w}}

\begin{document}

\title{Applied Differential Equations and Modeling}
\author{Final Exam}
\date{May 20, 2018}
\maketitle

% \vspace*{\fill}
% {\baselineskip=40pt
% \begin{tabbing}
% Student ID Number: \= \kill
% Last Name: \> \rule[-2pt]{10cm}{0.3pt} \\
% First Name:  \> \rule[-2pt]{10cm}{0.3pt} \\
% Signature: \> \rule[-2pt]{10cm}{0.3pt} \\
% %% Code: \> \fbox{\rule{0pt}{1.5em}\rule{1.5ex}{0pt}}
% %% \fbox{\rule{0pt}{1.5em}\rule{1.5ex}{0pt}}
% %% \fbox{\rule{0pt}{1.5em}\rule{1.5ex}{0pt}}
% %% \fbox{\rule{0pt}{1.5em}\rule{1.5ex}{0pt}}
% \end{tabbing}}


% \vspace*{\fill}
% \vspace*{\fill}

% \newpage

\begin{enumerate}

\item Solve the differential equation
\[
  2 \, y' + t \, y = 2 \,, \qquad y(0) = 1 \,.
\]
% Should have been 2t on RHS! Otherwise get solution in terms of error
% function... 

\hfill(10)

%\newpage

\item 
\begin{enumerate}
\item Solve the differential equation
\[
  y' = (1-2t) \, y^2 \,, \qquad y(0) = -1 \,.
\]
\item For which interval of time does the solution exist?
\end{enumerate}
\hfill(5+5)
%\newpage

\item Consider the differential equation
\[
  y' = y^2 - y \,.
\]

\begin{enumerate}
\item Find all equilibrium points of the equation.
\item Classify each equilibrium point as stable or unstable.
\item Indicate the equilibrium points in a $t$-$y$ graph and sketch
several other solutions \emph{without} solving the equation.
\item For which values of $y(0)$ does the solution exist for all
positive times?  (Argue, if possible, without solving the equation.)
\end{enumerate}
\hfill(5+5+5+5)

%\newpage

\item \begin{enumerate}
\item
Compute, without using the table of Laplace transforms, the
Laplace transform of $f(t)=u(t-1)$, where $u$ is the unit step
function.

\item Find the inverse Laplace transform of
\[
  F(s) = \frac{s}{(s-1)^2 + 1} \,.
\]
You may use the table of Laplace transforms.
\end{enumerate}
\hfill(5+5)
%\newpage


\item Verify the following property of the Laplace transform:
\[
  \mathcal L [f'(t)] = s \, \mathcal L[f(t)] - f(0) \,.
\]
\hfill(10)

%\newpage

\item
\begin{enumerate}
\item 
Use the Laplace transform to solve the equation
\[
  y'' + y = \delta(t) \,, \qquad y(0)=y'(0)=0 \,.
\]

\item Use the Laplace transform to solve the equation
\[
  y'' + y = \delta(t-2\pi) \,, \qquad y(0)=y'(0)=0 \,.
\]

\item What happens for
\[
  y'' + y = \delta(t) + \delta(t - 2\pi) + \delta (t - 4 \pi)
    + \delta (t-6\pi) + \dots \,,
\]
again with $y(0)=y'(0)=0$?  Describe the features of the solution
\emph{in words}, using technical terms when applicable.
(No formula required, but permitted.)
\end{enumerate}
\hfill(10+5+5)

%\newpage


\item Consider the second order differential equation
\[
  y'' + 2 \, y' + y = g(t) \,.
\]
\begin{enumerate}
\item Write this equation as a system of two first-order equations in
matrix form with matrix $A$.
\item Compute the eigenvalues of $A$.
\item Compute the eigenvector(s) and, if applicable, generalized
eigenvector of $A$. 
\item Write out the general solution $\x(t)$ for the
\emph{homogeneous} (the case when $g(t)=0$) first order system from
part (a).
\item Write out the general solution $y(t)$ for the given
\emph{homogeneous} second order equation.

\item Sketch the qualitative behavior of the homogeneous equation in
the $y$-$y'$ phase plane.

\item Use the method of undetermined coefficients to find a
particular solution when $g(t) = \cos t$.

\item Continuing the problem from (g), write out the solution with
initial condition $y(0) = 0$ and $y'(0) = 1$.

\item Re-derive your answer to part (h) using the Laplace transform.

\item What is the impulse response function of this system?

\item Is the system BIBO-stable?  Show your computation.

\item What is the equation a model of?  Describe in words.


\end{enumerate}
\hfill(5 points each)
\end{enumerate}
\end{document}

\emph{Answer:}
\begin{enumerate}
\item $\displaystyle \dot \x = A \x + \boldsymbol f$ with $\displaystyle A =
\begin{pmatrix}
0 & 1 \\
-1 & -2
\end{pmatrix}$ and $\displaystyle \boldsymbol f =
\begin{pmatrix}
  0 \\ g
\end{pmatrix}$.
\item The characteristic equation $\det (A-\lambda I) = 0$ reads
$\lambda \, (2+\lambda) + 1 = 0$, which has a double root $\lambda = -1$.

\item $(A -\lambda I) \v = 0$ is solved by $\displaystyle \v =
\begin{pmatrix}
  1 \\ -1
\end{pmatrix}$.  Since there is no second linearly independent
eigenvector,  there must be a generalized eigenvector which
solves $(A -\lambda I) \w = \v$.  The choice $\displaystyle \w =
\begin{pmatrix}
  0 \\ 1
\end{pmatrix}$ is a possible generalized eigenvector.

\item $\displaystyle \x(t) = c_1 \, \v \, \e^{-t} + c_2 \, (\v \, t +
\w) \, \e^{-t}$

\item $\displaystyle y_h(t) = c_1 \, \e^{-t} + c_2 \, t \, \e^{-t}$

\item See separate sheet.

\item Let's make the ansatz $y(t) = A \, \sin t + B \, \cos t$.  Then
$y'(t) = A \, \cos t - B\, \sin t$ and
$y'' = -A \, \sin t - B \, \cos t$.  This leads to the system of
linear equations $-A -2 \, B + A = 0$ and $-B  + 2 A + B = 1$, so that
$B=0$ and $A=\tfrac12$.  So the particular solution is $y_p(t) =
\tfrac12 \, \sin t$.

\item The solution is of the form $y(t) = y_h(t) + y_(t)$.  From (g),
we have $y_p(0) = 0$ and $y_p'(0) = \tfrac12$.  So we need $y_h(0)=0$
and $y_h'(0) = \tfrac12$ so that $y$ satisfies the given initial
conditions.  From (c) or (d): $y_h'(t) = - c_1 \, \e^{-t} + c_2 \, \e^{-t} -
c_2 \, t \, \e^{-t}$.   Thus, $y_h(0) = c_1$ and $y_h'(0) = -c_1 +
c_2$.  We conclude that $c_1=0$ and $c_2 = \tfrac12$.  Altogether,
\[
  y(t) = \tfrac12 \, t \, \e^{-t} + \tfrac12 \, \sin t \,.
\]



\item Taking the Laplace transform of the equation, we find that 
\[
  s^2 \, Y(s) - 1 + 2 \, s \, Y(s) + Y(s) = \frac{s}{s^2 + 1} \,,
\]
so that
\[
  Y(s) = \frac1{(s+1)^2} + \frac{s}{(s+1)^2 (s^2 + 1)} \,.
\]
Noting the partial fraction decomposition 
\[
  \frac{s}{(s+1)^2 (s^2 + 1)} = - \frac12 \, \frac1{(1+s)^2} 
  + \frac12 \, \frac1{1+s^2} \,,
\]
we find that
\[
  Y(s) = \tfrac12 \, \frac1{(s+1)^2} + \frac12 \, \frac1{1+s^2} \,.
\]
Using formulas (20) and (13) from the table of Laplace transforms, we
obtain, again,
\[
  y(t) = \tfrac12 \, t \, \e^{-t} + \tfrac12 \, \sin t \,.
\]

\item The impulse response is the solution to the equation for $g(t) =
\delta(t)$ so that $G(s) = 1$, and all initial values are zero.  Thus,
it has Laplace transform
\[
  H(s) = \frac1{(s+1)^2} 
\]
so that
\[
  h(t) = t \, \e^{-t} \,.
\]

\item Since the Laplace transform of the impulse response, the transfer
function, is proper, the system is BIBO-stable if and only if the
roots of the denominator polynomial have negative real part.  Clearly,
$H(s)$ has a double root at $s=-1$, so it is BIBO-stable.

\item The system is a damped-driven harmonic oscillator, e.g. a forced
mass-spring system with friction.  The answer to parts (b) and (c)
show clearly that the system is critically damped.

\end{enumerate}



%\newpage\mbox{}\newpage
\end{enumerate}

\end{document}
