\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]}}

%\usepackage{graphicx}

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

\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

%\pagestyle{empty}

\begin{document}
\centerline{Math 322 lecture for Friday, Week 3}
\bigskip

\textbf{Lemma.} (p.~17) Let~$A\in M_n(F)$.  Then
\[
  \frac{d}{dt}e^{At}=Ae^{At}.
\]
\smallskip

\begin{proof}
 For any constants~$t$ and~$h$, we know~$At$ and~$Ah$ commute.
 Therefore,
 \begin{align*}
   \frac{d}{dt}e^{At}
   &= \lim_{h\to 0}\frac{e^{A(t+h)}-e^{At}}{h}\\[8pt]
   &= \lim_{h\to 0}\frac{e^{At}e^{Ah}-e^{At}}{h}\\[8pt]
   &= \lim_{h\to 0}e^{At}\frac{e^{Ah}-I_n}{h}.
 \end{align*}
 Multiplication by a matrix is a linear and, hence, continuous transformation, and
 by definition, continuous functions commute with limits.  So, continuing from
 above,
 \begin{align*}
   \frac{d}{dt}e^{At}
   &= \lim_{h\to 0}e^{At}\frac{e^{Ah}-I_n}{h}\\[8pt]
   &= e^{At}\lim_{h\to 0}\frac{e^{Ah}-I_n}{h}.
 \end{align*}
 We now use the fact that~$e^{Ah}$ is absolutely an uniformly convergent
 for~$h$ restricted to a compact set, e.g., for~$h\in[-1,1]$.  This means,
 roughly, the we can manipulate the infinite sum defining the exponential as if
 it were a polynomial:
 \begin{align*}
   \frac{d}{dt}e^{At}
   &= e^{At}\lim_{h\to 0}\frac{e^{Ah}-I_n}{h}\\[8pt]
   &= e^{At}\lim_{h\to
   0}\frac{1}{h}\left(Ah+\frac{A^2h^2}{2!}+\frac{A^3h^3}{3!}+\dots\right)\\[8pt]
   &= e^{At}A\\
   &= Ae^{At}.
 \end{align*}
 The final step follows since~$A$ commutes with itself.
\end{proof}

\textbf{Theorem.} (The Fundamental Theorem for Linear Systems. (p.~17))
Let~$A\in M_n(F)$, and let~$x_0\in F^n$.  The initial value problem
\begin{align*}
  x'&= Ax\\
  x(0)&= x_0
\end{align*}
has the unique solution
\[
  x=e^{At}x_0.
\]
\smallskip

{\bf Proof.} Using the preceding lemma, if~$x(t):=e^{At}x_0$, then
\begin{align*}
  x'(t)
  &= \frac{d}{dt}x(t)\\[8pt]
  &= \frac{d}{dt}\left( e^{At}x_0 \right)\\[8pt]
  &= \left(\frac{d}{dt}e^{At}\right)x_0 \\[8pt]
  &= Ae^{At}x_0\\[8pt]
  &= Ax.
\end{align*}
Further,~$x(0)=e^{0}x_0=x_0$.  For uniqueness, suppose that~$x(t)$ is any
solution, and consider~$y(t):=e^{-At}x(t)$.  By the product rule,
\begin{align*}
  y'(t)
  &= \left( e^{-At} \right)'x(t)+e^{-At}x'(t)\\[8pt]
  &= -Ae^{-At}x(t)+e^{-At}\left(Ax(t)\right)\\[8pt]
  &= e^{-At}\left(-Ax(t)+Ax(t)\right)\\[8pt]
  &= 0.
\end{align*}
Therefore~$y(t)$ is constant.  To determine the constant, let~$t=0$:
\[
  y(0)=e^{0}x(0)=I_nx_0=x_0.
\]
Then,
\[
  y(t)=e^{-At}x(t)=x_0\quad\Rightarrow\quad x(t)=e^{At}x_0.
\]
\hfill$\Box$
\bigskip

\centerline{\sc two-dimensional linear systems}
\medskip

{\bf Example.} Consider the (coupled) linear system
\begin{align*}
  x_1'&= x_2\\
  x_2'&= x_1.
\end{align*}
Given an initial condition~$(a,b)$, a solution will be a
curve~$x(t)=(x_1(t),x_2(t))$ in the plane, passing through~$(a,b)$ at
time~$t=0$.  The system itself tells us the velocity vector of any potential
solution at every time:
\[
  x'(t)=(x_1'(t),x_2'(t))=(x_2(t),x_1(t)).
\]
So the system determines the vector field~$F(x_1,x_2)=(x_2,x_1)$ on~$\R^2$,
pictured below:
\begin{center}
  \includegraphics[height=2in]{03fri1.png}
