Go to PostCALC page Go to Table of Contents
Go Back One Page Go Forward One Page

Systems of Differential Equations: Models of Species Interaction

Part 2.1: Numerical Methods

Our next step will be to describe how to obtain descriptions of the solution functions for a predator-prey problem. In general, we will not be able to find symbolic descriptions of the solution functions. Instead, we will rely on numeric methods to approximate these functions. As we did in the case of a single differential equation, we will describe the simplest of these methods -- Euler's Method. If you do not recall Euler's Method for a single equation, click Euler's Method to see a complete discussion of this method. We give a quick review of the one equation version here.

If we have a single differential equation

dy/dt = f(t,y) with y(0) = y0,

we approximate the solution y(t) at n+1 equally spaced points 0 = t0 < t1 < t2 < ... < tn. We designate the common value of tk+1 - tk by t.

Then the subsequent approximations yk+1 to y(tk+1) are given recursively by

yk+1 = yk + f(tk,yk)t for k = 0, 1, ..., n - 1.

Here is a graphical representation of the first step.

Calculation of y1 from y0

Calculation of y1

Recall that we are just approximating rise/run = (y1 - y0)/t by the slope f(t0,y0) at (t0,y0).

Now consider the extension of this approach to a system of the form

dx/dt = ax - bxy

dy/dt = -cy + pxy

with x(0) = x0 and y(0) = y0. If we define

f1(x,y) = ax - bxy and f2(x,y) = -cx + pxy,

then this system has the form

dx/dt = f1(x,y)

dy/dt = f2(x,y)

We approximate using the same approach as in the one-equation case, except that here we increment both x and y at each step:

x0 = x(0) and y0 = y(0)

xk+1 = xk + f1(xk,yk)t

yk+1 = yk + f2(xk,yk)t
for k = 0, 1, 2, ..., n - 1.

  1. Use Euler's Method to approximate solutions to the predator-prey equations with a = 1, b = 0.03, c = 0.4, and p = 0.1. Assume x(0) = 15 and y(0) = 15 and use t = 0.1. Calculate xk and yk to an accuracy of three decimal places for k = 1, 2, and 3.

    Click here to check your answers.

Euler's Method is the simplest of the numerical methods for solving differential equations. Methods used in practice are generally similar in spirit but much more sophisticated -- and much more efficient. Your computer algebra system will use one or more of these methods to generate numerical solutions of systems of differential equations. We will take advantage of this capability without any more comment. The discussion of numerical methods for solving differential equations is a part of most courses on numerical analysis.

Go to PostCALC page Go to Table of Contents
Go Back One Page Go Forward One Page


modules at math.duke.edu Copyright CCP and the author(s), 2000