\sectionhead{A Linear Example (string)}
     \begin{center}(a little string theory :-)\end{center}
     \begin{itemize}
       \item It will be worth our while to have some very specific examples available, so let's start with this one -- 
          consider a string stretched tightly between two fixed endpoints:
            
             \vspace{0.5cm}
             \begin{center}
              \begin{tikzpicture}[line width=2.5pt]
                   \draw (-6,0) -- (6,0);
                   \draw(-6,-0.3) -- (-6,0.3);
                   \draw(6,-0.3) -- (6,0.3);
             \end{tikzpicture}
              \end{center}
              
%	      \centerline{\includegraphics[width = 6in]{string-zero}}
	      	      
	    We can pull the center of the string up:
	    
	     \vspace{0.5cm}
              \begin{center}
                   \begin{tikzpicture}[line width=2.5pt]
                        \draw (-6,0) -- (0,1);
                        \draw (0,1) -- (6,0);
                        \draw(-6,-0.3) -- (-6,0.3);
                        \draw(6,-0.3) -- (6,0.3);
                        \draw[color=gray, thin](-6,0) -- (6,0);
                  \end{tikzpicture}
              \end{center}
              
%	      \centerline{\includegraphics[width = 6in]{string-up}}
	      
	      At the moment we release it, there will be forces acting on the string.  Let's focus our attention on the
	      center point of the string (where we had taken hold of it to pull it up).  There will be forces pulling toward
	      the two fixed ends:
	      
	      \vspace{0.5cm}
	      \begin{center}
                   \begin{tikzpicture}[line width=2.5pt]
                        \draw (-6,0) -- (0,1);
                        \draw (0,1) -- (6,0);
                        \draw(-6,-0.3) -- (-6,0.3);
                        \draw(6,-0.3) -- (6,0.3);
                        \draw[color=gray, thin](-6,0) -- (6,0);
                        \draw[->](-0.1, 1.5) -> (-2.1,1.1);
                        \draw[->](0.1, 1.5) -> (2.1,1.1);
                  \end{tikzpicture}
              \end{center}
              
%	      \centerline{\includegraphics[width = 6in]{string-forces}}
	      
	      There will be a ``net'' force acting on the center point of the string:
	      
	       \vspace{0.5cm}
	       \begin{center}
                   \begin{tikzpicture}[line width=2.5pt]
                        \draw (-6,0) -- (0,1);
                        \draw (0,1) -- (6,0);
                        \draw(-6,-0.3) -- (-6,0.3);
                        \draw(6,-0.3) -- (6,0.3);
                        \draw[color=gray, thin](-6,0) -- (6,0);
                        \draw[->](0, 0.9) -> (0,0.3);
                  \end{tikzpicture}
              \end{center}
              
%	      \centerline{\includegraphics[width = 6in]{string-force-net}}

               Now let's put a ``reference frame'' on the system, so we can make things more explicit.

\pagedone
 	      
	        We will measure
	      the vertical displacement of the center point of the string relative to the ``resting position,'' with positive
	      up and negative down:
	      
	       \vspace{0.5cm}
	        \begin{center}
                   \begin{tikzpicture}[line width=2.5pt]
                        \draw (-6,0) -- (0,1);
                        \draw (0,1) -- (6,0);
                        \draw(-6,-0.3) -- (-6,0.3);
                        \draw(6,-0.3) -- (6,0.3);
                        \draw[color=gray, thin](-6,0) -- (6,0);
                        \draw[->](0, 0.9) -- (0,0.3);
                        \draw[<->](6.75,-3) -- (6.75, 3);
                        \draw(6.6,0) -- (6.9,0);
                        \draw(7.5,0) node {0};
                        \draw(7.3,2) node {+};
                        \draw(7.3,-2) node {--};
                        \draw(7.7,3) node {x};
                        
                  \end{tikzpicture}
              \end{center}
              
%	      \centerline{\includegraphics[width = 7.5in]{string-ref-frame}}
	      
	      At this point we'll make a set of simplifying assumptions, and in particular treat this as a {\em linear} system
	      (in a sense to be made more explicit below).

 \pagedone
 
      \item  Among the assumptions we'll make are:
      
        \begin{itemize}
             \item Everything is nicely symmetric (in particular, the force is exactly vertical).
             \item The force is very simple (no complications from friction, etc.).
             \item The force changes {\em linearly} with the displacement of the center point  of the string.
             \item The motion is always continuous and smooth (differentiable), and thus, also,
             \item Newtonian mechanics (and all that that entails, including all the machinery of the calculus \ldots)
        \end{itemize} 
        
