% midterm 3 version 1 on 22 April - do one problem
\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 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, 22 April 2009
\end{center}

{\bf Instructions}: This in-class exam is 15 minutes. Do one problem
only. 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 $\frac{d}{ds}\L(f(t))=\L(-tf(t))$.
 \newline
 (1b) [50\%] Solve $x''+2x'=0$, $x(0)=0$, $x'(0)=1$ by
 Laplace's Method.
  \newline
 (1c) [50\%] Solve the system $x'=x+y$, $y'=-y$, $x(0)=1$, $y(0)=2$
 by Laplace's Method.

\Answer{
(1a) $\frac{d}{ds}\L(f(t))=\frac{d}{ds}\int_0^\infty f(t)e^{-st}dt=\int_0^\infty f(t)\frac{d}{ds}(e^{-st})dt=\int_0^\infty f(t)(-t)e^{-st}dt=\L(f(t)(-t))$.
\newline
(1b) $L(x)=1/(s^2+2s)= \frac{a}{s}+\frac{b}{s+2}=\L(a+be^{-2t})$ implies $x(t)=a+be^{-2t}$.
Partial fractions applied to $\frac{1}{s^2+2s}= \frac{a}{s}+\frac{b}{s+2}$ implies $a=1/2$, $b=-1/2$.
\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{1\\ 2}.$$
Solve by Cramer's rule to obtain $\L(x)=\frac{s+3}{(s-1)(s+1)}$, $\L(y)=\frac{2}{s+2}$.
Then partial fractions and the backward Laplace table imply $x(t)=2 e^t-e^{-t}$, $y(t)=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 &  7 & 0 \\
 0 & 0 &  0 & 7
 \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
$(7-\lambda)^2(4-\lambda)(6-\lambda)$. Then $\lambda=4,6,7,7$. Three sequences of $\rref$ computations are required on augmented matrices constructed from $A-4I$, $A-6I$, $A-7I$ to find the eigenpairs
$$
 \left(4,\colvector{-1\\ 1\\ 0 \\ 0}\right),\quad
 \left(6, \colvector{1\\ 1\\ 0\\ 0}\right),\quad 
 \left(7,\colvector{0\\ 0\\ 0\\ 1}\right),\quad 
 \left(7,\colvector{1\\ 1\\ 1\\ 0}\right).$$
\newline
(2b) $\.x(t)= c_1e^{4t}\colvector{-1\\ 1\\ 0 \\ 0}+
 c_2e^{6t}, \colvector{1\\ 1\\ 0\\ 0}+
 c_3 e^{7t}\colvector{0\\ 0\\ 0\\ 1}+ c_4e^{7t}\colvector{1\\ 1\\ 1\\ 0}$.
}

\end{exercises}
\EJECT

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

Display the general solution of $\.u'=A\.u$ according to Putzer's
spectral formula. Don't expand matrix products, in order to save time.
However, do compute the coefficient functions $r_1$, $r_2$.

(3b) [50\%] Using the same matrix $A$ from part (a), 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 (a), compute the
exponential matrix $e^{At})$ by any known method, for example, the
formula $e^{At}=\Phi(t)\Phi^{-1}(0)$.


\Answer{
(3a) $\.u(t)=e^{At}\.x(0)$, $e^{At}=e^{3t}I + \frac{e^{3t}-e^{5t}}{3-5}(A-3I)$.
Functions $r_1$, $r_2$ are computed from $r_1'=3r_1$, $r_1(0)=1$, $r_2'=5r_2+r_1$, $r_2(0)=0$.
\newline
(3b) $\.u(t) = e^{3t}\vec{\.c}_1+e^{5t}\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 &=& 3e^{0}\vec{\.c}_1+5e^{0}\vec{\.c}_2 
  \end{array}
 $$
\newline
(3c) From Putzer's result of (3a),
$$ e^{At} =  \frac12\left( \begin {array}{cc} {{\rm e}^{3\,t}}+{{\rm e}^{5\,t}}
&{{\rm e}^{5\,t}}-{{\rm e}^{3\,t}}\\\noalign{\medskip}{
{\rm e}^{5\,t}}-{{\rm e}^{3\,t}}&{{\rm e}^{3\,t}}+{
{\rm e}^{5\,t}}\end {array} \right).$$
}
\end{exercises}
\EJECT