\end{center}
Any solution curve must ``follow the flow'', i.e., its velocity vectors coincide
with those already drawn above.  Some possible solution curves are drawn below.
You can see the paths of the curves but not their speeds:
\begin{center}
  \includegraphics[height=2in]{03fri2.png}
\end{center}
We will now solve the system using the tools we have developed.  First write
the system as~$x'=Ax$ with~$A=\left(\begin{array}{cc}
    0&1\\1&0
\end{array} \right)$:
\[
\left(\begin{array}{c}
x_1'\\x_2'
\end{array} \right)
=
\left(\begin{array}{cc}
    0&1\\1&0
\end{array} \right)
\left(\begin{array}{c}
    x_1\\x_2
\end{array} \right).
\]
The solution is~$x=e^{At}x_0$ where~$x_0=x(0)$.  In order to
exponentiate~$A$, we diagonalize it.
The characteristic polynomial of~$A$ is
\[
  \det(A-xI_2)=\det\left(\begin{array}{cc}
      -x&1\\1&-x
  \end{array} \right)=x^2-1=(x+1)(x-1).
\]
So the eigenvalues are~$\pm 1$.  It's easy to eyeball the corresponding
eigenvectors:~$(1,1)$ and~$(1,-1)$, respectively.  So let
\[
P = 
\left(\begin{array}{cc}
    1&1\\
    1&-1
\end{array} \right).
\]
Then
\[
  P^{-1}=
  \frac{1}{2}
  \left(\begin{array}{cc}
     1&1\\
     1&-1
 \end{array} \right),
\]
and~$P^{-1}AP=\diag(1,-1)=:D$.

Therefore,~$D=PAP^{-1}$, and
\begin{align*}
  e^{At}
  &= e^{PDP^{-1}t}= e^{P(Dt)P^{-1}}= Pe^{Dt}P^{-1}\\[10pt]
  &=
  \frac{1}{2}\left(\begin{array}{cc}
    1&1\\1&-1
\end{array} \right)
\left(\begin{array}{cc}
    e^t&0\\0&e^{-t}
\end{array} \right)
\left(\begin{array}{cc}
    1&1\\1&-1
\end{array}\right) \\[10pt]
&=
\frac{1}{2}
\left(\begin{array}{cc}
    e^t+e^{-t}&e^t-e^{-t}\\
    e^t-e^{-t}&e^t+e^{-t}
\end{array} \right).
\end{align*}
So, for example, the solution with initial condition~$x(0)=(1,0)$ is
\[
  x(t)=
  e^{At}
  \left(\begin{array}{c}
      1\\0
  \end{array} \right)
  =
\frac{1}{2}
\left(\begin{array}{cc}
    e^t+e^{-t}&e^t-e^{-t}\\
    e^t-e^{-t}&e^t+e^{-t}
\end{array} \right)
\left(\begin{array}{c}
    1\\
    0
\end{array} \right)
=
\frac{1}{2}
\left(\begin{array}{c}
    e^t+e^{-t}\\
    e^t-e^{-t}
\end{array} \right).
\]
To see what is happening geometrically, note that
\[
  x'=Ax=PDP^{-1}x\quad\Rightarrow\quad P^{-1}x'=DP^{-1}x.
\]
Letting~$y:=P^{-1}x$, we have~$y'=P^{-1}x'$.  So substituting gives
\[
  y'=Dy=\left(\begin{array}{cc}
      1&0\\
      0&-1
  \end{array} \right)y
\]
an uncoupled system:
\begin{align*}
  y_1'&= y_1\\
  y_2'&= -y_2
\end{align*}
with solution~$y_1=ae^{t}$ and~$y_2=be^{-t}$.  We then get the solution to our
original equation by
\[
  x = Py.
\]
The initial condition~$x(0)=(1,0)$ in the~$x$-coordinates transforms to the initial
condition
\[
  y(0)=P^{-1}x(0)=
  P^{-1}\left(\begin{array}{c}
      1\\0
  \end{array} \right)
  =
  \frac{1}{2}
  \left(\begin{array}{c}
      1\\1
  \end{array} \right)
\]
in the~$y$-coordinates, which implies~$a=b=\frac{1}{2}$.  So in the~$y$-coordinates, our solution is
\[
  y(t)=\frac{1}{2}(e^{t},e^{-t}).
\]
The geometry is shown below:
\begin{center}
  \begin{tikzpicture}
    \node at (-4.5,0) (y) {\includegraphics[height=2in]{03fri4.png}};
    \node at (4.5,0) (x) {\includegraphics[height=2in]{03fri3.png}};
    \draw[->] (y)--(x);
    \node at (0,1) {$P=\left(\begin{array}{rr}
	1&1\\1&-1
  \end{array} \right)$};
  \node at (0,-1) {$y\to Py=x$};
  \end{tikzpicture}
\end{center}
\medskip

{\bf Question.}  How is the magnitude and sign of the determinant of~$P$
expressed in the above image?
\end{document}