\pagedone

      \item Now we'll set this up as a (Newtonian) differential system.  The (vertical) displacement of the center point
           of the string will be denoted by $x$ (which we will recall is actually a function of time $t$, but we will generally
           simplify the notation as $x$ rather than $x(t)$).  We will (often) denote the derivative of a function with respect
           to time as 
                $$\dot{x} = \frac{d x(t)}{d t}$$
           and the second derivative as
                $$\ddot{x} =   \frac{d^2 x(t)}{d t^2}.$$
           As appropriate, we will refer to velocity and acceleration as
                $$ v = \dot{x}$$
            and
                 $$ a = \dot{v} = \ddot{x}.$$
                 
            For the time being, we will assume a very simple form for the force on the center point:
                 $$ F = - x$$
            (Note:  these should really be vectors $\vec{F} = -\vec{x}$, but we'll keep the notation simple for now \ldots).
            This is the place at which we are doing a {\em linear} approximation, and thus are working with a {\em linear
            dynamical system}.
            
            Now we invoke Newton, and his fundamental equation of motion:
                 $$ F = m a$$
            (and we'll use units where $m = 1$, and thus write $F = a$).
 \pagedone
       \item Putting the pieces together, our system is given by the linear ordinary differential equation:
                 $$ a = F = - x$$
            or
                 $$ \ddot{x} = - x$$
            or
                 $$ \ddot{x} + x = 0.$$
            
            We can use the standard machinery of calculus to solve this differential equation.
            
 \pagedone
 
           The characteristic polynomial of this differential equation is
                $$ z^2 + 1 = (z + i)(z - i)$$
           with roots $z = i$ and $z = - i$.  Hence the general form of the solution is
                $$ x = x(t) = b_0 e^{it} + b_1 e^{-i t}.$$
           Now we can remember (use) the definition
                $$e^x = \sum_{n = 0}^\infty \frac{x^n}{n!},$$
           from which we get
           \begin{equation*}
                 \begin{split}
                     e^{it} & =  \sum_{n = 0}^\infty \frac{(it)^n}{n!} \\
                              & =  1 + it - \frac{t^2}{2!} - i \frac{t^3}{3!} + \frac{t^4}{4!} + \cdots \\
                              & =  1 - \frac{t^2}{2!} + \frac{t^4}{4!} - \cdots \\
                              & \quad \  \ + it - i \frac{t^3}{3!} + i \frac{t^5}{5!} - \cdots \\
                              & =  \sum_{n = 0}^\infty (-1)^n \frac{t^{(2n)}}{(2n)!} + i \sum_{n = 0}^\infty (-1)^n \frac{t^{(2n+1)}}{(2n+1)!} \\
                              & =  \cos{(t)} + i \sin{(t)}.
                \end{split}
          \end{equation*}
          Then, using some standard techniques (and observing that $\cos{(t)}$ and $\sin{(t)}$ are linearly independent),
          we find that the general solution to our system can be written as:
               $$ x(t) = c_0 \cos{(t)} + c_1 \sin{(t)}.$$
               
          Of course, if we didn't want to be reminded of the general method of solving linear ordinary differential equations,
          or the definition of the exponential function, or
          Euler's formula ($ e^{it} = \cos{(t)} + i \sin{(t)}$), we could have just observed that
               $$ \frac{d^2\cos{(t)}}{dt^2} = - \cos{(t)} $$
          and
               $$ \frac{d^2\sin{(t)}}{dt^2} = - \sin{(t)} $$
          and gone straight to our general solution :-)
     \end{itemize}
\pagedone
\subsectionhead{Systems of Differential Equations}
    \begin{itemize}
     \item There is another nice way to represent such a second order ordinary differential equation, as a
          system of first order differential equations.
          
          In this example, we start with the equation
               $$ \ddot{x} + x = 0, $$
          then introduce a new variable $v = \dot{x}$ (which we have seen before -- the velocity), and then
          express things as a system:
          \begin{align*}
              \dot{x} & =  v \\
              \dot{v} & =  -x
          \end{align*}
          
          This is a very general approach, which can also be applied to $n$th order equations, resulting in a system
          $n$ first order equations.
          
\pagedone
          
          We can then rewrite the system in vector/matrix notation:  
               $$\begin{bmatrix} \dot{x} \\ \dot{v}  \end{bmatrix}
                           = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}
                              \begin{bmatrix} x \\ v  \end{bmatrix}
               $$
          (note the convenient use of column notation for vectors).
          
          Changing notation slightly, to simplify extension to $n$th order:
               $$\begin{bmatrix} \dot{x_1} \\ \dot{x_2}  \end{bmatrix}
                           = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}
                              \begin{bmatrix} x_1 \\ x_2  \end{bmatrix}
               $$
          and, writing $\mathbf{x}$ for $ \begin{bmatrix} x_1 \\ x_2  \end{bmatrix}$, 
          $\mathbf{\dot{x}}$ for $ \begin{bmatrix} \dot{x_1} \\ \dot{x_2}  \end{bmatrix}$, and
          $\mathbf{A}$ for $\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}$, we can write
          $$\mathbf{\dot{x}} = \mathbf{A} \mathbf{x}.$$

