Lecture 4 Introduction to models for two interacting speciesmrm/Teaching/MathBio/... · Lecture 4...

14
Lecture 4 Introduction to models for two interacting species Reading: Much of the material here comes from Section 3.1 pages 79–83 of James D. Murray (2002), Mathematical Biology I: An Introduction, 3rd edition. but I have also drawn on his Appendix A (pages 501–505) and on Martin Braun (1993), Dierential Equations and Their Applications, 4th edition. If you are at the university, either physically or via the VPN, you can read an online version of Murray’s book at http://bit.ly/OnlineMurrayVol1. 4.1 The Lotka-Volterra model The Italian scientist Vito Volterra (1860–1940) proposed the model we’ll study today to describe certain oscillations in the yield of the Adriatic fishery—there’s a very nice problem about this application in Problem Set 2. But the model is more abstract/general than that and involves two interacting species, the predators and their prey. Their populations are governed by the following systems of ODEs dN dt = N (a - bP ) dP dt = P (cN - d) (4.1) where N (t) is the prey population, P (t) the predator population and a, b, c and d are positive constants. A few things to notice straight away are: When there are no predators, so P (t) = 0, the prey population obeys dN dt = aN and so grows exponentially. 4.1

Transcript of Lecture 4 Introduction to models for two interacting speciesmrm/Teaching/MathBio/... · Lecture 4...

Lecture 4

Introduction to models for two

interacting species

Reading: Much of the material here comes from Section 3.1 pages 79–83 of

James D. Murray (2002), Mathematical Biology I: An Introduction, 3rdedition.

but I have also drawn on his Appendix A (pages 501–505) and on

Martin Braun (1993), Di↵erential Equations and Their Applications,4th edition.

If you are at the university, either physically or via the VPN, you can read an onlineversion of Murray’s book at http://bit.ly/OnlineMurrayVol1.

4.1 The Lotka-Volterra model

The Italian scientist Vito Volterra (1860–1940) proposed the model we’ll study todayto describe certain oscillations in the yield of the Adriatic fishery—there’s a verynice problem about this application in Problem Set 2. But the model is moreabstract/general than that and involves two interacting species, the predators andtheir prey. Their populations are governed by the following systems of ODEs

dN

dt= N(a� bP )

dP

dt= P (cN � d) (4.1)

where N(t) is the prey population, P (t) the predator population and a, b, c and dare positive constants. A few things to notice straight away are:

• When there are no predators, so P (t) = 0, the prey population obeys

dN

dt= aN

and so grows exponentially.

4.1

u =cN

ddimensionless prey population

v =bP

adimensionless predator population

⌧ = at dimensionless time

↵ =d

aratio of predator death and prey birth rates

Table 4.1: The dimensionless variables used to transform the Lotka-Volterra system(4.1) into the dimensionless form (4.2).

• When there are no prey, so N(t) = 0, the predator population obeys

dP

dt= �dP

and so declines exponentially to extinction.

• The interactions between the two species are represented by terms proportionalto the product N(t)P (t). This term has a negative coe�cient in the preyequation because the interaction destroys prey animals, but a positive one inthe predator equation because they benefit from the interaction.

The system of ODEs (4.1) is usually called the Lotka-Volterra model as it wasalso proposed by the cosmopolitan1 scientist Alfred Lotka (1880–1949) in the contextof chemical reactions. As usually, we’ll work with a dimensionless version. Thereare two kinds of animals here, as well as four parameters, so there are many possiblechoices for the dimensionless parameters, but we will fix on those listed in Table 4.1,which lead to the ODEs

du

d⌧= u(1� v) and

dv

d⌧= ↵v(u� 1) (4.2)

The equilibria of such a system are points (u?, v?) at which both du/d⌧ anddv/d⌧ vanish. Here that means

u?(1� v?) = 0 = ↵v?(u? � 1),

a system of equations whose only solutions are (u?, v?) = (0, 0) and (u?, v?) = (1, 1).As we did for the single-species models, we will want to analyse the linear stabilityof these equilibria, but that requires a modest mathematical interlude.

1 Wikipedia tells me that Lotka was born in Lwow (then part of Poland) to American par-ents, then educated in the UK (B.Sc. & D.Sc. from Birmingham), Germany (Leipzig) and theUSA (Cornell). He subsequently worked as a chemist, a patent examiner, a physicist, a scientificjournalist and a statistician.

4.2

4.2 A mathematical interlude

This section applies to a much wider class of models that just the Lotka-Volterra andso serves as a general introduction to linear stability in two (or more) dimensions.Suppose we are considering a model for two interacting species that has the generalform

