We'll be looking at a predator/prey system (Lynx/Hare): the especially interesting thing about these models is that we expect oscillations -- rather than settling down to a "steady state" equilibrium (that is, the populations equilibrate to some nice constant value, and everyone lives in peace), we find that there tend to be cycles in the populations -- boom and bust.
This makes sense, because when the hare become numerous, the lynx find life really good, and prosper. Then, when the lynx prosper too much, they prey on too many hare, and the hare population drops precipitously.
And so it goes....
Now let's get started....
(Note: when I changed the names, one instance of "Fox" did not get automatically changed, and InsightMaker threw a fit. If the same thing happens to you, just change the indicated "Fox" to "Lynx", and you'll be able to get by it.)
\[ \frac{dx}{dt}= \alpha x - \beta x y\\ \frac{dy}{dt}= \delta x y - \gamma y \] Actually, in this case of the Lotka-Volterra system, we'll see that we need to tweek the system a little to make the prey appear to behave logistically: we could write \[ \frac{dx}{dt}= \alpha x \left(1 - \frac{x}{\frac{\alpha x}{\beta y}} \right)\\ \frac{dy}{dt}= \delta y \left(x - \frac{\gamma}{\delta}\right) \] So that we can consider $K=\frac{\alpha x}{\beta y}$ as an "effective carrying capacity" -- and so long as this scaled ratio of prey to predator stays relatively constant, the prey would behave logistically. But since it's a moving target, so to speak, you might imagine that oscillations are possible.
One of the most important things to do when considering a system of differential equations is to find equilibria -- that is, variable values such that the system is "at rest" (no change in population values.
We find equilibria for a system by setting all of the rates of change equations to 0: so set $\frac{dx}{dt}$ and $\frac{dy}{dt}$ to zero, and solve for $x$ and $y$ such that these are both satisfied.
If you look at the equation $\frac{dy}{dt} = 0$, you see that there are two possibilities: $y=0$ or $x=\frac{\gamma}{\delta}$. So for an interesting equilibrium we must also have $x=\frac{\gamma}{\delta}$.
Setting $\frac{dx}{dt} = 0$, you see that there are two possibilities: $x=0$ or $y=\frac{\alpha}{\beta}$. So for an interesting equilibrium we must also have $y=\frac{\alpha}{\beta}$.
So the interesting equilibrium is $\left(\frac{\gamma}{\delta},\frac{\alpha}{\beta}\right)$; the other equilbrium (extinction) is (0,0) -- that's sort of interesting, but really unpleasant!
In this lab, you will interact with your InsightMaker model. Start with the following parameters:
initial hare population | $x_0=100$ |
initial lynx population | $y_0=15$ |
carrying capacity | $K=90$ |
Hare birth rate | $\alpha=1$ |
Hare predation coefficient | $\beta=0.035$ |
Lynx L per H conversion rate | $\delta=0.01$ |
Lynx loss rate | $\gamma=1$ |
For "Settings", make sure that you're running in Months, 0 to 20, with RK4, and with Simulation Time Step of 0.05.
Describe what's happening with the population -- how do the populations vary? Which one is leading, and which is following? Tell the story.
Use the slider along the bottom, and set it for 5 months (you can see the number of months from the "Predator and Prey vs. Time" display). Take a picture, and submit with your Word document.
Is the rotation clockwise or counter-clockwise? Move the slider to find out.
This is a limit cycle, a different way of perceiving the oscillations in the two populations. Notice that the cycle repeats over and over.... Does it agree with your story? Does it enhance it, or tell it better?
One interesting question is this: when is an equilibrium stable?
What this means is that, if we push the system slightly from its equilibrium, it returns to the equilibrium.
When you're done, your model should look something like this (only I've still got Foxes where I should have Lynx!:).
Capture your model (e.g. screen capture) and include it in your report.
What's going on?
The teachable moment:
Unlike the logistic equation, the populations don't tend toward the equilibrium value, but orbit it!
Let $x_e=\frac{\gamma}{\delta}$, and $y_e={\frac{\alpha}{\beta}}$ be the equilibrium values of $(x,y)$.
We define two new variables that will simplify the equations, putting the spotlight on the equilibrium:
\[ X=x-x_e\\ Y=y-y_e \]
$X$ and $Y$ represent a small perturbation from the equilibrium values of $x$ and $y$, $(x_e,y_e)$. Think of them as very small numbers -- near zero.
Alternatively,
\[ X+x_e=x\\ Y+y_e=y \]
Note that, since $x_e$ and $y_e$ are constants,
\[ \frac{dX}{dt}=\frac{dx}{dt}\\ \frac{dY}{dt}=\frac{dy}{dt} \]
The important thing to notice is that, with this choice of variables, the interesting equilibrium $(x,y)=(x_e,y_e)$ occurs when $(X,Y)=(0,0)$. So the new equilibrium of interest is $(X,Y)=(0,0)$ -- we're thinking of $(X,Y)$ as small perturbations from $(0,0)$.
With this change of variables,
\[ \frac{dX}{dt}= \alpha (X+x_e) \left(1 - \frac{\beta}{\alpha} (Y+y_e) \right)\\ \frac{dY}{dt}= \delta (Y+y_e) \left((X+x_e) - \frac{\gamma}{\delta} \right) \]
or
\[ \frac{dX}{dt}= \alpha (X+x_e) \left(1 - \frac{\beta}{\alpha} (Y+y_e) \right)\\ \frac{dY}{dt}= \delta (Y+y_e) \left((X+x_e) - \frac{\gamma}{\delta} \right) \]
which simplifies to
\[ \frac{dX}{dt}= -\beta (X+x_e) Y \\ \frac{dY}{dt}= \delta (Y+y_e) X \]
If we multiply each equation through by either $X$ and $Y$,
\[ X\frac{dX}{dt}= -\beta (X+x_e) XY \\ Y\frac{dY}{dt}= \delta (Y+y_e) XY \]
and note that this is the same as (chain rule!)
\[ \frac{dX^2}{dt}= -\beta (X+x_e) XY \\ \frac{dY^2}{dt}= \delta (Y+y_e) XY \]
we then add the two differential equations,
\[ \frac{d}{dt}\left(X^2+Y^2\right) = XY \left( \delta Y - \beta X + \delta y_e - \beta x_e \right) \]
This choice may not seem obvious to you, but the idea is that it looks like a small circle around the equilibrium, which is how we thought of it. We make the observation that
\[ \frac{d}{dt}\left(X^2+Y^2\right) \approx XY \left( \delta y_e - \beta x_e \right) = XY \left( \delta {\frac{\alpha}{\beta}} - \beta \frac{\gamma}{\delta} \right) = XY \left( {\frac{\delta^2 \alpha - \beta^2 \gamma}{\beta\gamma}} \right) \] when $X$ and $Y$ are small (i.e. the original populations $x$ and $y$ are near their equilibria).
This is because the part we threw away was very close to zero (and closer to zero the smaller the perturbation we make from the equilibrium), whereas the part we kept is constant. That's true, so long as the parameters are not alligned precisely so that the constant is zero: what if we just happen to choose $\alpha=\frac{\beta^2\gamma}{\delta^2}$?
This approximate DE \[ \frac{d}{dt}\left(X^2+Y^2\right) = cXY \] where $c = \left( {\frac{\delta^2 \alpha - \beta^2 \gamma}{\beta\gamma}} \right)$ (and let's assume, without loss of generality, that $c>0$) illustrates the instability of the equilibrium $(X,Y)=(0,0)$.
First of all we note that $X^2+Y^2=r^2$ represents the circle of values around the equilibrium at radius $r$ (which we think of as really small). What the DE says is that when $X$ and $Y$ are of the same sign, the radius is growing; but when $X$ and $Y$ are of opposite sign, the radius is shrinking.
If you look at the phase portrait, this will make sense -- the phase portrait in the case of initial values near the equilibrium values appears to be ellipsoidal -- the circle is stretched out along a major axis, and shrunk in along a minor axis.
So this explains a little about why the "phase portraits" look the way they do.
Extend the Simulation Length in Settings to 100, Simulate, then incorporate an image of the results into your Word doc, including an image of the phase portrait as well. Describe the results.
Repeat, but choose the initial population values close to the equilibrium values (equilibrium value*1.0001). Include an image of the phase portrait, as well: what shape does it have?
Links: