Skip to main content

Section 20.2 Predator-prey models

A traditional example of predator-prey relation is foxes and rabbits (in SU neighborhood, it could be hawks and squirrels instead). The Lotka-Volterra model of this relationship involves four positive parameters \(a, b, c, d\text{:}\)

\begin{align} R' \amp = a R - b RF \label{eq-LV-R}\tag{20.2.1}\\ F' \amp =-c F + d RF \label{eq-LV-F}\tag{20.2.2} \end{align}

The first equation indicates that without foxes, rabbit population would grow at a constant relative rate. As in SIR model, the number of interactions is proportional to the product \(RF\text{.}\) Each interaction has a chance of reducing the number of rabbits. These interactions also contribute to the growth of foxes but not necessarily at the same rate (an eaten rabbit does not mean there is now an extra fox; we are not modeling a zombie apocalipse). Finally, the minus sign in \(-cF\) ensures that without rabbits, foxes die out.

Use ode45 to solve the equations (20.2.1)-(20.2.2) on the interval \([0, 100]\) with

a = 0.1;
b = 0.004;
c = 0.2;
d = 0.001;
y0 = [100, 30];
Answer

To the code lines written above, we only have to add

rhs = @(t, y) [a*y(1) - b*y(1)*y(2); -c*y(2) + d*y(1)*y(2)];
[t, y] = ode45(rhs, [0, 100], y0);
plot(t, y, 'LineWidth', 3)
legend('Rabbits', 'Foxes')

Observing the periodicity of the solution, one may want to summarize it with a phase plot in addition to time-series plot:

figure()
plot(y(:,1), y(:,2), 'LineWidth', 3)
xlabel('Rabbits')
ylabel('Foxes')

The Lotka-Volterra model has two equilibrium points: \((0,0)\) and \((c/d, a/b)\text{,}\) meaning that a solution with either of these initial conditions stays constant. The former is mutual extinction, the latter is stable coexistence. But since the solution is periodic, it does not converge to either equilibrium.