du

dt= f(u, v) and

dv

dt= g(u, v) (4.3)

where f : R�0⇥R�0 �! R and g : R�0⇥R�0 �! R are continuous and continuouslydi↵erentiable. If (u?, v?) is an equilibrium of (4.3), so that

f(u?, v?) = 0 = g(u?, v?)

then we can investigate its stability by defining perturbations x(t) and y(t) suchthat

u(t) = u? + x(t) and v(t) = v? + y(t). (4.4)

4.2.1 Linearisation near an equilibrium

As in the single-species case, we’ll compute du/dt in two ways: by direct di↵erenti-ation of the expressions (4.4) and via the ODEs in (4.3). On the one hand,

du

dt=

d

dt(u? + x(t)) =

dx

dt.

But then on the other hand

du

dt=

dx

dt= f (u? + x(t), v? + y(t))

⇡ f(u?, v?)+

x(t) (@uf |u?,v?+ y(t) (@vf |u?,v?

= x(t) (@uf |u?,v?+ y(t) (@vf |u?,v?

. (4.5)

where the final equality follows because (u?, v?) is an equilibrium, so f(u?, v?) = 0.Very similar calculations show

dv

dt=

dy

dt= g (u? + x(t), v? + y(t))

= x(t) (@ug|u?,v?+ y(t) (@vg|u?,v?

. (4.6)

It’s convenient to combine the results (4.5) and (4.6) in matrix form as follows

d

dt

xy

�=

@uf @vf@ug @vg

� xy

�or

d

dt

xy

�= A

xy

�, (4.7)

where

A =

@uf @vf@ug @vg

�(4.8)

4.3

and all the partial derivatives are evaluated at (u?, v?). When derived from an eco-logical model such as the Lotka-Volterra system the matrix A defined above is calledthe community matrix, but in more general settings it is called the Jacobian matrix,or, more briefly, just the Jacobian. Either way, the stability of the equilibrium de-pends on the nature of the solutions to the linear system of ODEs (4.7) and this, inturn, depends on the eigenvalues of the matrix A.

4.2.2 A more careful definition of stability

Before getting into the details of the zoology of possible behaviours for a linearisationsuch as (4.7) it’s useful to be a bit more precise about what we mean by terms likestable. Consider the somewhat more general system of ODEs x = f(x), wherex 2 Rn and f : Rn ! Rn. This is a short way of writing

d

dt

2

6664

x1

x2...xn

3

7775=

2

6664

f1(x1, . . . , xn)f2(x1, . . . , xn)

...fn(x1, . . . , xn)

3

7775(4.9)

where fj : Rn ! R.

Definition 4.1. An equilibrium of (4.9) is a point x? 2 Rn such that fj(x?) = 0for all 1 j n. Such a point x? is sometimes also called a fixed point of (4.9).

Definition 4.2. A solution x(t) of (4.9) with initial condition x(t = 0) = x0 isstable if 8✏ > 0, there exists �(✏) > 0 such that if x0(t) is another solution of (4.9)with x0(t = 0) = x0

0 and kx00 � x0k < �(✏), then

kx0(t)� x(t)k < ✏ 8t � 0.

Definition 4.3. A solution of (4.9) is unstable if it is not stable.

Note that the definitions above make sense even when the solution in question isn’tan equilibrium, but the notion of stability is especially simple for equilibria. Supposex(t) = x? is an equilibrium solution of (4.9). Then x? is stable if, for every ✏ > 0,we can choose a pair of balls surrounding x? as illustrated below, so that any othersolution x0(t) that starts in the yellow ball (radius �(✏)) will remain within thesurrounding white one (radius ✏) for all t � 0.

x*

ε

δ(ε)

4.4

These definitions are, for the moment, motivated by our study of linearisationsand so it’s natural to consider arbitrary systems of linear ODEs of the form

u = Bu (4.10)

where u 2 Rn and B is a constant n-by-n matrix.

Theorem 4.4 (Braun, Chapter 4). For the system of linear ODEs (4.10):

• Every solution u(t) is stable if all the eigenvalues of B have negative real parts.

• Every solution u(t) is unstable if at least one eigenvalue of B has a positivereal part.

I’d like to conclude these general remarks with a comparatively recent theorem(compared to the long history of ODE models in maths and science) that providesa rigorous justification for linear stability analysis.

Theorem 4.5 (Hartman–Grobman (1960 and 1959, respectively)). Consider a gen-eral ODE of the form (4.9) where x 2 Rn and all the functions fj(x) are continuous,as are all their partial derivatives @fj/@xk. Now suppose that x(t) = x? is an equi-librium for (4.9) with linearisation B, so that

Bjk =@fj@xk

����x=x?

.

If all the eigenvalues of B have non-zero real parts then there exist

• an ✏ > 0 and a time T > 0 and

• a continuous, invertible map h : Rn ! Rn whose inverse is also continuous

such that for every x0 with kx0 � x?k < ✏ and all 0 t T ,

h(x(t)) = u(t).

Here x(t) is the solution to (4.9) with x(t = 0) = x0 and u(t) is a solution tou = Bu, with u(t = 0) = u0 = h(x0).

You should think of the function h : Rn ! Rn as a change of coordinates thattransforms back and forth between solutions of the general ODE (4.9) and solutionsof the linear ODE (4.10), where the matrix B is the linearisation near a fixed point.Sometimes the Hartman-Grobman theorem is illustrated with a diagram like this:

x0x=f(x)����! x(t)

??yh

??yh

u0u=Bu���! u(t)

The idea is that it doesn’t matter whether you first use h to find u0 = h(x0)and then solve u = Bu or, instead, solve the original x = f(x) and then use h to

4.5

transform x(t) to u(t): both approaches give the same answer. This may sound toogood to be true and in some senses it is: the theorem only applies to solutions whoseinitial values lie in a (potentially small) neighbourhood of x? and the conclusion mayonly hold for finite time. And finally, the Hartman-Grobman Theorem doesn’t sayanything in the case that one or more of the eigenvalues of the linearisation B havereal part equal to zero. A similar issue will arise in the following section, where we’llspecialise to the study of linearisations of systems in R2.

4.2.3 Phase portraits, stability and the eigenvalues of A

If one linearises a two-dimensional system of ODEs such as (4.3) the associatedinitial value problem looks like

d

dt

x(t)y(t)

�= A

x(t)y(t)

�with

x(0)y(0)

�=

x0

y0

�(4.11)

where A is the matrix defined in (4.8). As Braun’s theorem suggests, both theanalytic form of the solution and the solution’s stability depend on the eigenvaluesof A, as detailed in the next few sections. The catalog of possible behaviours isillustrated with plots of the xy-plane showing the curves traced out by solutions(x(t), y(t)) as t varies: such plots are called phase portraits.

Two distinct real eigenvalues

If the community matrix A has two distinct, real-valued eigenvalues then it also hasa pair of eigenvectors that form a basis for R2. The solutions to the initial valueproblem (4.11) have an especially simple form,

x(t)y(t)

�= �1u1e

�1t + �2u2e�2t, (4.12)

where the uj are unit eigenvectors of A, so that Auj = �juj and uj · uj = 1. Thecoe�cients �j are the coe�cients of the initial data in the eigenbasis:

x0

y0

�= �1u1 + �2u2

If we know additionally that the eigenvalues are nonzero then solutions of this formfall into three qualitatively distinct groups, which are illustrated in Table 4.2. I’veexcluded those cases where one of the eigenvalues is zero as then the linear system(4.11) has a whole line of equilibria that lie on a line through the origin in the direc-tion of the eigenvector corresponding to the zero eigenvalue. Such lines of equilibriagenerally disappear when the Taylor expansion in Eqn. (4.5) is extended to quadraticor higher-order and so the corresponding phase portraits are not representative ofthe true pattern of trajectories.

4.6

Stable node Saddle Unstable node

�1 < �2 < 0 �1 < 0 < �2 0 < �1 < �2

�1 20 �2

� 1 10 �2

� 1 10 2

Stable node Saddle Unstable node

Table 4.2: Qualitative behaviour of solutions when the matrix A has two distinct,nonzero eigenvalues. The top row of the table above shows the pattern of eigenvalueswhile the rows below provide examples of representative matrices and the correspond-ing pattern of trajectories.

Real eigenvalues with algebraic multiplicity two

If the characteristic equation det (A� �I) = 0 has a repeated, nonzero root �0 thenthe general solution to the initial value problem (4.11) has the form

x(t)y(t)

�=

x0

y0

�e�0t +

b1b2

�te�0t (4.13)

where b1b2

�= (A� �0I)

x0

y0

�.

Solutions of this sort are illustrated in Table 4.3, which once again excludes the case�0 = 0.

Eigenvalues with nonzero imaginary part

If the eigenvalues of A have nonzero imaginary parts then they must form a complex-conjugate pair, � = µ± i!. In this case the solutions have the form

x(t)y(t)

�=

x0

y0

�eµt cos(!t) +

b1b2

�eµt sin(!t) (4.14)

where b1b2

�=

1

!(A� µI)

x0

y0

�.

4.7

Degenerate stable node Degenerate unstable node

�0 < 0 �0 > 0

�2 �50 �2

� 2 �50 2

Degenerate stable node Degenerate unstable node

Table 4.3: This table is the analog of Table 4.2 for the cases in which the matrix Ahas a repeated real eigenvalue.

Solutions of this sort are illustrated in Table 4.4, which includes the case µ = 0, whenthe solutions to the linearised problem, Eqn. (4.11), trace over concentric circles orovals enclosing the origin. But this is a rather special case—the Hartman-Grobmantheorem doesn’t apply as the eigenvaues have real parts equal to zero—and the phaseportrait does not usually continue to look like this if one extends the Taylor seriesin Eqn. (4.5) to higher order and so it may not necessarily reflect the behaviourof solutions to the original nonlinear problem (4.3) near the equilibrium. I haveincluded it here mainly because, as we will see shortly, the Lotka-Volterra systemhas an equilibrium of this kind.

4.8

Stable focus Centre Unstable focus

µ < 0 µ = 0 µ > 0

�1 2�1 �1

� 2 3

�2 �2

� 1 2

�1 1

Stable focus Complex, with real part zero Unstable focus

Table 4.4: The top row of the table above lists the real part of the complex-conjugateeigenvalue pair � = µ± i! while the figures below provide examples of representativematrices A and the corresponding pattern of trajectories.

4.2.4 Computational shortcuts for two-dimensional systems

Although the classification of 2⇥ 2 systems in the previous section depended on theeigenvalues of the matrix A, one doesn’t usually need to compute them as there areequivalent conditions that are easier to check. To see this, being by writing out thecharacteristic polynomial of A in terms of its elements

det (A� �I) = det

a11 � � a12a21 a22 � �

= (a11 � �)(a22 � �)� a12a21= �2 � (a11 + a22)�+ (a11a22 � a12a21)

= �2 � ⌃�+� (4.15)

where ⌃ = Tr(A) = (a11 + a22) is the trace of the matrix and � = (a11a22 � a12a21)is its determinant. The eigenvalues of A are, of course, the roots of this quadraticand so satisfy

� =⌃±

p⌃2 � 4�

2. (4.16)

If we call the two roots �1 and �2 we can use them to factor the characteristicpolynomial and obtain

det (A� �I) = (�� �1)(�� �2) = �2 � (�1 + �2)�+ �1�2.

Comparing this expression with the last line of (4.15) shows that

⌃ = �1 + �2 and � = �1�2

4.9

and this, along with Eqn. (4.16), allows us to make the following observations, whichare summarised in Figure 4.1.

• If � < 0 then the eigenvalues are real, nonzero and have opposite sign: theequilibrium is thus a saddle.

• The eigenvalues are distinct real numbers if ⌃2 � 4� > 0, but form a complexconjugate pair if ⌃2 � 4� < 0 or, equivalently, if

� >

✓⌃

2

◆2

.

• If � > 0 and ⌃ < 0 then the eigenvalues are either a pair of negative realnumbers or a complex conjugate pair with negative real part. In either case,the equilibrium is stable.

• If � > 0 and ⌃ > 0 then the eigenvalues are either a pair of positive realnumbers or a complex conjugate pair with positive real part. In either case,the equilibrium is unstable.

• The various special cases at the boundaries between the regions describedabove are:

– � = 0: then there are one or (if ⌃ = 0) two zero eigenvalues and lin-ear stability analysis is inconclusive. The pattern of solutions will bedetermined by higher-order terms in the Taylor series in Eqn. (4.5).

– � = (⌃/2)2: the characteristic polynomial has a repeated real root andthe phase portraits look like those in Table 4.3.

– ⌃ = 0 and � > 0: the eigenvalues are a pure imaginary pair and, thoughthe phase portrait of the linearised system looks like the middle casein Table 4.4, linear stability analysis is inconclusive and the pattern ofsolutions is determined by higher-order terms in Eqn. (4.5).

4.10

Repeated real eigenvalues

-3 -2 -1 0 1 2 3

-1.0

-0.5

0.0

0.5

1.0

1.5

2.0

Stability diagram

Unstable fociStable foci

Unstable nodesStable nodes

Saddles

Cent

res

Figure 4.1: The eigenvalues for a 2⇥2 community matrix A—and hence the stabilityof any associated equilibrium—are determined by ⌃ = Tr(A) and � = det(A). Thedashed parabola defined by � = (⌃/2)2 separates the cases with purely real-valuedeigenvalues (nodes and saddles) from those with nonzero imaginary part (foci andcentres).

4.11

(u?, v?) Community matrix A Eigenvalues Stability type

(0, 0)

1 00 �↵

�� = 1, �↵ Saddle

(1, 1)

0 �1↵ 0

�� = ± i

p↵ Centre

Table 4.5: The equilibria, community matrices, eigenvalues and stability types forthe dimensionless Lotka-Volterra system.

4.3 Lotka-Volterra revisited

Let us now apply the methods of the previous section to the Lotka-Volterra system.Recall that we had the dimensionless form

du

d⌧= f(u, v) = u(1� v) and

dv

d⌧= g(u, v) = ↵v(u� 1)

which has equilibria at (u?, v?) = (0, 0) and (1, 1). We first need to calculate thecommunity matrix

A =

@uf @vf@ug @vg

�=

(1� v) �u↵v ↵(u� 1)

�(4.17)

Evaluating this at the equilibria leads to the conclusions summarised in Table 4.5and, in particular, to the conclusion that linear stability analysis is uninformativeabout the equilibrium at (u?, v?) = (1, 1) where A has pure imaginary eigenvalues.

Linear stability analysis has thus proven rather less informative than one mighthave hoped. In general, we would now have to resort to numerics to explore furtherthe dynamics, but the Lotka-Volterra system has a special property that makes itpossible to give a rather complete description of the solutions without reference tocomputing: it has a constant of the motion, which is a defined below.

Definition 4.6. The system of ODEs

du

dt= f(u, v) and

dv

dt= g(u, v) (4.18)

is said to have a constant of the motion is there is a function H : R2 ! R withthe property that

H(u(t), v(t)) = H(u(0), v(0)) (4.19)

for every solution (u(t), v(t)) of the system (4.18). That is, H is constant alongsolutions of the ODE.

This is equivalent to saying that solutions of the ODEs trace over contours of Hand so—on the rare occasions when a constant of the motion exists—one can sketchthe trajectories of the system by drawing a contour map of H. Let us first establishthat the Lotka-Volterra system has such a function.

4.12

We can di↵erentiate both sides of Eqn. (4.19) with respect to time, applying thechain rule to the lefthand side to obtain

d

dtH(u(t), v(t)) =

du

dt

@H

@u+

dv

dt

@H

@v

= f(u, v)@H

@u+ g(u, v)

@H

@v

=d

dt(H(u(0), v(0)))

= 0,

where I have used the ODEs (4.18) in passing from the first line to the second. Thiscalculation leads to the following PDE, which any constant of the motion must obey:

f(u, v) @uH + g(u, v) @vH = 0. (4.20)

The current Problem Set includes an exercise that guides you through the con-struction of a constant of the motion for the Lotka-Volterra system, but here I’lljust demonstrate that one exists. Consider

H(u, v) = ↵u+ v � log(u↵v) = ↵ (u� log(u)) + (v � log(v)) .

It has

@uH = ↵

✓1� 1

u

◆and @vH =

✓1� 1

v

and satisfies the PDE (4.20), as we demonstrate below:

f(u, v) @uH + g(u, v) @vH = u(1� v)h↵� ↵

u

i+ ↵v(u� 1)

1� 1

v

= ↵u(1� v)� ↵(1� v) + ↵v(u� 1)� ↵(u� 1)

= ↵u� ↵uv � ↵ + ↵v + ↵uv � ↵v � ↵u+ ↵

= 0.

As Figure 4.2 shows, the contours of H are closed curves encircling the equilibriumat (u?, v?) = (1, 1) and hence the solutions (u(⌧), v(⌧)), which trace over thesecontours, are periodic for almost all initial conditions.

4.13

0 1 2 3

01

23

Lotka-Volterra: phase portrait

Prey u

Pred

ator

s v

0 5 10 15

01

23

Lotka-Volterra: solutions

Time

Popu

latio

n

Figure 4.2: Solutions to the Lotka-Volterra system with ↵ = 1. The leftpanel is a phase portrait showing the equilibria (marked by grey dots) and thecurves traced out by solutions (u(⌧), v(⌧)) that pass through the points specified byu0 = v0 2 {0.25, 0.4, 0.65, 0.85}. The panel at right shows the corresponding so-lutions for the prey population u(⌧) (solid curves) and predator population v(⌧)(dashed): note that the predator population always peaks shortly after the prey. Thepairs of curves at right correspond to the contours left, except for the one withu0 = v0 = 0.4 which I’ve excluded for clarity’s sake.

4.14