\documentclass[12pt]{article}

\usepackage{amsmath,amssymb,amsthm}

\usepackage{xcolor}
\usepackage{empheq}

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

\usepackage{tikz}
%\usepackage{pgfplots}
\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]}}
\usetikzlibrary{decorations.markings}

\usepackage{graphicx}

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

\usepackage{enumitem}
\setlist[enumerate]{leftmargin=*}

%\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

%\pagestyle{empty}

\begin{document}
\centerline{Math 322 lecture for Monday, Week 12}
\bigskip

Today we will do more examples of global phase portraits.  First we recall the
method.
\bigskip

We are studying a planar system
\begin{align}\label{eqn:12monsys}
  x'&= P(x,y)\\
  y'&= Q(x,y)
\end{align}
where~$P$ and~$Q$ are polynomials.  Embedded the system in the plane~$z=1$
in~$\R^3$ and project the flow along lines centered at the origin onto the
unit sphere~$S$ centered at the origin. This flow induced a flow along the
equator of the sphere. We are interested in critical points of this flow along
the equator, where~$z=0$.  The correspond to \emph{critical points at infinity}
in our original planar system.  
\bigskip

\textsc{Step 1.} Let $d:=\max\{\deg P,\deg Q\}$. Clear denominators in the equation
\[
  yP\left( \frac{x}{z},\frac{y}{z}\right)-xQ\left(  \frac{x}{z},\frac{y}{z}
  \right)=0,
\]
and then set~$z=0$.  Note: we clear denominators by multiplying the above
expression through by~$z^d$.
\bigskip

The result is several pairs of antipodal points of the form~$(a,b,0), (-a,-b,0)$ on
the equator of the sphere.  The critical points occur among these.

\textsc{Step 2.} Projection to the
plane~$x=1$: If~$a\neq 0$, to analyze the pair of antipodal points~$(a,b,0)$
and~$(-a,-b,0)$, we may assume~$a>0$.  To determine the behavior of our
spherical system at~$(a,b,0)$, analyze the point $\left( \frac{b}{a},0\right)$ for the system
\begin{empheq}[box=\fbox]{align*}
  u' &= v^d\left(Q\left( \frac{1}{v},\frac{u}{v} \right) -uP\left( \frac{1}{v},\frac{u}{v}\right)\right)\\[10pt]
  v'&= -v^{d+1}P\left( \frac{1}{v},\frac{u}{v} \right).
\end{empheq}
The behavior at the antipodal point~$(-a,-b,0)$ will be the same except if~$d$
is even, the direction of flow is reversed.  (See the previous lecture for an
explanation.)
\medskip

Projection to the plane $y=1$: If~$a\neq 0$, then if $(a,b,0)=(0,b,0)$ is to
be on the sphere, we must have~$b=\pm1$.  The behavior at~$(0,1,0)$ is
determined by the behavior of the point~$(0,0)$ in the system

\begin{empheq}[box=\fbox]{align*} 
  u' &= v^d\left(P\left( \frac{u}{v},\frac{1}{v} \right) -uQ\left( \frac{u}{v},\frac{1}{v}\right)\right)\\[10pt] 
  v'&= -v^{d+1}Q\left(\frac{u}{v}, \frac{1}{v} \right). 
\end{empheq}
The behavior at~$(0,-1,0)$ is the same except $d$ is even, the direction of the
flow is reversed.
\bigskip

\textbf{Global phase portrait.} Imagine looking down from a point way up on the
$z$-axis at the flow we projected to the sphere.  Below us, we see a flow on a
disc whose boundary is the equator of the sphere.  That's the global phase
portrait: the projection of the flow on the upper hemisphere of the sphere down
to the~$z=0$ plane.  By analyzing the behavior of our planar system at all of
its equilibrium points, including those at infinity, we show get a good
\emph{qualitative} understanding of the flow of the system from its global phase
portrait. 
\bigskip

\textbf{Exercises from last time.} Consider the system

\begin{align*}
  x'&= x^2+y^2-1\\
  y'&= 5xy-5.
