\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage{slide-article}
\usepackage{slide-article-tom}
\ifx\pdfoutput\undefined
     \usepackage[dvips]{graphicx}
\else
     \usepackage[pdftex]{graphicx}
%%     \usepackage{type1cm}
%%     \usepackage{color}
     \pdfcompresslevel9
\fi
%  \usepackage{epsfig}
%\usepackage{graphics}
\usepackage{hyperref}

%\definecolor{Emerald}{cmyk}{1,0,0.50,0}
\hypersetup{colorlinks,
            linkcolor=blue,
            %pdfpagemode=FullScreen
            pdfpagemode=None
            }


%\usepackage{hyper}
%\usepackage{hthtml}
%\def\hyperref#1#2#3#4{\hturl{#1}}

\def\pagedone{\newpage}

\def\tthdump#1{#1}

\tthdump{\def\sectionhead#1{\begin{center}{\LARGE\hypertarget{#1}
     {#1}\hyperlink{Our general topics:}{\hfil$\leftarrow$}}\end{center}}}
     
%%tth:\def\sectionhead#1{{\LARGE#1\hypertarget{#1}{#1}}
%%tth:     \special{html: <A NAME="#1"></A><a href="\#Top of file">       Top</a>}}

\tthdump{\def\quotesection#1{\begin{center}{\LARGE\hypertarget{#1}
     {#1}\hyperlink{The quotes}{\hfil$\twoheadleftarrow$}}\end{center}}}
     
%%tth:\def\quotesection#1{{\LARGE#1\hypertarget{#1}{#1}}
%%tth:     \special{html: <A NAME="#1"></A><a href="\#The quotes">       <-</a>}}

%%tth:\def\makehyperlink#1{\special{html: <a href="\##1">}{\large#1}\special{html: </a>}}

%%tth:\def\binom#1#2{\left(\begin{array}{c}#1\\#2\end{array}\right)}

%\def\sectionhead#1{\begin{center}{\LARGE #1}\end{center}}
%\def\sectionhead#1{\section{#1}}

% defines a 2 element column vector.
\def\col#1#2{\left(\begin{array}{c}#1\\#2\end{array}\right)}
\def\tcol#1#2{(#1, #2)^T}

% defines the expectation operator.
\def\expect#1{\langle #1 \rangle}

%%%\def\bigep{{\Large{$\varepsilon$}}}

\begin{document}
\raggedright
%%tth:\special{html: <A NAME="Top of file"></A>}

\pagestyle{myfooters}
%\pagestyle{plain}

\thispagestyle{empty}


%%tth:\special{html:<title> Peripatetic</title>}

%Slide 1
\title{{\LARGE\bf The Logistic Flow}\newline (Continuous)\newline \newline}
\author{Tom Carter
\newline
\newline
\newline
\tthdump{\href{http://astarte.csustan.edu/\~tom/SFI-CSSS}{http://astarte.csustan.edu/\~\ tom/SFI-CSSS}}
%%tth:\href{http://astarte.csustan.edu/~tom/SFI-CSSS}{http://astarte.csustan.edu/\~tom/SFI-CSSS}
\vfill
Complex Systems Summer School
\newline
}
\date{June, 2008}
\maketitle

%Slide 2
%\sectionhead{Our general topics:}
%%%tth:\begin{itemize}
%%%tth:\item
%\tthdump{\hyperlink{Some random (variable) background}
%               {\ $\circledcirc$ Some random (variable) background\newline}}
%%%tth:\makehyperlink{Some random (variable) background}
%%%tth:\item
%\tthdump{\hyperlink{What is a random walk?}
%               {$\circledcirc$ What is a random walk?\newline}}
%%%tth:\makehyperlink{What is a random walk?}
%%%tth:\item
%\tthdump{\hyperlink{Some Intuitive Derivations}
%               {$\circledcirc$ Some Intuitive Derivations\newline}}
%%%tth:\makehyperlink{Some Intuitive Derivations}

%%%tth:\end{itemize}

%\pagedone



\sectionhead{Logistic flow \ldots}

    We all know that the discrete logistic map 
          \begin{eqnarray*}
            P_{n+1} & = & r * P_n * (1 - P_n) 
         \end{eqnarray*}
       exhibits interesting behavior of various sorts for various values of the parameter $r$, including chaos, etc.
    
    What kind of behavior can we expect for the continuous version of a logistic flow:
     \begin{eqnarray*}
          \frac{dP}{dt} & = & r * P * (1 - P)  \ \ \   ?
     \end{eqnarray*}
    
    
     Note that this is a non-linear ODE, but fortunately, we can actually integrate \ldots

            \begin{eqnarray*}
               \frac{dP}{dt} & = & r * P * (1 - P) \\
               \\
               \frac{dP}{P * (1 - P)} & = & r * dt \\
            \end{eqnarray*}
            
            
   \pagedone
            
            Thus: 
            \begin{eqnarray*}
               \int \frac{dP}{P * (1 - P)} & = & \int r * dt \\
               \\
               \int \frac{dP}{P * (1 - P)} & = & r * t + c_1 \\
            \end{eqnarray*}
            
        By partial fractions, we have:
        
             \begin{eqnarray*}
               \int \frac{dP}{P} + \int \frac{dP}{(1 - P)} & = & r * t + c_1 \\
               \\
               \log (P) - \log (1 - P) & = & r * t + c_1 \\
               \\
               \log ( \frac{P}{1 - P}) & = & r * t + c_1 \\
               \\
               \frac{P}{1 - P} & = & e^{r * t + c_1} \\
               \\
               \frac{P}{1 - P} & = & c_2 * e^{r * t} \\
               \\
               P & = & ( 1 - P ) * c_2 * e^{r * t} \\
            \end{eqnarray*}

\pagedone

     And thus: 
             \begin{eqnarray*}
               P & = & ( 1 - P ) * c_2 * e^{r * t} \\
               \\
               P & = & c_2 * e^{r * t} - P * c_2 * e^{r * t} \\
               \\
               P + P * c_2 * e^{r * t} & = & c_2 * e^{r * t} \\
               \\
               P * ( 1 +  c_2 * e^{r * t}) & = & c_2 * e^{r * t} \\
            \end{eqnarray*}
    giving us:
       \begin{eqnarray*}
               P & = & \frac { c_2 * e^{r * t}} { 1 +  c_2 * e^{r * t} } \\
            \end{eqnarray*}
    and, dividing top and bottom by $c_2 * e^{r * t}$, and simplifying, we have:
         \begin{eqnarray*}
               P & = & \frac {1} { 1 +  c * e^{-r * t} } \\
            \end{eqnarray*}
            
\pagedone

     This function just gives us the classic logistic/sigmoid curve:
     \vspace{1cm}
     \
      \centerline{\includegraphics[width = 5in]{Logistic-curve}}
      
      and changes in $c$ and $r$ make minor changes in the behavior near $0$ \ldots
      
      The difference between the behavior of the discrete and continuous logistic functions
      can give us some idea of the significance of working in the discrete regime . . .
      
      \tthdump{\hyperlink{TheTop}{\hfill To top $\leftarrow$}}
%%tth:{\special{html: <a href="\#Top of file">       Back to top of file</a>}}

\end{document}
%%         \item Oh, all right.  Since we're here, let's use Stirling's approximation
%%             $$n! \approx   \sqrt{2\pi}\ n^ne^{-n}\sqrt{n}.$$
%%             to calculate:
%%             
%%             $$P(S_n = k) = \frac{n!}{(\frac{n + k}{2})!
%%                                    \ (\frac{n - k}{2})!\ 2^n} $$
%%                                    
%%             \begin{eqnarray*} & \approx & \frac{\sqrt{2\pi}\ n^ne^{-n}\sqrt{n}}
%%                                  {\sqrt{2\pi}\ (\frac{n + k}{2})^{\frac{n + k}{2}}
%%                                       e^{-\frac{n + k}{2}}\sqrt{\frac{n + k}{2}}
%%                                    \ \sqrt{2\pi}\ (\frac{n - k}{2})^{\frac{n - k}{2}}
%%                                    e^{-\frac{n - k}{2}}\sqrt{\frac{n - k}{2}}\ 2^n} \\
%%                               \\
%%                               & = & \frac{n^n\sqrt{n}}
%%                                  {\sqrt{2\pi}\ (\frac{n + k}{2})^{\frac{n + k}{2}}
%%                                       \sqrt{\frac{n + k}{2}}
%%                                    \ \ (\frac{n - k}{2})^{\frac{n - k}{2}}
%%                                    \sqrt{\frac{n - k}{2}}\ 2^n} \\
%%                               \\
%%                               & = & \frac{n^n\sqrt{n}}
%%                                  {\sqrt{2\pi}\ (n + k)^{\frac{n + k}{2}}
%%                                       \sqrt{\frac{n + k}{2}}
%%                                    \ \ (n - k)^{\frac{n - k}{2}}
%%                                    \sqrt{\frac{n - k}{2}}} \\
%%                               \\
%%                               & = & \frac{n^n\sqrt{\frac{4n}{(n+k)(n-k)}}}
%%                                  {\sqrt{2\pi}\ (n + k)^{\frac{n + k}{2}}
%%                                    \ (n - k)^{\frac{n - k}{2}}}
%%             \end{eqnarray*}
%%             
%% \pagedone
%% 
%%             \begin{eqnarray*}
%%                               & = & \frac{e^{n \ln(n)}\sqrt{\frac{4n}{(n + k)(n - k)}}}
%%                                  {\sqrt{2\pi}\ e^{\frac{n + k}{2}\ln(n + k)}
%%                                    \ e^{\frac{n - k}{2}\ln(n - k)}} \\
%%                               \\    
%%                               & = & \frac{1}{\sqrt{2\pi}}e^{n \ln(n)-\frac{n + k}{2}\ln(n + k)
%%                                     - \frac{n - k}{2}\ln(n - k)} \\
%%                               &   & * \sqrt{\frac{4n}{(n + k)(n - k)}}                                
%%             \end{eqnarray*}
%%             so
%%             
%%             $\ln(P(s_n = k)) $
%%             \begin{eqnarray*}
%%                               & \approx & \ln(\frac{1}{\sqrt{2\pi}}) 
%%                                      + n \ln(n)-\frac{n + k}{2}\ln(n + k)\\
%%                               &   & - \frac{n - k}{2}\ln(n - k)
%%                                     + \frac{1}{2}\ln\left(\frac{4n}{(n + k) (n - k)}\right) \\
%%                               \\
%%                               & = & \ln(\frac{1}{\sqrt{2\pi}}) 
%%                                      + n \ln(n)-\frac{n + k}{2}\ln(n + k)\\
%%                               &   & - \frac{n - k}{2}\ln(n - k)
%%                                     + \frac{1}{2}(\ln(4)) + \frac{1}{2}\ln(n)\\
%%                               &   & - \frac{1}{2}\ln((n + k)(n - k))                               
%%             \end{eqnarray*}
%%             
%% \pagedone
%%             \begin{eqnarray*}
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                      + \frac{2n + 1}{2} \ln(n)-\frac{n + k + 1}{2}\ln(n + k)\\
%%                               &   & - \frac{n - k + 1}{2}\ln(n - k) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                      + \frac{2n + 1}{2}(\ln(n)
%%                                      - \frac{n+k+1}{2n + 1}\ln(n + k) \\
%%                               &   &  - \frac{n-k+1}{2n + 1}\ln(n - k)) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                      + \frac{1}{\frac{2}{2n + 1}}(\ln(n)
%%                                      - \frac{n+k+1}{2n + 1}\ln(n + k) \\
%%                               &   &  - \frac{n-k+1}{2n + 1}\ln(n - k)) \\                           
%%             \end{eqnarray*}
%%             
%%             so $ \lim_{n \to \infty} \ln(P(S_n = k)) $
%%             \begin{eqnarray*}
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     - \lim_{n \to \infty}\frac{1}{\frac{4}{(2n+1)^2}}
%%                                          (\frac{1}{n} \\
%%                               &   &  + \frac{2k + 1}{(2n + 1)^2}\ln(n+k)
%%                                      - \frac{n + k + 1}{(2n + 1)(n + k)} \\
%%                               &   &  - \frac{2k - 1}{(2n + 1)^2}\ln(n-k)
%%                                      - \frac{n - k + 1}{(2n + 1)(n - k)})
%%             \end{eqnarray*}
%%             
%% \pagedone
%% 
%%             \begin{eqnarray*}
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{1}{4}
%%                                          (\frac{(2n+1)^2}{n} \\
%%                               &   &  + (2k + 1)\ln(n+k)
%%                                      - \frac{(n + k + 1)(2n + 1)}{(n + k)} \\
%%                               &   &  - (2k - 1)\ln(n-k)
%%                                      - \frac{(n - k + 1)(2n + 1)}{(n - k)}) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{1}{4}
%%                                          (\frac{(2n+1)^2}{n} \\
%%                               &   &  - \frac{(n - k + 1)(2n + 1)}{(n - k)}
%%                                      - \frac{(n + k + 1)(2n + 1)}{(n + k)} \\
%%                               &   &  + (2k + 1)\ln(n+k) - (2k - 1)\ln(n-k)) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{2n+1}{4}
%%                                          (\frac{(2n+1)}{n} \\
%%                               &   &  - \frac{n - k + 1}{(n - k)}
%%                                      - \frac{n + k + 1}{(n + k)}) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{2n+1}{4}
%%                                       (\frac{(2n+1)(n-k)(n+k)}{n(n-k)(n+k)} \\
%%                               &   & - \frac{n(n-k+1)(n+k) + n(n-k)(n+k+1)}{n(n-k)(n+k)})
%%             \end{eqnarray*}
%%             
%% \pagedone
%% 
%%             \begin{eqnarray*}
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{2n+1}{4}
%%                                       (\frac{(2n+1)(n^2 - k^2)}{n^3 - nk^2} \\
%%                               &   & - \frac{(n-k+1)(n^2+nk) + (n^2-nk)(n+k+1)}{n^3 - nk^2}) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{2n+1}{4} \\
%%                               &   &   (\frac{2n^3 - 2nk^2 + n^2 - k^2}{n^3 - nk^2} \\
%%                               &   & - \frac{n^3 +n^2k - kn^2 -nk^2 +n^2 +nk}{n^3 - nk^2} \\
%%                               &   & - \frac{n^3 +n^2k + n^2 -n^2k -nk^2 -nk}{n^3 - nk^2}) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}})
%%                                     + \lim_{n \to \infty}\frac{2n+1}{4}
%%                                     (\frac{- n^2 - k^2 -2nk}{n^3 - nk^2}) \\
%%                               \\
%%                               & = & \ln(\frac{2}{\sqrt{2\pi}}) - \frac{1}{2}
%%             \end{eqnarray*}
%%             
%%         