\documentclass[12pt]{article}

\usepackage{amsmath,amssymb,amsthm}

\usepackage{color}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
%\tikzstyle{ball} = [circle,shading=ball, ball color=black,
%    minimum size=1mm,inner sep=1.3pt]
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
\usetikzlibrary{decorations.markings}

%\usepackage{graphicx}

\usepackage[shortlabels]{enumitem}
\setlist[enumerate]{leftmargin=*,label=(\alph*)}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}

\parskip = 0.05in
\parindent = 0.0in

\allowdisplaybreaks

%\pagestyle{empty}

\begin{document}
\centerline{Math 322 worksheet for Wednesday, Week 7}
\bigskip

\textbf{Definition.} An \emph{equilibrium point} for a system of
differential equations in~$\R^n$
\begin{align*}
  x'&= f(x)
\end{align*}
is a point~$p\in\R^n$ such that~$f(p)=0$.
\medskip

The reason for the terminology is that if~$p$ is an equilibrium point then a
solution ({\em the solution} if~$f$ is continuously differentiable) with initial
condition~$x(0)=p$ is the constant solution~$x(t)=p$.

We hope to get a qualitative sense of the solutions to our system near an
equilibrium point~$p$ by replacing the system with a linear approximation:
\begin{align*}
  x'&= Jf_p
\end{align*}
where~$Jf_p$ is the Jacobian matrix for~$f$ at~$p$.
\medskip

Consider the system of equations
\begin{align*}
  x'&= (x^2-1)y\\
  y'&= (1-y^2)\left( x+\frac{3}{10}y \right).
\end{align*}
So in this case~$f(x,y)=((x^2-1)y,(1-y^2)\left( x+\frac{3}{10}y \right))$.
\medskip

\textbf{Problem 1.} Find all equilibrium points for the system and plot them in the
plane.
\medskip

\textsc{solution:} We need to solve the system
\begin{align*}
  (x^2-1)y&= 0\\
  (1-y^2)\left( x+\frac{3}{10}y \right)&= 0.
\end{align*}
The top equation is satisfied if and only if~$x=\pm1$ or~$y=0$.  Consider these
two cases separately.  If~$x=\pm 1$, then the second equation is satisfied if
and only if~$y=\pm1$ or~$y=\pm10/3$ (the latter depending on the sign
  of~$x$).  Thus, in the first case, we find the
equilibrium points
\[
  (\pm 1,\pm1),\ \left( 1,-\frac{10}{3} \right),\ \left(
  -1,\frac{10}{3} \right).
\]
Next, consider the case where~$y=0$.  The second equation then gives~$x=0$.  So
we get a seventh equilibrium point at the origin: $(0,0)$.
\bigskip

\textbf{Problem 2.} Compute the Jacobian matrix~$Jf_{(x,y)}$ for our~$f$ at an
arbitrary point~$(x,y)$.
\medskip

\textsc{solution:} We have
\[
f(x,y)= \left((x^2-1)y,(1-y^2)\left( x+\frac{3}{10}y \right)\right)\\
\]
So
\[
  Jf_{(x,y)}=
  \left(\begin{array}{cc}
      2xy&x^2-1\\[8pt]
      1-y^2&-2y\left(x+\frac{3}{10}y\right)+\frac{3}{10}(1-y^2)
  \end{array} \right).
\]
\bigskip

\textbf{Problem 3.} For each equilibrium point~$p$, analyze the linear system
\[
  \left(\begin{array}{c}
      x'\\y'
  \end{array} \right)
  =
Jf_p
  \left(\begin{array}{c}
      x\\y
  \end{array} \right)
\]
by looking at the eigenvalues of~$Jf_p$.  Do you get a saddle? A stable
focus or node? An unstable focus or node? A center? (See the last page for a
quick guide.)
\medskip

\textsc{solution:} 

