Systems of Differential Equations

A Predator-Prey Model

The traditional "predator-prey" model involves modelling the populations of predators and their prey.  The changes in populations are related: more prey feed more predators, but an overpopulation of predators can lead to depletion of prey, causing a depopulation of predators...  The problem simulated below is a take-off on the traditional one.

This is a model for what fraction of the MIT population would know a particular joke, the joke is told a fraction of the time when a person who has heard it meets someone who hasn't. The rate of joke spreading is proportional to how funny it is.

It is a closely held secret that Susan Hockfield, MIT's president, has an odd sense of humor--she will not let anyone graduate who cannot tell him the joke on graduation day.  This often is a source of embarassment and confusion to the happy families.

JokeFunniness = 0.66 ;

JokeSpreadRate[Naive_ , Jaded_] := JokeFunniness * Naive * Jaded

Some people who have heard the joke forget it, depending on how forgetful they are:

PopulationForgetfullness = 0.2 ;

ForgotJoke[Naive_ , Jaded_] := PopulationForgetfullness * Jaded

A certain fraction of new students added to the population each day who presumably don't know the joke, the graduation rate is proportional to the entrance rate and the fraction of those who know the joke.

FreshmanEntranceRate = 0.24 ;

GraduationRate[Naive_ , Jaded_]    = FreshmanEntranceRate * Jaded ;

The fraction of students who remain naive tomorrow is

TomorrowsNaive [ TodaysNaive_ , TodaysJaded_ ] := TodaysNaive + FreshmanEntranceRate 365 - JokeSpreadRate [ TodaysNaive , TodaysJaded ] 365

The fraction of students who will know the joke tomorrow is

TomorrowsJaded [ TodaysNaive_ , TodaysJaded_ ] := TodaysJaded + JokeSpreadRate [ TodaysNaive , TodaysJaded ] 365 - ForgotJoke [ TodaysNaive , TodaysJaded ] 365 - GraduationRate [ TodaysNaive , TodaysJaded ] 365

The population evolves each day as

TomorrowsPopulation [ { TodaysNaive_ , TodaysJaded_ } ] := { TomorrowsNaive [ TodaysNaive , TodaysJaded ] , TomorrowsJaded [ TodaysNaive , TodaysJaded ] }

Calculate the population after 5000 days from now if currently 1/5 of the students are naive and 4/5 of the students are in the know.

NestList [ TomorrowsPopulation , { .2 , .8 } , 5000 ] // Short

{ { 0.2 , 0.8 } , 4999 , { 0.6675982286750961 , 0.580752958296795 } }

Now do a longer calculation with the initial naive fraction 0.24 and the jaded fraction 0.76, and use ListPlot to display the trajectory on the naive–jaded plane. Note how the trajectory spirals in to a specific point in the plane. This is an example of a critical point at which the rates of change of each population become zero.

ListPlot [ NestList [ TomorrowsPopulation , { .24 , .76 } , 20000 ] , PlotRange All , PlotJoined True , PlotStyle { Hue [ Random [ ] ] , Thickness [ 0.005 ] } , AxesLabel { Naive , Jaded } ]

[Graphics:HTMLFiles/Lecture-24_7.gif]

Graphics

Now calculate trajectories for a variety of initial conditions for the jaded and naive populations, selected randomly, then plot them on the naive–jaded plane:

graphicslist = Table [ ListPlot [ NestList [ TomorrowsPopulation , { Random [ ] , Random [ ] } , 20000 ] , PlotRange All , PlotJoined True , PlotStyle { Hue [ Random [ ] ] , Thickness [ 0.005 ] } , DisplayFunction Identity ] , { i , 1 , 10 } ]

{ Graphics , Graphics , Graphics , Graphics , Graphics , Graphics , Graphics , Graphics , Graphics , Graphics }

Show [ graphicslist , DisplayFunction $DisplayFunction , AxesLabel { Naive , Jaded } ]

[Graphics:HTMLFiles/Lecture-24_8.gif]

Graphics

Note that all starting points produce trajectories that converge on the same critical point. This is an example of a system of equations that exhibits a stable critical point.
Note also that some of the trajectories take the system into unphysical states where one of the populations exceeds a fraction of 1!

Analysis of Stability of the Predator-Prey Model

The model above can be written as the system of ODEs:
dN dt = α - ρ N J
dJ dt = -αJ  +  ρ N J  - φJ

Find the fixed points:

Ndot = α - ρ N J

Jdot = -α J + ρ N J - φ J

General :: spell1 : Possible spelling error: new symbol name \" Ndot \" is similar to existing symbol \" Not \". More… "Possible spelling error: new symbol name \\\"\\!\\(Ndot\\)\\\" is similar to existing symbol \\\"\\!\\(Not\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"General::spell1\\\"]\\)"

