\documentclass{amsart}
\title{Systems of Differential Equations}

\begin{document}
\maketitle

\section{A Case Study:  Competing Species}

Let $x(t)$ and $y(t)$ be two species that compete for the same resources.
Consider the following model of the rate of change of the populations:
$$
\begin{array}{rl}
\dot{x}&=2x\left(1-\frac{1}{2}x \right)-xy\\
\dot{y}&=3y\left(1-\frac{1}{3}y \right)-2xy
\end{array}
$$

Before going any further, we want to make some observations:
\begin{itemize}
\item This is a system of first order equations.  They are {\it
coupled} in the sense that $\dot{x}$ depends on $y$, and $\dot{y}$
depends on $x$.
\item This is a nonlinear system of equations.
\item The derivatives do not depend explicitly on time.  Therefore
this is a system of autonomous differential equations.
\item Because the system is autonomous, the behavior of solutions is
organized about the equilibria (remember that we discussed this in
the case that $y'=f(y)$) . In this case, to find the equilibria,
we must set $\dot{x}=0$ and $\dot{y}=0$ simultaneously and solve
for values of $x, y$.  We will see how to do this in Maple.
\item The {\it phase plot} will be a plot of $y$ versus $x$.  We
will see how to plot this in Maple.
\item There are two other plots to consider- $x$ versus $t$, and
$y$ versus $t$.  We will see how to plot these in Maple.
\end{itemize}

We note that, if $y=0$, then $\dot{x}=2x(1-\frac{1}{2}x)$, which
we studied in the last lab, and if $x=0$, then
$\dot{y}=3y(1-\frac{1}{3}y)$, which is again what we studied 
in the last lab.

We can interpret this to mean that, if one species dies out,
the other species' population will tend to an equilibrium.

The larger question is:  What happens to the populations when they 
start to compete?  Our model assumes that the rate at which the
populations change begins to decline when there is an interaction 
(the $xy$ term measures the effects of species interactions).

\section{Analysis in Maple}
\begin{enumerate}
\item  Draw the phase plot, $y$ versus $x$ with direction arrows.
Notice that this is similar to a direction field in that, for each
number $y$ and each number $x$, we can compute $\dot{x}$ (the
horizontal rate of change) and $\dot{y}$ (the vertical rate of
change).  In Maple, first define the differential equations, then use
\verb+DEplot+.
\begin{verbatim}
with(DEtools):
de1:=diff(x(t),t)=2*x(t)*(1-0.5*x(t))-x(t)*y(t);
de2:=diff(y(t),t)=3*y(t)*(1-(1/3)*y(t))-2*x(t)*y(t);

#The following should all be on one line:
DEplot([de1,de2],[x(t),y(t)],t=-1..6,x=0..4,y=0..4,
[[x(0)=0.3,y(0)=1],[x(0)=2,y(0)=1],[x(0)=2,y(0)=3]],stepsize=0.05,
linecolor=black);
\end{verbatim}
This last command plots three sample solutions.
How should we understand this picture?  (We'll discuss in class)
\item Draw a plot of $x$ versus $t$ and $y$ versus $t$ using a 
couple of different initial conditions.
Color $x$ blue and $y$ red, and put them on
one graph:
\begin{verbatim}
A:=DEplot([de1,de2],[x(t),y(t)],t=0..15,x=0..4,y=0..4,
[[x(0)=2,y(0)=2.5]],stepsize=0.05,scene=[t,x],linecolor=blue):

B:=DEplot([de1,de2],[x(t),y(t)],t=0..15,x=0..4,y=0..4,
[[x(0)=2,y(0)=2.5]],stepsize=0.05,scene=[t,y], linecolor=red):

with(plots):
display({A,B},title="Competing Species");
\end{verbatim}
Now do the same thing (copy and paste) to plot $x(t)$ and $y(t)$
for the initial conditions:  $x(0)=2$, $y(0)=2.8$.  What happens?

\item Find the equilibrium solutions:
\begin{verbatim}
eqns:={2*x*(1-(1/2)*x)-x*y=0,3*y*(1-(1/3)*y)-x*y=0};
solve(eqns,{x,y});
\end{verbatim}

We can now discuss the predictions of our model:  Our model
predicts that, given almost any set of initial conditions,
one of the populations will die off, and the other will go 
to an equilibrium.  There are a few exceptions:  If the
populations are $1,1$ respectively, then they stay in equilibrium.
However, these are unstable in the sense that if the population
strays from these values, one will die off.

\end{enumerate}
\section{Lab 3:  A Model of Predator-Prey Interaction}

The model we will consider is:
$$
\begin{array}{rl}
\dot{x}=&x(1-\frac{K}{10}x)-xy\\
\dot{y}=&-y+xy
\end{array}
$$
We want to explore the solutions to this system of differential
equations, and how the solutions depend on the value of $K$.

\subsection{Introductory Questions}
\begin{enumerate}
\item Consider $\dot{x}$ if $y(t)=0$.  What does the population do?
\item Consider $\dot{y}$ if $x(t)=0$.  What does the population do?
\item In light of the previous questions, which of $x(t)$, $y(t)$ denotes
predator population, and which is prey?
\end{enumerate}

Comment:  The $xy$ term denotes how the population changes in the
face of predator-prey interactions.  Note how one population grows,
the other declines.

\subsection{The Case Where $K=0$}
\begin{enumerate}
\item  Find the equilibria.
\item  Plot the phase plane, and include two initial conditions.
\item  Plot $x$ versus $t$ and $y$ versus $t$ on the same graph
using one of the initial conditions from the phase plane.  Are 
the solutions slightly ``out of phase''?  Does that make sense?
\end{enumerate}


\subsection{The General Case}
\begin{enumerate}
\item  Find the equilibria (they'll depend on $K$).
\item  Discuss the bifurcation that occurs when $K$ becomes (slightly)
positive.  Explain what happens now to the populations- you might want 
to use graphs to assist the explanation.
\item As $K$ continues to increase, a second bifurcation occurs.  Try to
estimate as accurately as you can, the value of $K$, and describe what
happens to the populations before and after this bifurcation.  Does
disaster befall one of them? (That was a hint!)
\item The predator-prey model is very similar to the competing species
model (in the form of the ODEs).  How could you change a ``predator-prey''
system into a ``competing species'' system?
\end{enumerate}
\end{document}