\fbox{$(0,0)$}
\[
  Jf_{(0,0)}=
  \left(\begin{array}{cc}
      0&-1\\
      1&\frac{3}{10}
  \end{array} \right).
\]
The trace is~$\tau=\frac{3}{10}$ and the determinant is~$\delta=1$.
So~$\delta>0$,~$\tau>0$, and
\[
  \tau^2-4\delta = \frac{9}{100}-4<0.
\]
This means the origin is an {\bf unstable focus}.  (The characteristic polynomial has
  two unreal eigenvalues and the real parts of the eigenvalues are positive.)

\fbox{$(1,1)$}
\[
  Jf_{(1,1)}=
  \left(\begin{array}{cc}
      2&0\\
      0&-\frac{13}{5}
  \end{array} \right).
\]
The determinant is~$\delta<0$.
This means we have a {\bf saddle}.

\fbox{$(1,-1)$}
\[
  Jf_{(1,-1)}=
  \left(\begin{array}{cc}
      -2&0\\
      0&\frac{7}{5}
  \end{array} \right).
\]
The determinant is~$\delta<0$, another {\bf saddle}.

\fbox{$(-1,1)$}
\[
  Jf_{(-1,1)}=
  \left(\begin{array}{cc}
      -2&0\\
      0&\frac{7}{5}
  \end{array} \right).
\]
The determinant is~$\delta<0$, another {\bf saddle}.

\fbox{$(-1,-1)$}
\[
  Jf_{(-1,-1)}=
  \left(\begin{array}{cc}
      2&0\\
      0&-\frac{13}{10}
  \end{array} \right).
\]
The determinant is~$\delta<0$, another {\bf saddle}.

\fbox{$\left( 1,-\frac{10}{3} \right)$}
\[
  Jf_{(1,-10/3)}=
  \left(\begin{array}{cc}
     -\frac{20}{3}&0\\[8pt]
     -\frac{91}{9}&-\frac{91}{30}
  \end{array} \right).
\]
The determinant is~$\delta>0$,~$\tau<0$, and
\[
  \tau^2-4\delta=\left( -\frac{97}{10} \right)^2-4\left(-\frac{20}{3}
  \right)\left(-\frac{91}{30} \right)
  =-8153/90<0.
\]
Therefore, we get a {\bf stable node}: two real eigenvalues, both negative.

\fbox{$\left( -1,\frac{10}{3} \right)$}
\[
  Jf_{(-1,10/3)}=
  \left(\begin{array}{cc}
     -\frac{20}{3}&0\\[8pt]
     -\frac{91}{9}&-\frac{97}{30}
  \end{array} \right),
\]
which is the same matrix we had at~$(1,-\frac{10}{3})$.
Therefore, we get another {\bf stable node}: two real eigenvalues, both negative.
\bigskip

\textbf{Problem 4.} What does the vector field look like along the line~$x=1$ and
along the line~$x=-1$?  What can you say about the special behavior of solutions with
an initial condition~$(\pm 1,y_0)$?  Interpret this geometrically.
\medskip

\textsc{solution:} The vector field along the line~$x=1$ is
\[
  f(1,y)=\left( 0,(1-y^2)\left( 1+\frac{3}{10}y \right) \right).
\]
The second coordinate is~$0$ if~$y=\pm1$ or if~$y=-10/3$.  So we have the
following cases:
\begin{center}
  \begin{tikzpicture}[
      scale = 0.8,
      decoration={markings, mark=at position 0.5 with {\arrow{>}}}]
    \node at (-5,2) {$y\in (1,\infty)\Rightarrow f(1,y)_2<0$};
    \node at (-5,0) {$y\in (-1,1)\Rightarrow f(1,y)_{2}>0$};
    \node at (-5,-2) {$y\in (-10/3,-1)\Rightarrow f(1,y)_{2}<0$};
    \node at (-5,-4) {$y\in (-\infty,-10/3)\Rightarrow f(1,y)_{2}>0$};
    \draw[postaction={decorate}] (0,-5)--(0,-10/3);
    \draw[postaction={decorate}] (0,-1)--(0,-10/3);
    \draw[postaction={decorate}] (0,-1)--(0,1);
    \draw[postaction={decorate}] (0,2.5)--(0,1);
    \node[ball] at (0,-10/3) {};
    \node[ball] at (0,-1) {};
    \node[ball,label={right:{$(1,1)$}}] at (0,1) {};
    \node[ball,label={right:{$(1,-1)$}}] at (0,-1) {};
    \node[ball,label={right:{$(1,-10/3)$}}] at (0,-10/3) {};
  \end{tikzpicture}