\begin{exercises}
\prob{4.}{(ch5)} ~Do both
\newline
(4a) [50\%] Display the solution of
$\.u'=\twobytwo{3&1}{0&1}\.u$, $\.u(0)=\colvector{0\\ 2}$ according to
the Laplace Resolvent Method.

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

\Answer{
(4a) The resolvent equation $(sI-A)\L(\vec{\.u})=\vec{\.u}(0)$ is the system
$$ \twobytwo{s-3 & -1}{0 & s-1}\colvector{\L(x)\\ \L(y)} = \colvector{0\\ 2}.$$
The system is solved by Cramer's rule for unknowns $\L(x)$, $\L(y)$ to obtain
$$\L(x)=\frac{2}{(s-3)(s-1)},\quad \L(y)=\frac{2}{s-1}.$$
Partial fractions $\frac{2}{(s-3)(s-1)}=\frac{a}{s-3}+\frac{b}{s-1}$ and the backward Laplace table imply
$$ x(t) = ae^{3t}+be^t,\quad y(t)= 2 e^t.$$
The values of the constants are $a=1$, $b=-1$.
\newline
(4b) $\vec{\.u}_p(t) = e^{At}\int_0^t e^{-Au}\colvectorC{e^u\\ 0}du=
 e^{At}\int_0^t\colvectorC{e^{-u}\\ 0}du=\colvectorC{e^t-1\\ 0}$.
}
\end{exercises}
 \EJECT
\begin{exercises}
\prob{5.}{(ch6)} ~Do enough to make 100\%
\newline
 (5a) [30\%] Define {\em asymptotically stable equilibrium} for
  $\.u'=\.f(\.u)$, a nonlinear 2-dimensional system in which $\.f$ is
  continuously differentiable.
\newline
 (5b) [30\%] Give an example of a linear 2-dimensional system with a stable spiral at equilibrium point $x=y=0$.
 Draw a representative phase diagram about $x=y=0$.
 \newline
 (5c) [40\%] Give an example of a nonlinear 2-dimensional system with
  exactly two equilibria.
 \newline
 (5d) [40\%] Display a formula for the general solution of the equation
 $\.u'=\twobytwo{0 & 1}{-1 & 0}\.u$. Then explain why the system has a
 center at $(0,0)$.

\Answer{
(5a) It is a constant solution $t\to\vec{\.u}_0$. The equilibrium solution must be stable. Further, $\lim_{t\to\infty} \| \vec{\.u}(t)-\vec{\.u}_0 \|=0$ for all solutions $\vec{\.u}(t)$ such that $\| \vec{\.u}(0)-\vec{\.u}_0\|$ is sufficiently small.
\newline
(5b) Required are characteristic roots like $-1\pm i$. Let $A=\twobytwo{-1 & 1}{-1 & -1}$. Then
$\det(A-\lambda I)=(\lambda+1)^2+1$, which gives the desired roots and classification of a stable spiral.
\newline
(5c) There are many examples, but none of them are linear $\.u'=A\.u$, because in this case $\det(A)\ne 0$ is required for classification, and then $(0,0)$ is the only equilibrium point.
\BF{Example}: The nonlinear system  $x'=y$, $y'=x(x-1)$ has exactly two equilibrium points $(0,0)$, $(1,0)$.
\newline
(5d) The characteristic equation $\det(A-\lambda I)=0$ is $\lambda^2+1=0$ with complex roots $\pm i$
and corresponding atoms $\cos t$, $\sin t$. Then the Cayley-Hamilton Method implies 
$$\vec{\.u}(t) = \cos t \vec{\.c}_1 + \sin t \vec{\.c}_2.$$
\BF{First explanation}, why the classification is a center. Such solutions are $2\pi$-periodic and wrap around the origin. Trajectories form either an ellipse or a circle, depending on initial data.  \BF{Second explanation}, why the classification is a center. The answer is a spiral or an ellipse, because of the complex roots, which indicate wrapping of the trajectories around the origin. It can't be a spiral, because the solution formula does not limit to the zero vector at either $t=\infty$ nor $t=-\infty$. So it must be a center.
}
\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}
