### 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) = y**_{0},
we approximate the solution **y(t)** at **n+1** equally spaced points **0 = t**_{0} < t_{1} < t_{2} < ... < t_{n}. We designate the common value of **t**_{k+1} - t_{k} by **t**.

Then the subsequent approximations **y**_{k+1} to **y(t**_{k+1}) are given recursively by

**y**_{k+1} = y_{k} + f(t_{k},y_{k})t for **k = 0**, **1**, ..., **n - 1**.
Here is a graphical representation of the first step.

**Calculation of y**_{1} from y_{0}

Recall that we are just approximating **rise/run = (y**_{1} - y_{0})/t by the slope **f(t**_{0},y_{0}) at **(t**_{0},y_{0}).

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

**dx/dt = ax - bxy**

**dy/dt = -cy + pxy**

with **x(0) = x**_{0} and **y(0) = y**_{0}. If we define

**f**_{1}(x,y) = ax - bxy and **f**_{2}(x,y) = -cx + pxy,
then this system has the form

**dx/dt = f**_{1}(x,y)

**dy/dt = f**_{2}(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:

**x**_{0} = x(0) and **y**_{0} = y(0)
**x**_{k+1} = x_{k} + f_{1}(x_{k},y_{k})t
**y**_{k+1} = y_{k} + f_{2}(x_{k},y_{k})t
for **k = 0**, **1**, **2**, ...,** n - 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 **x**_{k} and **y**_{k} 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.