\end{align*}

{\bf Problem 1.} Find all critical points of the system, including critical
points at~$\infty$.
\medskip

\emph{Solution.} Find the critical points at infinity:
\begin{align*}
  yP\left( \frac{x}{z},\frac{y}{z}\right)-xQ\left(  \frac{x}{z},\frac{y}{z}
  \right)&=
  y\left(\left(\frac{x}{z}\right)^{2}+\left(\frac{y}{z}\right)^{2}-1\right)
  -x\left(5\left(\frac{x}{z}\right)\left(\frac{y}{z}\right)-5\right)\\[10pt]
&=\frac{x^{2}y+y^{3}-yz^{2}-5x^{2}y+5xz^{2}}{z^{2}}\\[10pt]
&=\frac{-4x^{2}y+y^{3}-yz^{2}+5xz^{2}}{z^{2}}\\[10pt]
&=0.
\end{align*}
Clear denominators:
\[
  -4x^{2}y+y^{3}-yz^{2}+5xz^{2}=0.
\]
Set~$z=0$ to get
\[
  -4x^{2}y+y^{3}=y(-4x^{2}+y^{2})=0.
\]
So the points~$\left(x,y,0\right)$ at infinity (along the equator of the sphere)
occur where~$y=0$ or where~$y=\pm 2x$.  So we need to consider the three points
\[
  (1,0,0),\quad\frac{1}{\sqrt{5}}(1,\pm2,0),
\]
and their antipodes.  In this case, since~$d=\max\{\deg P,\deg Q\}=2$ is even,
the behavior of a pair of antipodes is the same except that the flow is reversed.
\medskip

{\bf Problem 2.} Analyze each point at~$\infty$ by projecting to the plane~$x=1$. Draw the flow
in the plane~$x=1$.
\medskip

\emph{Solution.} We consider the system
\begin{align*}
  u'&=v^{2}\left(\frac{5u}{v^{2}}-5-u\left(\frac{1}{v^{2}}+\frac{u^{2}}{v^{2}}-1\right)\right)
  = 4u-5v^{2}-u^{3}+uv^{2}\\[10pt]
  v'&=-v^{3}\left(\frac{1}{v^{2}}+\frac{u^{2}}{v^{2}}-1\right)
  = -v-u^{2}v+v^{3}.
\end{align*}

We are interested in the critical points~$(0,0)$ and~$(\pm 2,0)$ for the system
\begin{align*}
  u'&=4u-5v^2-u^3+uv^2\\ 
  v'&=-v-u^2v + v^3. 
\end{align*}
The Jacobian matrix for the right-hand side is
\[
  Jf :=
  \left(\begin{array}{cc}
      4-3u^2+v^2&-10v+2uv\\
      -2uv&-1-u^2+3v^2
  \end{array} \right).
\]
We have
\[
  Jf(0,0)
  =
  \left(\begin{array}{cc}
      4&0\\
      0&-1
  \end{array} \right)\quad\text{and}\quad
J(\pm2,0)
=
\left(\begin{array}{cc}
    -8&0\\
    0&-5
\end{array} \right).
\]
Thus, we get a saddle at~$(0,0)$ and a sinks at~$(\pm2,1)$.

Here is the flow given by this system in the~$x=1$ plane:
\begin{center}
  \includegraphics[height=2.5in]{12mon_linearized1.png}
\end{center}

{\bf Problem 3.} Try to reconcile your results from Problem 2 with the flow of
the original system displayed below:
\begin{center}
  \includegraphics[height=2.5in]{11fri.png}
\end{center}
Try to draw a global phase portrait.
\medskip

\emph{Solution.} Notice in the original system, the almost parallel
trajectories heading off to the northeast as a slope of about~$2$.  If we
consider draping the plane over an underlying sphere, these trajectories will
converge to the critical point~$(1,2,0)$ on the equator.  Similarly, the
trajectories heading to the southeast with a slope of approximately~$-2$ will
converge to~$(1,-2,0)$.  The trajectories streaming in on the left from the
northwest and southwest are coming from the antipodal points~$(-1,2,0)$
and~$(-1,-2,0)$.


