

Part 3: Euler's Method for Systems
In the preceding Part, we used your helper application to generate trajectories of the LotkaVolterra equations. These trajectories were not coming from the nearuseless formula for trajectories, but rather from the differential equations themselves. This suggests the use of a numerical solution method, such as Euler's Method, which we introduced in the Limited Population and Raindrop modules.
Recall the idea of Euler's Method: If we have a "slope formula," i.e., a way to calculate dy/dt at any point (t,y), then we can generate a sequence of yvalues,
y_{0}, y_{1}, y_{2}, y_{3}, ...
by starting from a given y_{0}, and computing each rise as slope x run. That is,
y_{k} = y_{k1} + slope_{k1} Deltat
where Deltat is a suitably small step size in the time domain.
It really doesn't matter in this calculation if the slope formula happens to depend not just on t and y but on some other variable x  as long as we know how x is related to t and y. If x happens to be another dependent variable in a system of differential equations (as in the predatorprey model), we can generate values of x in the same way. This leads to a pair of Euler formulas of the form
x_{k} = x_{k1} + xslope_{k1} Deltat,
y_{k} = y_{k1} + yslope_{k1} Deltat.
More specifically, given the LotkaVolterra equations,
dx/dt = ax  bxy,
dy/dt = cy + pxy,
the Euler formulas become
x_{k} = x_{k1} + (ax_{k1}  bx_{k1}y_{k1}) Deltat,
y_{k} = y_{k1} + (cy_{k1} + px_{k1}y_{k1}) Deltat.
Of course, to calculate something from these formulas, we must have explicit values for a, b, c, p, x(0), y(0), and Deltat. In this Part we explore the adequacy of these formulas for generating solutions of the LotkaVolterra equations. If your helper application has Euler's Method as an option, we will use that rather than construct the formulas from scratch.


Last modified: November 11, 1997