% 2018 Differential Equations 2280-2
\documentclass[11pt,leqno]{article}
\setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.4in} \setlength{\textheight}{9.5in}
\setlength{\parskip}{5pt} \setlength{\topmargin}{-90pt}
\setlength{\parindent}{0pt}
%\newenvironment{exercises}{\begin{list}{}{}}{\end{list}}
\newenvironment{solution}[1]{\protect\par{\bf Solution to Problem #1}.~\small\rm}{\protect\par\normalsize\rm}
%\long\def\answer#1{\begin{quote}\sf {\large\sf Answer:}\par #1\end{quote}}

\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{{\large\bf #1}}
\def\.#1{\mbox{\bf #1}}
\usepackage{linalg}
\newif\ifsolutions
\solutionstrue
%\solutionsfalse
\ifsolutions
\def\Answer#1{\rule{0.2\linewidth}{0.05em}\\ {\bf Answers and Solution Details}:\\ {\sf #1} \par\rule{\linewidth}{0.1em}}
\def\SeparatedPages#1{\relax}
\else
\def\Answer#1{\relax}
\fi

\begin{document}
\thispagestyle{empty}
%{\large\bf Name}
%\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}\hfill
%{{\bf Time of your class}~\underline{~~~~~~~~~~} }
\def\EJECT{\SeparatedPages
{\vfill Use this page to start your solution.\newpage
\thispagestyle{empty} \hfill  2280 Sample Exam 3 S2018
%\newline{\large\bf Name}.
%\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}\hfill
}
}
%%% {\bf Time of your class}~\underline{~~~~~~~~~~} }
\def\EJECTEND{\SeparatedPages{\vfill Use this page to start your solution.
\eject}}
%\def\EJECT{}\def\EJECTEND{}

\begin{center}\Large\bf
Differential Equations 2280 \\
\small Sample Midterm Exam 3 with Solutions\\
\small Exam Date: Friday 13 April 2018 at 12:50pm
\end{center}


{\bf Instructions}: This in-class exam is 50 minutes. No
calculators, notes, tables or books. No answer check is expected.
Details count 3/4, answers count 1/4. Problems below cover the possibilities,
but the exam day content will be much less, as was the case for Exams 1, 2.

\subsection*{Chapter 3}
\begin{exercises}
\prob{1.}{(Linear Constant Equations of Order $n$)} ~\\[1ex]
\BF{(a)}  Find by variation of parameters a particular solution $y_p$ for the equation
$y''=1-x$. Show all steps in variation of parameters. Check the answer
by quadrature.
\\[1ex]
\BF{ (b) }  A particular solution of the equation $
mx'' + cx' + kx = F_0\cos(2t)$ happens to be $x(t)=11\cos 2t+ e^{-t}\sin \sqrt{11}t  -\sqrt{11} \sin 2t $.
Assume $m, c, k$ all positive. Find the unique periodic steady-state solution $x_{\mbox{ss}}$.
\\[1ex]
 \BF{(c)}  A fourth order linear homogeneous differential equation with
constant coefficients has two particular solutions $2e^{3x}+4x$ and
$xe^{3x}$. Write a formula for the general solution.
\\[1ex]
\BF{(d)} Find the {\bf Beats} solution for
the forced undamped spring-mass problem
$$ x'' + 64x = 40\cos(4t),\quad x(0)=x'(0)=0.$$
It is known that this solution is the sum of two harmonic oscillations of different frequencies.
{\bf To save time, don't convert to phase-amplitude form}.
\\[1ex]
 \BF{(e)}
 Write the solution $x(t)$ of
 $$x''(t)+25x(t) = 180\sin (4t), \quad x(0)=x'(0)=0,$$ as the sum
 of two harmonic oscillations of different natural frequencies.\newline
 {\bf To save time, don't convert to phase-amplitude form}.
\\[1ex]
 \BF{(f)}  Find the steady-state periodic
 solution for the forced spring-mass system $ x'' + 2x' + 2x =
5\sin(t)$.
\\[1ex]
 \BF{(g)} Given $5x''(t) + 2x'(t) + 4x(t) = 0$, which represents a
 damped spring-mass system with $m=5$, $c=2$, $k=4$, determine if the equation is
 over-damped , critically damped  or
 under-damped.\\
 {\bf To save time, do not solve for $x(t)$}!
\\[1ex]
 \BF{(h)}
Determine the practical resonance frequency $\omega$ for the electric
current equation
$$2I''+7I'+50I = 100\omega\cos(\omega t).$$
 \BF{(i)} Given the forced spring-mass system $ x'' + 2x' + 17x =
82\sin(5t)$, find the steady-state periodic  solution.
\\[1ex]
 \BF{ (j)} Let $f(x)=x^3e^{1.2x}+x^2e^{-x}\sin(x)$. Find the
characteristic polynomial of a constant-coefficient
linear homogeneous differential equation of least order which has $f(x)$ as a
solution. To save time, do not expand the polynomial and do not find the differential equation.

\bigskip

\ifsolutions
\vfill\eject
\Answer{~\newline
\BF{Part (a)} ~~ Answer: $\dd y_p=\frac{x^2}{2} - \frac{x^3}{6}$.
\\
\BF{Variation of Parameters}.\newline
 Solve $y''=0$ to get $y_h=c_1y_1+c_2y_2$,
$y_1=1$, $y_2=x$.  Compute the
Wronskian $W=y_1y_2'-y_1'y_2=1$. Then for
$f(t)=1-x$,
\\
$\dd
 y_p=y_1\int y_2\frac{-f}{W}dx+y_2\int y_1\frac{f}{W}dx,
 $
\\
 $\dd
 y_p=1\int -x(1-x)dx+x\int 1(1-x)dx,
 $
\\
  $\dd
 y_p=-1(x^2/2-x^3/3)+x(x-x^2/2),
 $
\\
  $\dd
 y_p=x^2/2 - x^3/6.
 $
\\
This answer is checked by quadrature, applied twice to $y'' = 1-x$ with initial conditions zero.
\\[1ex]
\BF{Part (b)} ~~ It has to be the terms left over after striking out the transient terms, those terms with limit zero at infinity. Then $x_{\mbox{ss}}(t)=11\cos 2t  -\sqrt{11} \sin 2t $.
\\[1ex]
\BF{Part (c)}~~
In order for $xe^{3x}$ to be a solution, the general solution must have Euler atoms $e^{3x}, xe^{3x}$. Then the first solution $2e^{3x}+4x$ minus $2$ times the Euler atom $e^{3x}$ must be a solution, therefore $x$ is a solution, resulting in Euler atoms $1,x$. The general solution is then a linear combination of the four Euler atoms: $y = c_1(1)+c_2(x)+c_3\left(e^{3x}\right)+c_4\left(xe^{3x}\right)$.
\\[1ex]
\BF{ Part (d)}~~
% solve(r^2+64=0,r);
% de:=diff(x(t),t,t)+64*x(t)=40*cos(4*t);dsolve(de,x(t));
% dsolve({de,x(0)=0,D(x)(0)=0},x(t));
Use undetermined coefficients trial solution $x=d_1\cos 4t + d_2 \sin 4t$. Then $d_1=5/6$, $d_2=0$, and finally $x_p(t)=(5/6)\cos(4t)$. The characteristic equation $r^2+64=0$ has roots $\pm 8i$ with corresponding Euler solution atoms $\cos(8t), \sin(8t)$. Then $x_h(t)=c_1\cos(8t)+c_2\sin(8t)$. The general solution is $x=x_h+x_p$. Now use $x(0)=x'(0)=0$ to determine $c_1=-5/6, c_2=0$, which implies the particular solution $x(t)=-\frac56\cos(8t)+\frac56\cos(4t)$.
\\[1ex]
{\bf Part (e)}~~  The answer is $x(t)= -16\sin(5t)+20\sin(4t)$ by the method of undetermined coefficients.\\
Rule I: $x=d_1\cos(4t)+d_2\sin(4t)$. Rule II does not apply due to natural frequency $\sqrt{25}=5$
not equal to the frequency of the trial solution (no conflict).  Substitute the trial solution into
$x''(t)+25x(t) = 180\sin (4t)$
to get $9d_1\cos(4t)+9d_2\sin(4t) = 180\sin(4t)$. Match coefficients, to arrive at the equations
$9d_1=0$, $9d_2=180$. Then $d_1=0$, $d_2=20$ and $x_p(t)=20\sin(4t)$. Lastly, add the homogeneous solution to obtain $x(t)=x_h+x_p=c_1\cos(5t)+c_2\sin(5t)+20\sin(4t)$. Use the initial condition relations $x(0)=0, x'(0)=0$ to obtain the equations
$\cos(0)c_1+\sin(0)c_2+20\sin(0)=0$, $-5\sin(0)c_1 + 5\cos(0)c_2 +80\cos(0)=0$. Solve for the coefficients $c_1=0$, $c_2=-16$
% de:=diff(y(x),x,x)+25*y(x)=180*sin(4*x);dsolve(de,y(x));
% subs(y(x)=d1*cos(4*x)+d2*sin(4*x),de);collect(%,{cos(4*x),sin(4*x)});
% ic:=x(0)=0,D(x)(0)=0;dsolve([de,ic],y(x)); #y(x) = -16*sin(5*x)+20*sin(4*x) % F2010
\\[1ex]
\BF{Part (f)}~~
% de:=diff(y(x),x,x)+2*diff(y(x),x)+2*y(x)=5*sin(x);dsolve(de,y(x));
% subs(y(x)=d1*cos(x)+d2*sin(x),de);collect(%,{cos(x),sin(x)});
The answer is $x=\sin t - 2\cos t$ by the method of undetermined coefficients.\\
Rule I: the trial solution $x(t)$ is a linear combination of the Euler atoms found in $f(x)=5\sin(t)$. Then $x(t)=d_1\cos(t) + d_2\sin(t)$. Rule II does not apply, because solutions of the homogeneous problem contain negative exponential factors (no conflict). Substitute the trial solution into
$ x'' + 2x' + 2x = 5\sin(t)$ to get
$(-2d_1+d_2)\sin(t)+(d_1+2d_2)\cos(t) = 5\sin(t)$. Match coefficients to find the system of equations $(-2d_1+d_2)=5$, $(d_1+2d_2)=0$. Solve for the coefficients $d_1=-2$, $d_2=1$.
\\[1ex]
\BF{Part (g)}~~Use the quadratic formula to decide. The number under the radical sign in the formula,
called the discriminant, is $b^2-4ac=2^2-4(5)(4)=(19)(-4)$, therefore there are two complex conjugate roots
and the equation is {\bf under-damped}. Alternatively, factor $5r^2+2r+4$ to obtain roots $(-1\pm\sqrt19 i)/5$
and then classify as {\bf under-damped}.
\\[1ex]
\BF{Part (h)}~~ The resonant frequency is $\omega= 1/\sqrt{LC} = 1/\sqrt{2/50}=\sqrt{25}=5$. The solution uses the theory in the textbook, section 3.7, which says that electrical resonance occurs for $\omega= 1/\sqrt{LC}$.
\\[1ex]
\vfill\eject
\BF{Part (i)}~~
% de:=diff(x(t),t,t)+2*diff(x(t),t)+17*x(t)=82*sin(5*t);dsolve(de,x(t));
% yp:=A*cos(5*t)+B*sin(5*t);eval(subs(x(t)=yp,de));
% solve({-8*A+10*B=0, -10*A-8*B=82});
The answer is $x(t)=-5\cos(5t)-4\sin(5t)$ by undetermined coefficients.\\
 Rule I: The trial solution is  $x_p(t)=A\cos(5t)+B\sin(5t)$. Rule II:  because
the homogeneous solution $x_h(t)$ has limit zero at $t=\infty$, then Rule II does not apply (no conflict). Substitute the trial solution into the differential equation. Then $-8A\cos(5t)-8B\sin(5t)-10A\sin(5t)+10B\cos(5t) = 82\sin(5t)$. Matching coefficients of sine and cosine gives the equations $-8A+10B=0$, $-10A-8B=82$. Solving, $A=-5, B=-4$. Then $x_p(t)=-5\cos(5t)-4\sin(5t)$ is the unique periodic steady-state solution.
\\[1ex]
\BF{Part (j)}~~ The characteristic polynomial is the expansion $(r-1.2)^4((r+1)^2+1)^3$. Because
$x^3e^{ax}$ is an Euler solution atom for the differential equation if and only if
$e^{ax},xe^{ax},x^2e^{ax},x^3e^{ax}$ are Euler solution
atoms, then the characteristic equation must have roots
$1.2,1.2,1.2,1.2$, listing according to multiplicity. Similarly, $x^2e^{-x}\sin(x)$ is an Euler solution
 atom for the differential equation
if and only if $-1\pm i,-1\pm i,-1\pm i$ are roots of the characteristic
equation. There is a total of 10 roots with product of the
factors $(r-1)^4((r+1)^2+1)^3$ equal to the 10th degree characteristic polynomial.
}
\fi


\end{exercises}
\EJECT

\subsection*{Chapters 4 and 5}
\begin{exercises}
\prob{6.}{(Systems of Differential Equations)} ~\newline
\BF{Background}.  Let $A$ be a real $3\times 3$ matrix with eigenpairs
 $(\lambda_1,\.v_1)$,  $(\lambda_2,\.v_2)$,  $(\lambda_3,\.v_3)$.
 The eigenanalysis method says that the $3\times 3$ 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}.$$
\BF{Background}. Let $A$ be an $n\times n$ real matrix. The method called \BF{Cayley-Hamilton-Ziebur} is based upon the result
\begin{quote}\sf
The components of solution $\.x$ of $\.x'(t)=A\.x(t)$ are linear combinations of Euler solution atoms obtained from the roots of the characteristic equation $|A-\lambda I|=0$.
\end{quote}
\BF{Background}. Let $A$ be an $n\times n$ real matrix. An augmented matrix $\Phi(t)$ of $n$ independent solutions of $\.x'(t)=A\.x(t)$ is called a
 \BF{fundamental matrix}. It is known that the general solution is $\.x(t)=\Phi(t)\.c$, where $\.c$ is a column vector of arbitrary constants $c_1, \ldots, c_n$. An alternate and widely used definition of fundamental matrix is  $\Phi'(t) = A\Phi(t)$, $|\Phi(0)| \ne 0$.

\bigskip

 \BF{(a)}  Display eigenanalysis details for the $3\times 3$ matrix
$$A=\left(\begin{array}{rrr}
 4 & 1 &  1  \\
 1 & 4 &  1  \\
 0 & 0 &  4
 \end{array}\right),$$
 then display the general solution $\.x(t)$ of $\.x'(t)=A\.x(t)$.

\BF{(b)}  The $3\times 3$ triangular matrix
$$A=\left(\begin{array}{rrr}
 3 & 1 &  1  \\
 0 & 4 &  1  \\
 0 & 0 &  5
 \end{array}\right),$$
 represents a linear cascade, such as found in brine tank models.
 Using the linear integrating factor method, starting with component $x_3(t)$, find the vector general solution $\.x(t)$ of $\.x'(t)=A\.x(t)$.

 \BF{(c)}  The exponential matrix $e^{At}$ is defined to be a fundamental matrix $\Psi(t)$ selected such that $\Psi(0)=I$, the $n\times n$ identity matrix. Justify the formula $e^{At} = \Phi(t)\Phi(0)^{-1}$, valid for {\em any} fundamental matrix $\Phi(t)$.

  \BF{(d)} Let $A$ denote a $2\times 2$ matrix. Assume  $\.x'(t)=A\.x(t)$ has scalar general solution $x_1=c_1e^t+c_2e^{2t}$, $x_2=(c_1-c_2)e^t + 2c_1+c_2)e^{2t}$, where $c_1,c_2$ are arbitrary constants. Find a fundamental matrix $\Phi(t)$ and then go on to find $e^{At}$
  from the formula in part (c) above.

  \BF{(e)} Let $A$ denote a $2\times 2$ matrix and consider the system $\.x'(t)=A\.x(t)$. Assume
   fundamental matrix
    $\dd\Phi(t) = \twobytwo{e^t & e^{2t}}{2e^t & -e^{2t}}$.
 Find the $2\times 2$ matrix $A$.

   \BF{(f)}  The Cayley-Hamilton-Ziebur shortcut  applies especially to the system
   $$ x' = 3x + y,\quad y' = -x + 3y,$$
   which has complex eigenvalues $\lambda = 3\pm i$. Show the details of the method, then go on to report a fundamental matrix $\Phi(t)$.\\
    \BF{Remark}. The vector general solution is $\.x(t)=\Phi(t)\.c$, which
 contains no complex numbers. Reference: 4.1, Examples 6,7,8.

\ifsolutions
\vfill\eject
\Answer{~\newline
\BF{Part (a)}~~ The details should solve the equation $|A-\lambda I|=0$ for the three eigenvalues $\lambda=5,4,3$. Then solve the three systems $(A-\lambda I)\vec{v}=\vec{0}$ for eigenvector $\vec{v}$, for $\lambda=5,4,3$.
\\
The eigenpairs are
$$
 5,  \colvector{1\\ 1\\ 0};\quad 4, \colvector{-1\\ -1\\ 1};\quad
  3, \colvector{1\\ -1\\ 0}.
$$
The eigenanalysis method implies
$$
\.x(t)=c_1e^{5t}  \colvector{1\\ 1\\ 0}+ c_2e^{ 4t} \colvector{-1\\ -1\\
1}+ c_3e^{3t} \colvector{1\\ -1\\ 0}.
$$
%A:=<5,1,1|1,5,1|0,0,7>^+;LinearAlgebra[Eigenvectors](A);
%P:=<1,1,0|-1,-1,1|1,-1,0>;DD:=<5,0,0|0,4,0|0,0,3>;A:=P.DD.P^(-1);
%# A.P=P.DD
\\[1ex]
\BF{Part (b)}~~ Write the system in scalar form
$$\begin{array}{lcl}
x' &=& 3x + y + z, \\
y' &=& 4y+z,\\
z' &=& 5z.
\end{array}
$$
Solve the last equation as \\
$z=\frac{\mbox{constant}}{\mbox{integrating factor}} = c_3e^{5t}$. \\
\fbox{$z = c_3e^{5t}$}\\
The second equation is\\
$y' = 4y + c_3e^{5t}$\\
The linear integrating factor method applies.\\
$y' - 4y = c_3e^{-5t}$\\
$\dd\frac{(Wy)'}{W} = c_3e^{5t}$, where $W=e^{-4t}$,\\
$(Wy)' = c_3We^{5t}$\\
$(e^{-4t}y)' = c_3e^{-4t}e^{5t}$\\
$e^{-4t}y = c_3e^t + c_2.$\\
\fbox{$y = c_3e^{5t}+c_2e^{4t}$}\\
Stuff these two expressions into the first differential equation:\\
$x' = 3x + y + z = 3x + 2c_3e^{5t}+c_2e^{4t}$\\
Then solve with the linear integrating factor method. \\
$x' - 3x = 2c_3e^{5t}+c_2e^{4t}$\\
$\dd\frac{(Wx)'}{W} = 2c_3e^{5t}+c_2e^{4t}$, where $W=e^{-3t}$. Cross-multiply:\\
$(e^{-3t}x)' = 2c_3e^{5t}e^{-3t}+c_2e^{4t}e^{-3t}$, then integrate:\\
$e^{-3t}x = c_3e^{2t}+c_2e^{t}+c_1$\\
$e^{-3t}x = c_3e^{2t}+c_2e^{t}+c_1$, divide by $e^{-3t}$:\\
\fbox{$x = c_3e^{5t}+c_2e^{4t}+c_1e^{3t}$}\\
\\[1ex]
\BF{Part (c)}~~
The question reduces to showing that $e^{At}$ and $\Phi(t)\Phi(0)^{-1}$ have equal columns. This is done by showing that the matching columns are solutions of $\vec{u}\, ' = A\vec{u}$ with the same initial condition $\vec{u}(0)$, then apply Picard's theorem on uniqueness of initial value problems.
\\[1ex]
\BF{Part (d)}~~
Take partial derivatives on the symbols $c_1,c_2$ to find vector solutions $\vec{v}_1(t)$, $\vec{v}_2(t)$. Define $\Phi(t)$ to be the augmented matrix of $\vec{v}_1(t)$, $\vec{v}_2(t)$. Compute $\Phi(0)^{-1}$, then multiply on the right of $\Phi(t)$ to obtain $e^{At}=\Phi(t)\Phi(0)^{-1}$. Check the answer in a computer algebra system or using Putzer's formula.
\\[1ex]
\BF{Part (e)}~~
The equation $\Phi'(t)=A\Phi(t)$ holds for every $t$. Choose $t=0$ and then solve for $A=\Phi'(0)\Phi(0)^{-1}$.
\\[1ex]
\BF{Part (f)}~~
By C-H-Z, $x=c_1e^{3t}\cos(t)+c_2e^{3t}\sin(t)$. Isolate $y$ from the first differential equation $x'=3x+y$, obtaining the formula $y=x'-3x=-c_1e^{3t}\sin(t)+c_2e^{3t}\cos(t)$. A fundamental matrix is found by taking partial derivatives on the symbols $c_1,c_2$. The answer is exactly the Jacobian matrix of $\colvector{x\\ y}$ with respect to variables $c_1,c_2$.\\
$\dd\Phi(t)=\twobytwo{e^{3t}\cos(t) & e^{3t}\sin(t)}{-e^{3t}\sin(t) & e^{3t}\cos(t)}$.
}
\fi
\end{exercises}
\EJECT
\subsection*{Chapter 6}

\begin{exercises}
\prob{1}{(Linear and Nonlinear Dynamical Systems)}
\newline
\BF{(a)}
 Determine whether the unique equilibrium $\vec{u}=\vec{0}$ is stable or
unstable. Then classify the equilibrium point $\vec{u}=\vec{0}$ as a
saddle, center, spiral or node. %Sub-classification into improper or proper node is not required.
 $$\vec{u}'=\twobytwo{3&4}{-2&-1}\vec{u}$$
\BF{(b)}
 Determine whether the unique equilibrium $\vec{u}=\vec{0}$ is stable or
unstable. Then classify the equilibrium point $\vec{u}=\vec{0}$ as a
saddle, center, spiral or node. %Sub-classification into improper or proper node is not required.
 $$\vec{u}'=\twobytwo{-3&2}{-4&1}\vec{u}$$
\BF{(c)} Consider the nonlinear dynamical system
  $$\begin{array}{lcl}
  x'&=& x-2y^2-y+32, \\
   y'&=& 2x^2-2xy.
  \end{array}
 $$
 An equilibrium point is $x=4$, $y=4$. Compute
 the Jacobian matrix $A=J(4,4)$ of the linearized system at this
 equilibrium point.
 \\[2ex]
 \BF{(d)} Consider the nonlinear dynamical system
  $$\begin{array}{lcl}
  x'&=& -x-2y^2-y+32, \\
   y'&=& 2x^2+2xy.
  \end{array}
 $$
 % solve({-x-2*y^2-y+32=0, 2*x^2+2*x*y=0},{x,y});
 % {x = -4, y = 4}, {x = 4, y = -4}, {x = 0, y = RootOf(2*_Z^2+_Z-32)}
 An equilibrium point is $x=-4$, $y=4$. Compute
 the Jacobian matrix $A=J(-4,4)$ of the linearized system at this
 equilibrium point.
\\[2ex]
\BF{(e)} Consider the nonlinear dynamical system
  $\dd\left\{\begin{array}{lcl}
  x'&=& -4x+4y+9-x^2, \\
   y'&=& 3x-3y.
  \end{array}\right.$\\
 At equilibrium point $x=3$, $y=3$, the Jacobian matrix is
 %$A=J(3,3)=\left.\twobytwo{-4-2x&4}{3&-3}\right|_{x=3}=\twobytwo{-10&4}{3&-3}$.
 $\dd A=J(3,3)=\twobytwo{-10&4}{3&-3}$.
 \begin{quote}
   {\bf (1)}
  Determine the stability at $t=\infty$ and the phase portrait
  classification saddle, center, spiral
  or node at $\vec{u}=\vec{0}$ for the linear system $\frac{d}{dt}\vec{u}=A\vec{u}$.

   {\bf (2)}
  Apply the Pasting Theorem to classify $x=3$, $y=3$ as a saddle, center, spiral
  or node for the {\bf nonlinear dynamical system}. Discuss all details of the application of the theorem.
  {\em Details count 75\%}.
  \end{quote}
\BF{(f)} Consider the nonlinear dynamical system
 $\dd\left\{
  \begin{array}{lcl}
  x'&=& -4x-4y+9-x^2, \\
   y'&=& 3x+3y.
  \end{array}\right.$\\
 At equilibrium point $x=3$, $y=-3$, the Jacobian matrix is
 %$A=J(3,3)=\left.\twobytwo{-4-2x&-4}{3&3}\right|_{x=3}=\twobytwo{-10&-4}{3&3}$.
 $\dd A=J(3,-3)=\twobytwo{-10&-4}{3&3}$.
 \begin{quote}
  \BF{Linearization}.~ Determine the stability at $t=\infty$ and the phase portrait
  classification saddle, center, spiral
  or node at $\vec{u}=\vec{0}$ for the \BF{linear dynamical system} $\dd\frac{d}{dt}\vec{u}=A\vec{u}$.

  \BF{Nonlinear System}.~ Apply the Pasting Theorem to classify $x=3$, $y=-3$ as a saddle, center, spiral
  or node for the {\bf nonlinear dynamical system}.
  Discuss all details of the application of the theorem.
  {\em Details count 75\%}.
  \end{quote}



\bigskip
\ifsolutions
\vfill\eject
\Answer{~\\
\BF{Part (a)}~~ It is an unstable spiral. Details: The eigenvalues of $A$ are roots of $r^2-2r+5=(r-1)^2+4=0$, which are complex conjugate roots $1\pm 2i$.
Rotation eliminates the saddle and node.
Finally, the atoms $e^{t}\cos 2t$, $e^{t}\sin 2t$ have limit zero at $t=-\infty$, therefore the system is stable at $t=-\infty$ and unstable at $t=\infty$.
So it must be a spiral [centers have no exponentials]. Report: {\bf unstable spiral}.
\\[1ex]
\BF{Part (b)}~~
%A:=<-3,-4|2,1>;
%linalg[eigenvects](A);
%   # [-1+2*I, 1, {Vector[row](2, {(1) = 1, (2) = 1+I})}],
% # [-1-2*I, 1, {Vector[row](2, {(1) = 1, (2) = 1-I})}]
% DD:=matrix([[-1,-2],[2,-1]]); P:=matrix([[1,2],[1,1]]);A:=evalm(inverse(P)&*DD&*P);
% DD:=matrix([[1,-2],[2,1]]); P:=matrix([[1,2],[1,0]]);
% A:=evalm(inverse(P)&*DD&*P);
% A:=Matrix([[3, 4], [-2, -1]]);
 % Answer: unstable spiral
% A == matrix([[5, 10], [-4, -7]])
 % Answer: stable spiral
It is a stable spiral. Details: The eigenvalues of $A$ are roots of $r^2+2r+5=(r+1)^2+4=0$, which are complex conjugate roots $-1\pm 2i$.
Rotation eliminates the saddle and node.
Finally, the atoms $e^{-t}\cos 2t$, $e^{-t}\sin 2t$ have limit zero at $t=\infty$, therefore the system is stable at $t=\infty$ and unstable at $t=-\infty$.
So it must be a spiral [centers have no exponentials]. Report: {\bf stable spiral}.
\\[1ex]
\BF{Part (c)}~~
The Jacobian is $J(x,y)=\twobytwo{1 & -4y-1}{4x-2y&-2x}$. Then $A=J(4,4)=\twobytwo{1 & -17}{8&-8}$.
\\[1ex]
\BF{Part (d)}~~
The Jacobian is $J(x,y)=\twobytwo{-1 & -4y-1}{4x+2y&2x}$. Then $A=J(-4,4)=\twobytwo{-1 & -17}{-8&-8}$.
\\[1ex]
\BF{Part (e)}~~
(1) The Jacobian is $J(x,y)=\twobytwo{-4-2x& 4}{3&-3}$. Then
$A=J(3,3)=\twobytwo{-10 & 4}{3&-3}$. The eigenvalues of $A$ are found
from $r^2+13r+18=0$, giving distinct real negative roots
$-\frac{13}{2}\pm(\frac12)\sqrt{97}$. Because there are no trig functions in the Euler solution aistoms,
then no rotation happens, and the classification must be a saddle or node. The Euler solution
atoms limit to zero at $t=\infty$, therefore it is a node and we report
a {\bf stable node} for the linear problem $\vec{u}'=A\vec{u}$ at
equilibrium $\vec{u}=\vec{0}$.
\\
(2) Theorem 2 in Edwards-Penney section 6.2 applies to say that
the same is true for the nonlinear system: {\bf stable node} at $x=3$,
$y=3$. The exceptional case in Theorem 2 is a proper node, having characteristic equation roots that are equal.
Stability is always preserved for nodes.
% DD:=matrix([[-1,-2],[2,-1]]); P:=matrix([[1,2],[1,1]]);A:=evalm(inverse(P)&*DD&*P);
% DD:=matrix([[1,-2],[2,1]]); P:=matrix([[1,2],[1,0]]);
% A:=evalm(inverse(P)&*DD&*P);
% A:=Matrix([[3, 4], [-2, -1]]);
 % Answer: unstable spiral
% A == matrix([[5, 10], [-4, -7]])
 % Answer: stable spiral
\\[1ex]
\BF{Part (f)}~~\\
% Answer: (1) u'=Au, A:=matrix([[-10,-4],[3,3]]);
%  (2) stable node  (3) Thm 2 in E+P ==> stable node
\BF{Linearization}. The Jacobian is $J(x,y)=\twobytwo{-4-2x& -4}{3&3}$. Then
$A=J(3,3)=\twobytwo{-10 & -4}{3&3}$. The eigenvalues of $A$ are found
from $r^2+7r-18=0$, giving distinct real roots
$2,-9$. Because there are no trig functions in the Euler solution atoms $e^{2t}, e^{-9t}$,
then no rotation happens, and the classification must be a saddle or node. The Euler solution
atoms do not limit to zero at $t=\infty$ or $t=-\infty$, therefore it is a saddle and we report
a {\bf unstable saddle} for the linear problem $\vec{u}'=A\vec{u}$ at
equilibrium $\vec{u}=\vec{0}$. \\
\BF{Nonlinear System}. Theorem 2 in Edwards-Penney section 6.2 applies to say that
the same is true for the nonlinear system: {\bf unstable saddle} at $x=3$,
$y=3-$.
}
\fi
\end{exercises}
\EJECT
\subsection*{Final Exam Problems}

\BF{Chapter 5}.  Solve a homogeneous system $u'=Au$, $u(0)=\colvector{1\\ 2}$,
             $A=\twobytwo{2&3}{0&4}$ using the matrix exponential,
             Zeibur's method, Laplace resolvent and eigenanalysis.

 \bigskip

\BF{Chapter 5}.  Solve a non-homogeneous system $u'=Au+F(t)$, $u(0)=\colvector{0\\ 0}$,
             $A=\twobytwo{2&3}{0&4}$, $F(t)=\colvector{3\\ 1}$ using variation
             of parameters.


\end{document}
\endinput