\Needspace{3\baselineskip}
Global phase portrait:
\begin{center}
  \begin{center}
     \includegraphics[height=2in]{12mon_global.png}   
  \end{center}
\end{center}
\begin{center}
  \begin{center}
    \begin{tikzpicture}
      \node at (0,0) {\includegraphics[height=2in]{11fri.png}};
      \node at (0,-3) {original system};
      \begin{scope}[xshift=8cm]
	\node at (0,0) {\includegraphics[height=2in]{12mon_linearized1.png}};
	\node at (0,-3) {$x=1$ plane projection};
      \end{scope}
    \end{tikzpicture}
  \end{center}
\end{center}

We finish with a couple more examples of global phase portraits.
\medskip

\textbf{Example.}  Consider the system
\begin{align*}
  x'&= x^3-3xy^2\\
  y'&= 3x^2y-y^3 .
\end{align*}
The flow is
\begin{center}
  \includegraphics[height=2in]{12mon_example1.png}
\end{center}

To find the interesting points at infinity (along the equator of the sphere) we
compute
\[
  yP\left( \frac{x}{z},\frac{y}{z}\right)-xQ\left(  \frac{x}{z},\frac{y}{z}
  \right)=0,
\]
then clear denominators and set $z=0$ to get
\[
  0=-2x^3y - 2xy^3= -2xy(x^{2}+y^{2}).
\]
There are no points on the equator for which~$x^{2}+y^{2}=0$, i.e., for
which~$x=y=0$.  So the solutions occur when on of~$x$ and~$y$ is~$0$ and the
other is nonzero.  That gives two pair of antipodal points to check:
$\pm(1,0,0)$ and~$\pm(0,1,0)$.  To check $(1,0,0)$ we project to the $x=1$
plane.  The system is
\begin{align*}
  u'&=2u+2u^3\\
  v'&=-v+3u^2v
\end{align*}
Linearized at the point~$(0,0)$, the system becomes
\begin{align*}
  u'&=2u\\
  v'&=-v,
\end{align*}
which is a saddle.  Since~$d=3$ is odd, the behavior at the antipodal
point~$(-1,0,0)$ is the same.

For the point~$(0,1,0)$ we project to the plane~$y=1$.  The system is
\begin{align*}
  u'&=-2u-2u^3\\
  v'&=v-3u^2v
\end{align*}
Linearized at the point~$(0,0)$, the system becomes
\begin{align*}
  u'&=-2u\\
  v'&=v,
\end{align*}
another saddle.  The antipodal point~$(0,-1,0)$ is similar.
\medskip

The global phase portrait is:
\begin{center}
  \includegraphics[height=2in]{12mon_example1_global.jpg}
\end{center}
\bigskip

\textbf{Example.} Consider the system
\begin{align*}
  x'&= -y-xy\\
  y'&= x+x^2.
\end{align*}
The flow is
\begin{center}
  \includegraphics[height=2in]{12mon_example2.png}
\end{center}

To find the interesting points at infinity (along the equator of the sphere) we
compute
\[
  yP\left( \frac{x}{z},\frac{y}{z}\right)-xQ\left(  \frac{x}{z},\frac{y}{z}
  \right)=0,
\]
then clear denominators and set $z=0$ to get
\[
  0=-x^3 - xy^2 =-x(x^{2}+y^{2})
\]
So we need~$x=0$.  That means we are interested in the points~$\pm(0,1,0)$ on
the equator.  Projecting to the plane~$y=1$, we get the system
\begin{align*}
 u'&=-u-v -u^3 - u^2v\\
 v'&= -u^2v - uv^2,
\end{align*}
which looks like
\begin{center}
  \includegraphics[height=2in]{12mon_example2_yproj.png}
\end{center}
Note the line of critical points in the planar flow diagram and how those
transform when that flow is projected onto the sphere and then onto the
plane~$x=1$.
\end{document}