\end{center}
Trajectories starting at a point on the line~$x=1$ at a point below~$y=-10/3$ or
between~$y=-10/3$ and~$y=-1$ get sucked into the equilibrium point~$(1,-10/3)$.
Trajectories starting at a point on the line~$x=1$ at a point above~$y=-1$ get
sucked into the equilibrium point at~$(1,1)$.

The case for~$x=-1$ is similar.  We show the picture for ~$x=\pm1$
and~$y=\pm1$ in the solution to problem~$5$, below.
\bigskip

\textbf{Problem 5.} What does the vector field look like along the line~$y=1$ and
along the line~$y=-1$?  What can you say about the special behavior of solutions with
an initial condition~$(x_0,\pm 1)$?  Interpret this geometrically.
\medskip

\textsc{solution:} 
\begin{center}
  \begin{tikzpicture}[
      scale = 0.7,
      decoration={markings, mark=at position 0.5 with {\arrow{>}}}]
    % x = 1
    \draw[postaction={decorate}] (1,-5)--(1,-10/3);
    \draw[postaction={decorate}] (1,-1)--(1,-10/3);
    \draw[postaction={decorate}] (1,-1)--(1,1);
    \draw[postaction={decorate}] (1,5)--(1,1);
    \node[ball,label={above right:{$(1,1)$}}] at (1,1) {};
    \node[ball,label={above right:{$(1,-1)$}}] at (1,-1) {};
    \node[ball,label={below right:{$(1,-10/3)$}}] at (1,-10/3) {};
    % x = -1
    \draw[postaction={decorate}] (-1,-5)--(-1,-1);
    \draw[postaction={decorate}] (-1,1)--(-1,10/3);
    \draw[postaction={decorate}] (-1,1)--(-1,-1);
    \draw[postaction={decorate}] (-1,5)--(-1,10/3);
    \node[ball,label={below left:{$(-1,10/3)$}}] at (-1,10/3) {};
    \node[ball,label={above left:{$(-1,1)$}}] at (-1,1) {};
    \node[ball,label={above left:{$(-1,-1)$}}] at (-1,-1) {};
    % y = -1
    \draw[postaction={decorate}] (-1,-1)--(-5,-1);
    \draw[postaction={decorate}] (-1,-1)--(1,-1);
    \draw[postaction={decorate}] (5,-1)--(1,-1);
    % y = 1
    \draw[postaction={decorate}] (-5,1)--(-1,1);
    \draw[postaction={decorate}] (1,1)--(-1,1);
    \draw[postaction={decorate}] (1,1)--(5,1);
  \end{tikzpicture}
\end{center}

Here is a picture of the vector field (normalized so that each arrow has the
same length):
\begin{center}
  \includegraphics[height=3in]{07wed1.png}
\end{center}

\Needspace{5\baselineskip}
Here is a picture of the flow of the vector field:
\begin{center}
  \includegraphics[height=3in]{07wed1.5.png}
\end{center}

The vector fields near the equilibrium points~$\left( -1,10/3 \right)$
and~$\left( 1,-10/3 \right)$ both look like this:
\begin{center}
  \includegraphics[height=2.5in]{07wed2.png}
\end{center}
The linearizations at both~$(-1,10/3)$ and~$(1,-10/3)$ are the same:
\begin{align*}
  x'&= -\frac{20}{3}x\\
  y'&= -\frac{91}{9}x-\frac{91}{30}y,