α - J N ρ

General :: spell1 : Possible spelling error: new symbol name \" Jdot \" is similar to existing symbol \" Ndot \". More… "Possible spelling error: new symbol name \\\"\\!\\(Jdot\\)\\\" is similar to existing symbol \\\"\\!\\(Ndot\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"General::spell1\\\"]\\)"

- J α + J N ρ - J ϕ

fixedpoint = Solve [ { Ndot 0 , Jdot 0 } , { N , J } ] // Flatten

{ J α α + ϕ , N α + ϕ ρ }

The next final part of this notebook examines the stability of the critical point for this problem. This is discussed in Kreyszig AEM, pp. 170–174.  Kreyszig describes the stability analysis in terms of an eigenvalue problem. The matrix for which eigenvalues are calculated is the "Jacobian" defined below. It is the same as the matrix A in Kreyszig's Eq. (1) on p. 170.

Define the general Jacobian

Jacob = { {D[Ndot, N], D[Ndot, J]},  {D[Jdot, N], D[Jdot, J]} } ;

Jacob//MatrixForm

( - J ρ - N ρ J ρ - α + N ρ - ϕ )

Find the Jacobian at the fixed point:

JacobFixedPoint = Simplify[Jacob/.fixedpoint] ;

JacobFixedPoint//MatrixForm

( - α ρ α + ϕ - α - ϕ α ρ α + ϕ 0 )

Approach 1: Compute parameters p, q, and Δ defined in Kreyszig's Eq. (7) on p. 171:

Kreyszigp = JacobFixedPoint [ [ 1 , 1 ] ] + JacobFixedPoint [ [ 2 , 2 ] ]

- α ρ α + ϕ

pValue = Kreyszigp /. { α FreshmanEntranceRate , ρ JokeFunniness , ϕ PopulationForgetfullness }

General :: spell1 : Possible spelling error: new symbol name \" pValue \" is similar to existing symbol \" Value \". More… "Possible spelling error: new symbol name \\\"\\!\\(pValue\\)\\\" is similar to existing symbol \\\"\\!\\(Value\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"General::spell1\\\"]\\)"

- 0.36000000000000004

Kreyszigq = Simplify [ Det [ JacobFixedPoint ] ]

General :: spell1 : Possible spelling error: new symbol name \" Kreyszigq \" is similar to existing symbol \" Kreyszigp \". More… "Possible spelling error: new symbol name \\\"\\!\\(Kreyszigq\\)\\\" is similar to existing symbol \\\"\\!\\(Kreyszigp\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"General::spell1\\\"]\\)"

α ρ

qValue = Kreyszigq /. { α FreshmanEntranceRate , ρ JokeFunniness , ϕ PopulationForgetfullness }

General :: spell : Possible spelling error: new symbol name \" qValue \" is similar to existing symbols { pValue , Value } . More… "Possible spelling error: new symbol name \\\"\\!\\(qValue\\)\\\" is similar to existing symbols \\!\\({pValue, Value}\\). \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, ButtonData:>\\\"General::spell\\\"]\\)"

0.1584

DeltaValue = pValue 2 - 4 qValue

- 0.504

According to Kreyszig's Eq. (9) on p. 172, when p ≠ 0 and Δ < 0, the critical point will be a spiral point. In addition, according to Kreyszig's Eq. (10) on p. 173, when p ≤ 0 and q > 0, the critical point will be stable. These findings correspond to what we observed on the trajectories plotted above.

Approach 2: Compute eigenvalues of the Jacobian at the fixed point and use them in a way not described in Kreyszig...

evals = Eigenvalues [ JacobFixedPoint ]

{ - α ρ - α 2 ρ 2 - 4 ( α + ϕ ) ( α 2 ρ + α ρ ϕ ) 2 ( α + ϕ ) , - α ρ + α 2 ρ 2 - 4 ( α + ϕ ) ( α 2 ρ + α ρ ϕ ) 2 ( α + ϕ ) }

The Eigenvalues will always have a negative real part because the input parameters are positive real coefficients

Considering the parameters used above, the solution is attracted to the fixed point but oscillates

MitEvals = evals /. { α FreshmanEntranceRate , ρ JokeFunniness , ϕ PopulationForgetfullness }

{ - 0.18000000000000002 - 0.354964786985977 , - 0.18000000000000002 + 0.354964786985977 }

The Oscillation perioid is about 18 years

2 π / Im [ MitEvals [ [ 1 ] ] ]

- 17.700869318701763


Created by Mathematica  (November 21, 2005) Valid XHTML 1.1!