Scientific Computing

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} *y* ⁄*x*),

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
*x*_{0} and *y*_{0}*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