\end{align*}
and the vector field looks like:
\begin{center}
  \includegraphics[height=2.5in]{07wed3.png}
\end{center}
\newpage

\centerline{\sc equilibrium points for linear systems in~$\R^2$}
\medskip

Let~$A\in M_2(\R)$.  Let~$\tau$ be the trace of~$A$, and let~$\delta$ be the
determinant of~$A$. The characteristic polynomial for~$A$ will factor
as
\begin{align*}
p(x)
&= (\lambda_1-x)(\lambda_2-x)\\
&= x^2-(\lambda_1+\lambda_2)x+\lambda_1\lambda_2\\
&= x^2-\tau x+\delta
\end{align*}
where~$\lambda_1$ and~$\lambda_2$ are the eigenvalues of~$A$.
Setting~$p(x)=0$ and solving gives an alternate description of the eigenvalues:
\[
  x = \frac{\tau\pm\sqrt{\tau^2-4\delta}}{2}.
\]
If~$\delta=0$, then at least one of the eigenvalues is zero, and we have a {\bf degenerate system}.

\fbox{$\delta=0$}\ \  {\bf degenerate}.

\fbox{$\delta<0$}\ \  real eigenvalues, opposite signs $\Rightarrow$ {\bf saddle}.

\fbox{$\delta>0$,~$\tau^2-4\delta\geq0$}\ \ real eigenvectors, same
signs $\Rightarrow$  node.

\rule{0pt}{0pt}\hspace{12pt}$\tau<0$ $\Rightarrow$ {\bf stable node}\newline
\rule{0pt}{0pt}\hspace{12pt}$\tau>0$ $\Rightarrow$ {\bf unstable node}.

\fbox{$\delta>0$,~$\tau^2-4\delta<0$}\ \ nonreal eigenvectors $\Rightarrow$ swirling vector field.

\rule{0pt}{0pt}\hspace{12pt}$\tau<0$ $\Rightarrow$ {\bf stable focus}\newline
\rule{0pt}{0pt}\hspace{12pt}$\tau>0$ $\Rightarrow$ {\bf unstable focus}\newline
\rule{0pt}{0pt}\hspace{12pt} $\tau=0$ $\Rightarrow$ {\bf center}.
\begin{center}
  \begin{tikzpicture}[scale=0.8]
    \draw (-5,0)--(5,0);
    \draw (0,0)--(0,5);
    \node at (5.3,0) {$\tau$};
    \node at (0,5.4) {$\delta$};
    \node at (1.25,3.0) {unstable};
    \node at (1.25,2.5) {focus};
    \node at (-1.25,3.0) {stable};
    \node at (-1.25,2.5) {focus};
    \node at (-3.75,1.8) {stable};
    \node at (-3.75,1.3) {node};
    \node at (3.75,1.8) {unstable};
    \node at (3.75,1.3) {node};
    \node at (0,-1) {saddle};
    \node at (0,0) {degenerate};
    \node at (-3,0) {degenerate};
    \node at (3,0) {degenerate};
    \node[rotate=90] at (-0.04,1.2) {center};
    \begin{scope}[xshift=-3.43cm, yshift=-4.6mm]
  \begin{axis}[ 
      %title style={at={(0.5,0)},anchor=north,yshift=-30},
      %title={Graph of~$f(x)=x^2$ and its tangent line at~$x=3$.},
      axis lines*=middle,
      axis equal image,
      ticks=none,
      xmin=-5,
      xmax=5,
      %ymin=-0.2,
      ymax=6.5
    ]
    %\fill[blue] (axis cs: 1,1) circle (2pt);  
    %\fill[draw=black,fill=white] (axis cs:1,0) circle (2pt);  
    \addplot[domain=-5:5,thick, blue] {x*x/4};
  \end{axis}
  \end{scope}
  \end{tikzpicture}
\end{center}
\end{document}


