Interactive Educational Modules in
Scientific Computing

Predator-Prey Population Models

This module compares numerical solutions of two different models for the dynamics of the populations of two animal species, one a predator and the other its prey. Ordinary differential equations (ODEs) have applications in a wide variety of contexts, including biology and ecology. One such application is the modeling of population dynamics, in particular the interactions between predator and prey animal populations, where the populations are idealized as continuous variables. Two systems of ODEs often used to model the populations of a predator species y and its prey x are the Lotka-Volterra model,

x′ = x (α1β1 y)
y′ = y (− α2 + β2 x),

and the Leslie-Gower model,

x′ = x (α1β1 y)
y′ = y (α2β2 yx),

where the parameters α1 and α2 represent the natural rate of change of the prey and predator populations in isolation from each other, and the parameters β1 and β2 control the effect of interactions between the two species.

The user first selects the population model and corresponding parameter values, the initial populations of prey and predator (x0 and y0, respectively), and how far forward in time to compute the solution. The user also selects a numerical method and step size to be used in computing the approximate solution. Clicking Solve then calculates the approximate solution using the chosen numerical method and step size, and displays the results graphically. On the left, each component of the solution is graphed as a function of time, and on the right a phase portrait shows the trajectory of the point (x(t), y(t)) in the plane. The degradation in the quality of the solution using a lower-order method or coarser step size is clearly visible. Indeed, the approximate solution may be so poor that it does not fit within the displayed portion of the graphs, in which case using a higher-order method or smaller step size will yield a more accurate solution.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Example 9.4 on pages 385-386 and Computer Problem 9.1 on page 418.

Developers: Evan VanderZee and Michael Heath