\pagedone

          Generalizing to $n$th order, writing $\mathbf{x}$ for $\begin{bmatrix} x_1 \\ \vdots \\ x_n  \end{bmatrix} $, etc.,
          and also allowing a constant $b_i$ to be added to each row, we have a system
          $$\mathbf{\dot{x}} = \mathbf{A} \mathbf{x} + \mathbf{b}.$$
          
          In this form, it is easy to see that these are {\em linear} systems.  There is a well developed theory for solving
          such systems (using eigenvalues/eigenvectors, etc.), and even for generalizations where $\mathbf{A}$ and
          $\mathbf{b}$ can be time dependent:
          $$\mathbf{\dot{x}} = \mathbf{A}(t) \mathbf{x} + \mathbf{b}(t).$$
          Discussion of this is available in various places, such as here:
          \hyperref{http://www.unf.edu/\~mzhan/chapter4.pdf}{}{}{http://www.unf.edu/\~\ mzhan/chapter4.pdf}.

 \pagedone
 
      \item For future reference, here is an example of what a {\em nonlinear} system would like in this sort of notation
           (of course, the right hand sides won't be linear, and hence we won't get the nice simple matrix representation).
           
           These are the (famous) {\em Lorenz equations}, which give rise to the {\em Lorenz attractor}: 
           \begin{align*}
                \dot{x} & =  \sigma (y - x) \\
                \dot{y} & =  x (\rho - z) - y \\
                \dot{z} & =  xy - \beta z
           \end{align*}
           where $\sigma$ is the {\em Prandtl number}, $\rho$ is the {\em Rayleigh number}, and $\beta$ is another adjustable
           parameter.  All of $\sigma$, $\rho$, and $\beta$ are positive, with typical values $\sigma = 10$, $\beta = 8 / 3$, and
           $\rho$ is varied.  When $\rho$ = 28, the system exhibits chaotic behavior.  You can see the nonlinear (mixed) terms
           in the second and third equations (the $xz$ and $xy$ terms).
           \end{itemize}
 \pagedone
 \subsectionhead{Simple Harmonic Oscillator}
      \begin{itemize}
      \item  Let's go back to our string example (i.e., our simple harmonic oscillator).  For ease of reading, let's also go
           back to our notation of position $x$ and velocity $v$, or, when we want to clarify the time dependence, $x(t)$
           and $v(t)$:
           \begin{align*}
                \dot{x} & =  v     &  \dot{x}(t) & =  v(t) \\
                \dot{v} & =  - x   &  \dot{v}(t) & =  -x(t) \\
           \end{align*}
           The simplest solution to this system is $x(t) = \cos{(t)}$ (and, of course, $v(t) = - \sin{(t)}$).
           We can plot $x(t)$ vs. $t$:
           
           \begin{center}
                \begin{tikzpicture}[scale=3, line width=2pt]
                     \draw[->](0,0) -- (5,0);
                     \draw(5.1,0) node {$t$};
                     \draw[->](0,-0.75) -- (0,0.75);
                     \draw(-0.2,0.4) node {$x$};
                     \draw[x=1.57ex,y=1ex] (0,1)
                          cos (1,0) sin (2,-1) cos (3,0) sin (4,1) cos(5, 0) sin(6,-1) cos(7,0) sin(8,1);
                     \draw[->](0,-0.75) -- (0,0.75);
                \end{tikzpicture}
           \end{center}
           
%           \begin{picture}(20, 5.5)
%                \thicklines
%                \put(0,2.5){\vector(1,0){19.9}}
%                \put(1,0){\vector(0,1){5.5}}
%                \put(20.2,2.4){$t$}
%                \put(0,4.6){$x$}
%                \qbezier(1,5)(3,5)(5,2.5)
%                \qbezier(5,2.5)(7,0)(9,0)
%                \qbezier(9,0)(11,0)(13,2.5)
%                \qbezier(13,2.5)(15,5)(17,5)
%           \end{picture}
 \pagedone
           We can also try plotting both $x(t)$ and $v(t)$ on the same graph:
           
           \begin{center}
                \begin{tikzpicture}[scale=3, line width=1.75pt]
                     \draw[->](0,0) -- (5,0);
                     \draw(5.1,0) node {$t$};
                     \draw[->](0,-0.75) -- (0,0.75);
                       \draw[color=blue](-0.2, 0.4) node {$x$};
                     \draw[color=red](-0.2, 0) node {$v$};
                     \draw[color=blue,x=1.57ex,y=1ex]
                          (0,1) cos (1,0) sin (2,-1) cos (3,0) sin (4,1) cos(5, 0) sin(6,-1) cos(7,0) sin(8,1);
                     \draw[color=red,x=1.57ex,y=1ex]
                          (0,0) sin (1,-1) cos (2,0) sin (3,1) cos (4,0) sin(5,-1) cos(6, 0) sin(7, 1) cos(8,0);
                     \draw[color=blue](-0.2, 0.4) node {$x$};
                     \draw[color=red](-0.2, 0) node {$v$};
                \end{tikzpicture}
           \end{center}
           
%           \begin{picture}(20, 5.5)
%                \thicklines
%                \put(0,2.5){\vector(1,0){19.9}}
%                \put(1,0){\vector(0,1){5.4}}
%                \put(20.2,2.4){$t$}
%                \put(0,4.6){$x$}
%                \put(0,3){$v$}
%                \qbezier(1,5)(3,5)(5,2.5)
%                \qbezier(5,2.5)(7,0)(9,0)
%                \qbezier(9,0)(11,0)(13,2.5)
%                \qbezier(13,2.5)(15,5)(17,5)
%                
%                \qbezier(1,2.5)(3,5)(5,5)
%                \qbezier(5,5)(7,5)(9,2.5)
%                 \qbezier(9,2.5)(11,0)(13,0)
%                \qbezier(13,0)(15,0)(17,2.5)
%           \end{picture}
           
           Before long, this can get fairly messy.  We would like better ways to visualize the system.
           
           One important point is that this is a fully deterministic system, and the state of the system is completely
           specified once we know $x$ and $v$.  We can thus visualize the system in {\em state space}
           (also called {\em phase space}), with one dimension for each variable.  Each point in phase space
           represents the state of the system at a particular time, and over time the system will trace a {\em trajectory}
           through phase space.
           
           For our simple harmonic oscillator, the phase space trajectory takes a particularly nice form:
           
           \begin{center}
                \begin{tikzpicture}[line width=1.75pt]
                     \draw[color=blue, ->] (-5,0) -- (5,0);
                     \draw[color=blue](5.4,0) node{$x$};
                     \draw[color=red, ->](0,-4) -- (0,4);
                     \draw[color=red](0,4.4) node{$v$};
                     \draw[color=purple] (0,0) circle (3cm);
                     \draw(4.7,3)node{$\begin{bmatrix} \textcolor{blue}{x(t)} \\ \textcolor{red}{v(t)}  \end{bmatrix}$};
                     \draw [->] (3.6,3) arc (90:150:1.7cm);
                     \draw(5.2,-2)node{$\begin{bmatrix} \textcolor{blue}{x(0)} \\ \textcolor{red}{v(0)}  \end{bmatrix}$};
                     \draw [->] (3.8,-1.8) -- (3.1,-0.1);
                \end{tikzpicture}
           \end{center}
           
 \pagedone

      \item We can also think about the vector field consisting of the derivatives.  Associated with each
           point in phase space, there is the vector of the velocity/acceleration values.  At
           the point $\begin{bmatrix} \textcolor{blue}{x(t)} \\ \textcolor{red}{v(t)}  \end{bmatrix}$ there is
           the derivative vector $\begin{bmatrix} {v(t)} \\ {-x(t)}  \end{bmatrix}$:
          \begin{center}
                \begin{tikzpicture}[line width=1.75pt]
                     \draw[color=blue, ->] (-6,0) -- (6,0);
                     \draw[color=blue](6.4,0) node{$x$};
                     \draw[color=red, ->](0,-4) -- (0,4);
                     \draw[color=red](0,4.4) node{$v$};
                     \foreach \x in {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5}
                         \foreach \y in {-3, -2, -1, 0, 1, 2, 3}
                               \pgfmathsetmacro{\u } { (\x + \y / 5) }
                               \pgfmathsetmacro{\v}{ \y + (-1) * (\x / 5) }
                               \draw[->](\x, \y) -- (\u, \v);
                \end{tikzpicture}
           \end{center}
\pagedone

          For a given trajectory in phase space, the derivative vectors along the trajectory will be tangent to
          the trajectory at each point:
           \begin{center}
                \begin{tikzpicture}[line width=1.75pt]
                     \draw[color=blue, ->] (-5,0) -- (5,0);
                     \draw[color=blue](5.4,0) node{$x$};
                     \draw[color=red, ->](0,-4) -- (0,4);
                     \draw[color=red](0,4.6) node{$v$};
                     \draw[color=purple] (0,0) circle (3cm);
                     \draw [->] (3,0) -- (3, -3);
                     \draw [->] (2.12, -2.12) -- (0, -4.24);
                     \draw [->] (0, -3) -- (-3, -3);
                     \draw [->] (-2.12, -2.12) -- (-4.24,0);
                      \draw [->] (-3, 0) -- (-3,3);
                      \draw [->] (-2.12, 2.12) -- (0, 4.24);
                      \draw [->] (0, 3) -- (3, 3);
                       \draw [->] (2.12, 2.12) -- (4.24, 0);
                \end{tikzpicture}
           \end{center}
      \end{itemize}
\pagedone
\subsectionhead{Some Other Examples}
     It is probably worth noting that there are various other examples we could have used to get here.
     
     One example is a mass supported by a spring:
          \vspace{0.5cm}
%          \begin{center}
%              \begin{tikzpicture}[line width=2.5pt]
%                   \draw (-6,0) -- (6,0);
%                   \draw(-6,-0.3) -- (-6,0.3);
%                   \draw(6,-0.3) -- (6,0.3);
%             \end{tikzpicture}
%          \end{center}
          \begin{center}
               \begin{tikzpicture}[line width=2.5pt]
                    \node[circle,fill=blue,inner sep=2.5mm] (a) at (0,0) {};
                   % \node[circle,fill=blue,inner sep=2.5mm] (b) at (2,2) {};
                    \draw[decoration={aspect=0.3, segment length=3mm, amplitude=3mm,coil},decorate] (0,4) -- (a); 
                   % \draw[decoration={aspect=0.3, segment length=1.5mm, amplitude=3mm,coil},decorate] (2,5) -- (b); 
                    \fill [pattern = north east lines] (-1,4) rectangle (1,4.2);
                    \draw[thick] (-1,4) -- (1,4);
                    \draw[<->, color=blue] (1, -2.5) -- (1, 2.5);
                    \draw[color=blue] (0.9, 0) -- (1.1, 0);
                    \draw[color=blue](1.6, -2.4) node{\large $x$};
                    \draw[color=blue](1.4, 0) node{$0$};
                    \draw[color=blue](1.25, -1.3) node{\tiny $+$};
                    \draw[->](2.2, 0.1) -- (2.2, 2.0);
                    \draw(4.0, 1) node{\large $-\vec{x} - \vec{G}$};
                    \draw[->](2.2, -0.1) -- (2.2, -2.0);
                    \draw(2.8, -1) node{\large $\vec{G}$};
               \end{tikzpicture}
          \end{center}
     Exercise for the reader:  make sense of this diagram \ldots
\pagedone
     Another example is a pendulum:
          \begin{center}
               \begin{tikzpicture}[line width=2.5pt]
                    \node[circle,fill=blue,inner sep=2.5mm] (a) at (-2,0) {};
                   % \node[circle,fill=blue,inner sep=2.5mm] (b) at (2,2) {};
                    \draw (0,6) -- (a); 
                   % \draw[decoration={aspect=0.3, segment length=1.5mm, amplitude=3mm,coil},decorate] (2,5) -- (b); 
                    \fill [pattern = north east lines] (-1,6) rectangle (1,6.2);
                    \draw[thick] (-1,6) -- (1,6);
                    \draw[color=blue] (0, 6) -- (0, -0.5);
                    \draw[color=blue](-0.5, 3) node{\large $\theta$};
                    \draw[->] (0, 3.9) arc (270:250:2);
                    \draw[->](a) -- (-1.1, -0.2);
                    \draw(-1.2,0.5) node{$\vec{T}$};
                    \draw[->](a) -- (-2, -2.0);
                    \draw(-2.6, -1.2) node{\large $\vec{G}$};
               \end{tikzpicture}
          \end{center}
     We measure the angle $\theta$ from the vertical.  We have a
     tangential component of the gravitational force
          $$| \vec{T} | = -\sin(\theta) \approx - \theta$$
     (with the linear approximation, and etc. \ldots).
\pagedone
     It's not hard to see that each of these is described (in the linear approximation) by the same system,
     $x$ and velocity $v$:
           \begin{align*}
                \dot{x} & =  v  \\
                \dot{v} & =  - x 
           \end{align*}
           
       or, in the case of the pendulum, $\theta$ and $\dot{\theta}$:
             \begin{align*}
                \dot{\theta} & =  v   \\
                \dot{v} & =  - \theta. 
           \end{align*}
\pagedone
\subsectionhead{A Linear Approximation}
     \begin{itemize}
          \item
          We can even use this to find (at least an approximation to) a trajectory, given an initial point (initial
          condition) in phase space.  The basic idea comes from the definition of the derivative:
          $$ \frac{df(t)}{dt} = \lim_{\Delta t \to 0} \frac{f(t + \Delta t) - f(t)}{\Delta t} $$
          which means that, for small $\Delta t$, we have the approximation
          $$ \frac{df(t)}{dt} \approx \frac{f(t + \Delta t) - f(t)}{\Delta t} $$
          or,
          $$ \frac{df(t)}{dt} * \Delta t \approx f(t + \Delta t) - f(t) $$
          and thus the approximation
          $$ f(t + \Delta t) \approx f(t) + \frac{df(t)}{dt} * \Delta t .$$
          
\pagedone

          In the case of our simple harmonic oscillator, we have the approximation
          \begin{align*}
               \begin{bmatrix} x(t + \Delta t) \\ v(t + \Delta t) \end{bmatrix} & = \begin{bmatrix} x(t) \\ y(t)  \end{bmatrix}
                          + \begin{bmatrix} \dot{x}(t) * \Delta t \\ \dot{v}(t) * \Delta t  \end{bmatrix}  \\
                          & = \begin{bmatrix} x(t) \\ y(t)  \end{bmatrix}
                          + \begin{bmatrix} v(t) * \Delta t \\ -x(t) * \Delta t  \end{bmatrix}.
           \end{align*}
           
           Working with our particular system, let's do a couple of steps, starting at $t = 0$, and with $\Delta t = 0.1$.
           We will have $\begin{bmatrix} x(0) \\ y(0)  \end{bmatrix} = \begin{bmatrix} 1 \\ 0  \end{bmatrix}$, and
           $\begin{bmatrix} \dot{x}(0) \\ \dot{v}(0) \end{bmatrix} = \begin{bmatrix} 0 \\ -1 \end{bmatrix} $.
           Our first step of approximation will give us
           \begin{align*}
               \begin{bmatrix} x(0.1) \\ v(0.1) \end{bmatrix} & \approx \begin{bmatrix} 1 \\ 0  \end{bmatrix}
                          + \begin{bmatrix} 0 * 0.1 \\ -1 * 0.1 \end{bmatrix}  \\
                          & = \begin{bmatrix} 1 \\  -0.1  \end{bmatrix}.
           \end{align*}
           
\pagedone

          The next three steps of our approximation will be:
          \begin{align*}
               \begin{bmatrix} x(0.2) \\ v(0.2) \end{bmatrix} & \approx \begin{bmatrix} 1 \\ -0.1  \end{bmatrix}
                          + \begin{bmatrix} -0.1 * 0.1 \\ -1 * 0.1 \end{bmatrix}  \\
                          & = \begin{bmatrix} 0.99 \\  -0.2  \end{bmatrix}.
           \end{align*}
           and
           \begin{align*}
               \begin{bmatrix} x(0.3) \\ v(0.3) \end{bmatrix} & \approx \begin{bmatrix} 0.99 \\ -0.2  \end{bmatrix}
                          + \begin{bmatrix} -0.2 * 0.1 \\ -0.99 * 0.1 \end{bmatrix}  \\
                          & = \begin{bmatrix} 0.97 \\  -0.299  \end{bmatrix}
           \end{align*}
           and
           \begin{align*}
               \begin{bmatrix} x(0.4) \\ v(0.4) \end{bmatrix} & \approx \begin{bmatrix} 0.97 \\ -0.299 \end{bmatrix}
                          + \begin{bmatrix} -0.299 * 0.1 \\ -0.97 * 0.1 \end{bmatrix}  \\
                          & = \begin{bmatrix} 0.9401 \\  -0.396  \end{bmatrix}
           \end{align*}
           This will look like (I have gone ahead and added several more steps):
            \begin{center}
                \vspace{-1.0cm}
                \begin{tikzpicture}[line width=1.75pt]
                     \draw[color=blue, ->] (-6,0) -- (6,0);
                     \draw[color=blue](6.4,0) node{$x$};
                     \draw[color=red, ->](0,-5) -- (0,5);
                     \draw[color=red](0,5.4) node{$v$};
                     \draw[color=purple] (0,0) circle (3cm);
                     \pgfmathsetmacro{\x} {1}
                     \pgfmathsetmacro{\v} {0}
                     \pgfmathsetmacro{\u} {\x + 0.1 * \v }
                     \pgfmathsetmacro{\w} {\v + 0.1 * (-1) * \x }
                      \foreach \i in {0,1,...,100} {
                              %\draw[color=purple,->](3 * \x, 3 * \v) -- (3 * \u, 3 * \w);
                              \draw[color=green,->](3 * \x, 3 * \v) -- (3 * \u, 3 * \w);
                              \pgfmathparse{\u}
                              \xdef\x{\pgfmathresult}
                              \pgfmathparse{\w}
                              \xdef\v{\pgfmathresult}
                              \pgfmathparse{\x + 0.1 * \v }
                              \xdef\u{\pgfmathresult}
                              \pgfmathparse{\v + 0.1 * (-1) * \x }
                              \xdef\w{\pgfmathresult}
                        }
                \end{tikzpicture}
           \end{center}
           The approximation starts out doing a reasonable job (but over time it does drift away from
           the real trajectory \ldots).
%           \begin{center}
%                \begin{tikzpicture}[line width=1.75pt, color=purple]
%                     \draw[color=blue, ->] (-5,0) -- (5,0);
%                     \draw[color=blue](5.4,0) node{$x$};
%                     \draw[color=red, ->](0,-4) -- (0,4);
%                     \draw[color=red](0,4.6) node{$v$};
%                     \draw [->] (3,0) -- (3, -0.3);
%                     \draw [->] (3, -0.3) -- (2.97, -0.6);
%                     \draw [->] (2.97, -0.6) -- (2.91, -0.897);
%                      \draw [->] (2.91, -0.897) -- (2.8203, -1.188);
%                      \draw [->] (2.8203, -1.188) -- (2.7015, -1.47003);
%                      \draw [->] (2.7015, -1.47003) -- (2.554497, -1.74018);
%                      \draw [->] (2.554497, -1.74018) -- (2.380479, -1.9956297);
%                      \draw [->] (2.380479, -1.9956297) -- (2.18091603, -2.2336776);
%                      \draw [->] (2.18091603, -2.2336776) -- (1.95754827, -2.451769203);
%                      \draw [->] (1.95754827, -2.451769203) -- (1.7123713497, -2.64752403);
%                      \draw [->] (1.7123713497, -2.64752403) -- (1.4476189467, -2.81876116497);
%                      \draw [->] (1.4476189467, -2.81876116497) -- (1.165742830203, -2.96352305964);
%                      \draw [->] (1.165742830203, -2.96352305964) -- (0.869390524239, -3.0800973426603);
%                      \draw [->] (0.869390524239, -3.0800973426603) -- (0.56138078997297, -3.1670363950842);
%                      \draw [->] (0.56138078997297, -3.1670363950842) -- (0.24467715046455, -3.2231744740815);
%                      \draw [->] (0.24467715046455,-3.2231744740815) -- (-0.0776402969436001, -3.24764218912795);
%                      \draw [->] (-0.0776402969436001,-3.24764218912795) -- (-0.402404515856395, -3.23987815943359);
%                      \draw [->] (-0.402404515856395,-3.23987815943359) -- (-0.726392331799754, -3.19963770784795);
%                      \draw [->] (-0.726392331799754,-3.19963770784795) -- (-1.04635610258455, -3.12699847466798);
%                      \draw (0,0) circle (3cm);
%                \end{tikzpicture}
%           \end{center}
           
\pagedone

     \item  We'll keep in mind this approximation approach, and come back to it later.  In particular, we'll need
          to think some about what cautions we should keep in mind when using approximations.  But, let's
          briefly return now to the thrilling days of yesteryear, and do a little bit more with linear systems.
          
          Our linear approximation of the string system clearly leaves out a bunch of stuff.  In particular, we know
          perfectly well that a vibrating string won't go on vibrating forever.  Things like friction (both internal within
          the string itself, and external, like air resistance) will play a role in the dynamics.  We can improve our
          system by adding a friction term.  In keeping with our simplification of linearity, a reasonable approximation
          of the friction term is that it depends linearly on velocity.  Keeping terms and constants simple, we can
          learn a reasonable amount by studying this system (the second term in the $\dot{v}$ line is friction):
            \begin{align*}
                \begin{bmatrix} \dot{x} \\ \dot{v}  \end{bmatrix}
                          &  =  \begin{bmatrix} v \\ -x - bv  \end{bmatrix}.
           \end{align*}
           Using the ``characteristic polynomial'' approach, we can look at
           $ \ddot{x} = -x - b\dot{x}$
           or
           $ \ddot{x} + b\dot{x} + x = 0$,
           and thus work with
           $$r^2 + br + 1 = 0$$
           giving us
           $$r = \frac{-b \pm \sqrt{b^2 - 4}}{2}$$
           or, assuming $| b | < 2$,
           $$r = -\frac{b}{2} \pm i \frac{\sqrt{4 - b^2}}{2}$$.
