Mathematics 172 – Numerical Analysis 2 Discussion 2 – Systems of ODE; Higher Order Equations February 18, 1999

Background

To finish off our discussion of numerical methods for approximating solutions of ordinary differential equations, we want to consider two generalizations of the basic first-order initial value problems we have discussed:

\{ \begin{matrix}y′ = f(t, y) \\ y(t_{0}) = α \end{matrix}

and see how our methods for these IVP’s also generalize.

Discussion Questions

A) In many situations, two or more quantities evolve jointly over time in such a way that the rates of change of the quantities are given by known functions of t and the quantities themselves. For example, consider biological populations of two different species where the first species is made up of predators and the second species are the prey of the first. One very simple model of this sort of interaction is to assume that the prey would grow exponentially if there were no predators, the predators would decrease exponentially if there were no prey (no food for them!), but there is an “interaction” term that contributes positively to the predators and negatively to the prey populations. Here is a general model of this type: Let y be the number of prey and z be the number of predators as functions of time. The model is the following system of two differential equations:

\{ \begin{matrix}y′ = ay − byz \\ z′ = −cz + dyz \end{matrix}

where a, b, c, d are positive constants. This kind of situation leads us to consider systems of several ODE and IVP’s for systems in general. For example, the standard IVP for a system of two first order equations might be stated as follows:

(1)  \{ \begin{matrix}y′ = f(t, y, z) \\ z′ = g(t, y, z) \\ y(t_{0}) = α \\ z(t_{0}) = β \end{matrix}

A solution of such a problem would be a vector-valued function (y(t), z(t)) defined on some t-interval I containing t_{0}, satisfying both equations, and the initial conditions.

1) Develop and describe “extended” basic Euler and Midpoint methods for generating numerical approximations to solutions of the IVP (1). Explain how you found your methods, and how you might measure a one-step error.

2) Use your Euler method to generate an approximate solution of the predator-prey system

\{ \begin{matrix}y′ = .2y − .03yz \\ z′ = −.15z + .04yz \\ y(0) = 10 \\ z(0) = 20 \end{matrix}

Take h = .2, and 0 ≤ t ≤ 2. Describe in words how y and z are changing over this time interval.

3) What would your Euler method look like for a general system of n first order equations in n unknown functions:

y′_{1} = f_{1}(t, y_{1}, …, y_{n})
⋮
y′_{n} = f_{n}(t, y_{1}, …, y_{n})

with initial conditions y_{i}(t_{0}) = α_{i}, for i = 1, …, n?

B) A second generalization would be to consider higher-order differential equations such as the second-order ODE we wrote down several weeks ago that models the damped oscillator (e.g. a mass-spring system with friction proportional to the velocity of the mass):

(2)  my′′ + cy′ + ky = 0.

1) Suppose you think of y and z = y′ as two unknown functions, related of course by the equation z = y′. Can you rewrite (2) as a system of two first order equations for the functions y and z? How?

2) Show in general that any nth order equation

a_{n}(t)y^{(n)} + a_{n−1}(t)y^{(n−1)} + ⋯ + a_{1}(t)y′ + a_{0}(t)y = 0

can be rewritten as a system of n first order equations in the variables y, u_{1} = y′, u_{2} = y′′, …, u_{n−1} = y^{(n−1)}. (Hence what you did in part 3 of question A can also be applied to these systems!)

Assignment

Group write-ups due Thursday, February 25.