% midterm 3 version 2 on 29 April - do four problems
\documentclass[12pt]{article}
\usepackage{linalg}
\setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.4in} \setlength{\textheight}{8.5in}
\setlength{\parskip}{5pt} \setlength{\topmargin}{0pt}
\setlength{\parindent}{0pt}
%\newenvironment{exercises}{\begin{list}{}{}}{\end{list}}
\newenvironment{solution}[1]{\protect\par{\bf Notes on Problem #1}.~\small\rm}{\protect\par\normalsize\rm}
%\long\def\answer#1{\begin{quote}\sf {\large\sf Answer:}\par #1\end{quote}}
\long\def\answer#1{}
\def\SeparatedPages#1{#1}
%\def\SeparatedPages#1{}
\def\prob#1#2{\item[{\normalsize\bf #1}] {\bf #2}}
%\def\L{{\cal L}}
%\def\dd{\displaystyle}
\def\BF#1{{\bf #1}}
\newif\ifsolutions
\solutionsfalse

\begin{document}
\thispagestyle{empty}
%{\large\bf Name}.
%\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
%\hfill%{\large\bf Section}. \underline{~~~~~~~~~~~~~~~~~}
\def\EJECT{\SeparatedPages{\vfill Use this page to start your solution.
Attach extra pages as needed, then staple.\eject
\thispagestyle{empty} {\large\bf Name}.
\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} \hfill{
Midterm 3 Ver 2, 2280 8:35}}}
\def\EJECTEND{\SeparatedPages{\vfill Use this page to start your solution.
Attach extra pages as needed, then staple.\eject}}
\def\Answer#1{\rule{0.2\linewidth}{0.05em}\\ {\bf Answer}: {\sf #1} \par\rule{\linewidth}{0.1em}}
%\def\Answer#1{\relax}


\begin{center}\Large\bf
Differential Equations 2280\\
Midterm Exam 3\\
Wednesday, 29 April 2009
\end{center}

{\bf Instructions}: This in-class exam is 50 minutes. Do four problems
only. The first problem was done on 22 April. No calculators, notes, tables or books. 
No answer check is
expected. Details count $75$\%. The answer counts $25$\%. Each problem
is scored 100.

Please discard this sheet after reading it.

\EJECT
\begin{exercises}
\prob{1.}{(ch7)} ~ Do enough to make 100\%
\newline
 (1a) [50\%] Derive the formula $\L(e^{at}f(t))=\left.\L(f(t))\right|_{s\to(s-a)}$.
 \newline
 (1b) [50\%] Solve $x'''+x''=0$, $x(0)=-1$, $x'(0)=1$, $x''(0)=0$ by
 Laplace's Method.
  \newline
 (1c) [50\%] The system $x'=x+y$, $y'=-y+2$, $x(0)=0$, $y(0)=0$ has unique solution $x(t)=-2+e^{t}+e^{-t}$, $y(t)=2-2e^{-t}$. Show the
 Laplace Method details. 

\Answer{
(1a) $\L(e^{at}f(t))=\int_0^\infty f(t)e^{at-st}dt=\int_0^\infty f(t)e^{-ut}dt$ where $u=s-a$. The last integral is $\L(f(t))$ with $s$ replaced by $s-a$.
\newline
(1b) $L(x)=\frac{-s^2+1}{s^3+s^2}= \frac{1-s}{s^2}=\frac{1}{s^2}-\frac{1}{s}=\L(t-1)$
 implies $x(t)=t-1$.
\newline
(1c) Transform the equations with $\L$ and collect into a $2\times 2$ system for $\L(x)$, $\L(y)$.
A shortcut is Laplace's resolvent method. Then
$$ \twobytwo{s-1 & -1}{0 & s+1}\colvector{\L(x) \\ \L(y)} = \colvector{0\\ 2/s}.$$
Solve by Cramer's rule to obtain $\L(x)=\frac{2}{s(s-1)(s+1)}$, $\L(y)=\frac{2}{s(s+1)}$.
Then partial fractions and the backward Laplace table imply $x(t)=-2 + e^t+e^{-t}$, $y(t)=2-2e^{-t}$.
}
\end{exercises}

\EJECT

\begin{exercises}
\prob{2.}{(ch5)} ~Do both
\newline
 The eigenanalysis method says that the system
$\.x' = A\.x$ has general solution $\.x(t)=c_1\.v_1e^{\lambda_1
t}+c_2\.v_2e^{\lambda_2 t}+c_3\.v_3e^{\lambda_3 t}+c_4\.v_4 e^{\lambda_4 t}$. In the
solution formula, $(\lambda_i,\.v_i)$, $i=1,2,3,4$, is an eigenpair
of $A$.  Given
$$A=\left[\begin{array}{rrrr}
 5 & 1 &  1 & 0 \\
 1 & 5 &  1 & 0 \\
 0 & 0 &  4 & 0 \\
 0 & 0 &  0 & 4
 \end{array}\right],$$
 then \newline
 (2a) [75\%] Display eigenanalysis details for $A$. \newline
 (2b) [25\%] Display the solution $\.x(t)$ of $\.x'(t)=A\.x(t)$.

\Answer{
(2a) Use cofactor expansion on the last row of $\det(A-\lambda I)$ to obtain the expansion
$(4-\lambda)^2(4-\lambda)(6-\lambda)$. Then $\lambda=4,4,4,6$. Two sequences of $\rref$ computations are required on augmented matrices constructed from $A-4I$, $A-6I$ to find the eigenpairs
$$
 \left(4,\colvector{1\\ -1\\ 0 \\ 0}\right),\quad
 \left(4, \colvector{1\\ 0\\ -1\\ 0}\right),\quad
 \left(4,\colvector{0\\ 0\\ 0\\ 1}\right),\quad
 \left(6,\colvector{1\\ 1\\ 0\\ 0}\right).$$
\newline
(2b) $\.x(t)= 
 c_1e^{4t}\colvector{1\\ -1\\ 0 \\ 0}+
 c_2e^{4t}, \colvector{1\\ 0\\ -1\\ 0}+
 c_3 e^{4t}\colvector{0\\ 0\\ 0\\ 1}+ 
 c_4e^{6t}\colvector{1\\ 1\\ 0\\ 0}$.
}

\end{exercises}
\EJECT

\begin{exercises}
\prob{3.}{(ch5)} ~Do enough to make 100\%
\newline
(3a) [50\%]  The eigenvalues are $4$, $6$ for the matrix
$A=\left[\begin{array}{rrrr}
 5 & 1   \\
 1 & 5
 \end{array}\right]$.
%with(linalg):
%C:=matrix([[5,1],[1,5]]); eigenvals(C);

Display the general solution of $\.u'=A\.u$. Show details from either
the eigenanalysis method or the Laplace method.


(3b) [50\%] Using the same matrix $A$ from part (3a), display the solution
of $\.u'=A\.u$ according to the Cayley-Hamilton Method. To save time,
write out the system to be solved for the two vectors, and then stop,
without solving for the vectors.

(3c) [50\%] Using the same matrix $A$ from part (3a), compute the
exponential matrix $e^{At}$ by any known method, for example, the
formula $e^{At}=\Phi(t)\Phi^{-1}(0)$, or Putzer's formula.


\Answer{
(3a) The eigenpairs of $A$ are 
$$\left(4,\colvector{1\\ -1}\right),\quad \left(6,\colvector{1\\ 1}\right)$$
which implies the eigenanalysis general solution
$$\.u(t) = c_1 e^{4t}\colvector{1\\ -1} + c_2 e^{6t} \colvector{1\\ 1}.$$
\newline
(3b) $\.u(t) = e^{4t}\vec{\.c}_1+e^{6t}\vec{\.c}_2$. Differentiate once and use $\vec{\.u}'=A\vec{\.u}$, then set $t=0$. The resulting system is
$$
\begin{array}{lcl}
 \vec{\.u}_0 &=& e^{0}\vec{\.c}_1+e^{0}\vec{\.c}_2 \\
  A\vec{\.u}_0 &=& 4e^{0}\vec{\.c}_1+6e^{0}\vec{\.c}_2
  \end{array}
 $$
\newline
(3c) Putzer's result is $e^{At}=e^{4t}I + \frac{e^{4t}-e^{6t}}{4-6}(A-4I)$.
Functions $r_1$, $r_2$ are computed from $r_1'=4r_1$, $r_1(0)=1$, $r_2'=6r_2+r_1$, $r_2(0)=0$.
$$ e^{At} =  \frac12
\left( \begin {array}{cc} {{\rm e}^{4\,t}}+{{\rm e}^{6\,t}}&{{\rm e}^{6\,t}}-{{\rm e}^{4\,t}}\\\noalign{\medskip}{{\rm e}^{6\,t}}-{{\rm e}^
{4\,t}}&{{\rm e}^{4\,t}}+{{\rm e}^{6\,t}}\end {array} \right).$$
}
\end{exercises}
\EJECT

\begin{exercises}
\prob{4.}{(ch5)} ~Do both
\newline
(4a) [50\%] Display the solution of
$\.u'=\twobytwo{2&0}{1&2}\.u$, $\.u(0)=\colvector{0\\ 1}$, using any method that applies.


(4b) [50\%] Display the variation of parameters formula for the system
below. Then integrate
to find $\.u_p(t)$ for $\.u'=A\.u$.
$$\.u'=\twobytwo{2&0}{1&2}\.u+\colvector{e^{2t}\\ 0}.$$

\Answer{
(4a) {\bf Resolvent method}. The resolvent equation $(sI-A)\L(\vec{\.u})=\vec{\.u}(0)$ is the system
$$ \twobytwo{s-2 & 0}{-1 & s-2}\colvector{\L(x)\\ \L(y)} = \colvector{0\\ 1}.$$
The system is solved by Cramer's rule for unknowns $\L(x)$, $\L(y)$ to obtain
$$\L(x)=\frac{0}{(s-2)^2},\quad \L(y)=\frac{s-2}{(s-2)^2}.$$
The backward Laplace table implies
$$ x(t) = 0,\quad y(t)= e^{2t}.$$
{\bf Best method}. Look at the equations as scalar equations $x'=2x$, $x(0)=0$ and $y'=x+2y$, $y(0)=1$. Clearly $x(t)=0$ and then $y'=0+2y$, $y(0)=1$ implies $y(t)=e^{2t}$.
\newline
(4b) Putzer's formula gives
$$e^{At}=e^{2t}I+te^{2t}(A-2I)=\twobytwo{e^{2t} & 0}{te^{2t} & e^{2t}}.$$
Then
$\vec{\.u}_p(t) = e^{At}\int_0^t e^{-Au}\colvectorC{e^{2u}\\ 0}du=
 e^{At}\int_0^t\colvectorC{1\\ -u}du=\colvectorC{te^{2t}\\ t^2e^{2t}/2}$.
}
\end{exercises}
 \EJECT
\begin{exercises}
\prob{5.}{(ch6)} ~Do enough to make 100\%
\newline
 (5a) [25\%] Which of the four types {\em center, spiral, node, saddle} can be unstable at $t=\infty$? Explain your answer.
\newline
 (5b) [25\%] Give an example of a linear 2-dimensional system $\.u'=A\.u$ with a saddle at equilibrium point $x=y=0$, and $A$ is not triangular.
 \newline
 (5c) [25\%] Give an example of a nonlinear 2-dimensional predator-prey system with
  exactly four equilibria.
 \newline
 (5d) [25\%] Display a formula for the general solution of the equation
 $\.u'=\twobytwo{1 & 1}{-1 & 1}\.u$. Then explain why the system has a
 spiral at $(0,0)$.
 \newline
 (5e) [25\%] Is the origin an isolated equilibrium point of the
 $\.u'=\twobytwo{1 & 1}{1 & 1}\.u$? Explain your answer.

\Answer{
(5a) All except the center, which is stable but not asymptotically stable. All the others correspond to a general solution which can have an exponential factor $e^{kt}$ in each term. If $k>0$, then the solution cannot approach the origin at $t=\infty$.
\newline
(5b) Required are characteristic roots like $1$, $-1$. Let $B=\twobytwo{-1 & 0}{0 & 1}$. Define $A=PBP^{-1}$ where $P=\twobytwo{1 & 1}{1&2}$. Then $\.u'=A\.u$ has a saddle at the origin, because
the characteristic roots of $A$ are still $1$, $-1$. And $A=\twobytwo{-3&2}{-4&3}$ is not triangular.
\newline
(5c)
\BF{Example}: The nonlinear predator-prey system  $x'=(x+y-4)x$, $y'=(-x+2y-2)y$ has exactly four equilibrium points $(0,0)$, $(4,0)$, $(0,1)$, $(2,2)$.
\newline
(5d) The characteristic equation $\det(A-\lambda I)=0$ is $(1-\lambda)^2+1=0$ with complex roots $1\pm i$
and corresponding atoms $e^t\cos t$, $e^t\sin t$. Then the Cayley-Hamilton Method implies
$$\vec{\.u}(t) = e^t\cos t \vec{\.c}_1 + e^t\sin t \vec{\.c}_2.$$
\BF{Explanation}, why the classification is a spiral. Such solutions containing sine and cosine factors wrap around the origin. This makes it a spiral or a center. Because of the exponential factor $e^t$, it is asymptotically stable at $t=-\infty$, which disallows a center, so it is a spiral.
\newline
(5e) No, because $\det(A)=0$. In this case, $A\.u=\.0$ has infinitely many solutions, describing a
line of equilibria through the origin. This implies the equilibrium point $(0,0)$ is not isolated [you cannot draw a circle about $(0,0)$ which contains no other equilibrium point].
}
\end{exercises}
 \EJECTEND
\end{document}
\endinput
\


 \EJECT
\begin{exercises}
\prob{2.}{(ch6)} ~\newline
  (a) [40\%] Classify the linearization of the nonlinear system $x'=x+4y-xy^2$,
 $y'=2x-y+x^2y$ at equilibrium $x=y=0$ as node,
 spiral, center or saddle.
 \newline
 (b) [30\%] Is there a two-dimensional nonlinear system with a
 spiral at equilibrium $x=y=0$ while the linearization at $x=y=0$ is a
 center? Cite theorems or give an example.
 \newline
 (c) [30\%] If a two-dimensional system has a saddle at equilibrium
 $x=y=0$, then what are the possible classifications for the
 linearized system at $x=y=0$? Supply reasons and cite theorems.


\ifsolutions
\begin{solution}{2} ~\newline

\end{solution}
\fi
\end{exercises}