\pagedone
          From this, we get a solution to the system in the form
          \begin{align*}
               x(t) &= e^{(-\frac{b}{2} + i \frac{\sqrt{4-b^2}}{2})t} + e^{(-\frac{b}{2} - i \frac{\sqrt{4-b^2}}{2})t}\\
                     &= e^{-\frac{b}{2}t}\left( e^{i \frac{\sqrt{4-b^2}}{2}t} + e^{-i \frac{\sqrt{4-b^2}}{2}t}\right) \\
                     &= e^{-\frac{b}{2}t}*2\cos{\left(\frac{\sqrt{4-b^2}}{2}t\right)}
          \end{align*}
          which is decaying oscillations:
          
          \vspace{0.5cm}
          \centerline{\includegraphics[width = 4.2in]{exp-decay-cos}}

 \pagedone
           In phase space, this system spirals in toward $(0, 0)$ (see appendix 1):
           \begin{center}
	            \begin{tikzpicture}[x=1cm, y=1cm,line width=1.75pt]]
	
	            \pgfmathsetmacro{\offset}{0};
	
	            \draw[color=blue, ->] (-5,0) -- (5,0);
	            \draw[color=blue](5.4,0) node{$x$};
	            \draw[color=red, ->](0,-4) -- (0,4);
	            \draw[color=red](0,4.6) node{$v$};
	            \pgfmathsetmacro{\b}{0.1}
	            \draw[color=purple,domain=0:20*pi,
	                  smooth,samples=600,variable=\t] plot
	                  ({(2)*exp((-\b/2)*\t)*2*cos(sqrt(4-\b*\b)/2*\t r)},
	                  {(-2)*exp((-\b/2)*\t)*(\b*cos(sqrt(4-\b*\b)/2*\t r)+sqrt(4-\b*\b)*sin(sqrt(4-\b*\b)/2*\t r))}) 
	                  coordinate(end);
	
	           \end{tikzpicture}
           \end{center}
      \end{itemize}
 \pagedone
 \subsectionhead{Trajectories}
      \begin{itemize}
      \item We can characterize various points in phase space, and various trajectories.
           In the case of the simple harmonic oscillator, for any starting point (initial condition), the
           resulting trajectory is a simple closed trajectory -- a {\em periodic orbit}. 
            \begin{center}
                 \vspace{-0.5cm}
                \begin{tikzpicture}[line width=1.75pt, color=purple]
                     \draw[color=blue, ->] (-5,0) -- (5,0);
                     \draw[color=blue](5.4,0) node{$x$};
                     \draw[color=red, ->](0,-4) -- (0,4);
                     \draw[color=red](0,4.6) node{$v$};
                     \draw (0,0) circle (0.5cm);
                     \draw (0,0) circle (1cm);
                     \draw (0,0) circle (1.5cm);
                     \draw (0,0) circle (2cm);
                     \draw (0,0) circle (2.5cm);
                     \draw (0,0) circle (3cm);
                \end{tikzpicture}
           \end{center}
             In the special case
           of starting at $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$, the system is at a {\em fixed point}.
           This fixed point is, however, not {\em stable}, in the sense that if some noise jostles the system,
           it will follow a periodic orbit somewhat away from $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$.
           
           On the other hand, in the case of of the damped harmonic oscillator, any initial condition will
           tend toward $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$ as $t \to \infty$.  $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$
           is a fixed point, and is an {\em attracting stable} fixed point, in the sense that if noise jostles
           the system, it will, as $t \to \infty$, return to $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$.
 \pagedone          
           For any of these continuous systems (i.e., systems where $t$ is a continuous variable), we can get
           at new system by replacing $t$ with $-t$.  In the case of the simple harmonic oscillator, there is
           complete symmetry, and the new system is indistinguishable from the original -- in particular,
           all trajectories are closed periodic orbits.
           
           In the case of the damped harmonic oscillator, there is a fixed point at $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$,
           but all other trajectories spiral out (in phase space) away from $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$.
           In this case, $\begin{bmatrix} 0 \\ 0  \end{bmatrix}$ is an {\em unstable, repelling} fixed point.

\end{itemize}
        
\pagedone

