ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL
Unit 26 -- Application: Predator-Prey Models
Industrial Mathematics Institute
Columbia, SC 29208
URL: http://www.math.sc.edu/~meade/
E-mail: meade@math.sc.edu
Copyright © 2001 by Douglas B. Meade
All rights reserved
-------------------------------------------------------------------
>
Outline of Unit 26
>
Initialization
> restart;
> with( DEtools ):
> with( plots ):
> with( linalg ):
> with( student ):
Warning, the name changecoords has been redefined
Warning, the name adjoint has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
>
Let
and
denote the number of rabbits and foxes at time
in a closed ecosystem. The rabbits have an unlimited food supply but the foxes sole source of food is the rabbits. Assume that in the absence of the foxes, the rabbits would grow exponentially and in the absence of rabbits, the fox population would decay exponentially to zero. The fox population increases as a result of interactions between rabbits and foxes (
i.e.
, when a fox eats a rabbit). Assume that the number of interactions between rabbits and foxes occur at a rate proportional to the product of the number of rabbits and foxes. These assumptions lead to the system of first-order ODEs
> f := (R,F) -> alpha * R - beta * F*R:
> g := (R,F) -> -delta * F + epsilon * F*R:
> sys1 := diff( R(t), t ) = f( R(t), F(t) ),
> diff( F(t), t ) = g( R(t), F(t) );
>
with initial conditions
> ic1 := R(0) = R[0], F(0) = F[0];
>
where all four parameters (
,
,
, and
) and the initial conditions are all positive.
The equilibrium solutions to this model are
> equil := solve( {f(r0,f0)=0,g(r0,f0)=0}, {r0,f0} );
>
The qualitative analysis of the equilibrium solutions can be performed as in Unit 23. Since no numeric values are assigned to the parameters, minor modifications are required to eliminate the plots and to improve the quality of the output. The result is
> U := [ R(t), F(t) ]:
> for X0 in [equil] do
> b := eval( [ f(r0,f0), g(r0,f0) ], X0 );
> A := eval( evalm(jacobian( [f(r0,f0),g(r0,f0)], [r0,f0] )), X0 );
> linsys1 := equate( diff( U, t ), evalm( A &* U + b ) );
> print( `-------------------------------------------------------------` );
> print( `Linearization at [r0,f0]`=eval([r0,f0],X0) );
> print( A = evalm( A ) );
> print( lambda = [evalf(eigenvals( A ))] );
> print( `-------------------------------------------------------------` );
> end do:
>
Thus, the trivial equilibrium at the origin is a saddle point. At the equilibrium solution in the first quadrant, the linearized system is a center so it is not possible to classify this critical point for the nonlinear system.
To perform a graphical investigation of the predator-prey system, select numerical values for the parameters
> param1 := { alpha=4.5, beta=0.9, delta=0.16, epsilon=0.08, R[0]=4, F[0]=3 };
>
and obtain a numerical solution to the IVP
> sol1 := dsolve( eval( { sys1, ic1 }, param1 ), U, type=numeric );
>
A plot of the two components of this system is
> odeplot( sol1, [ [t,R(t)], [t,F(t)] ], 0..20, numpoints=250, legend=["Rabbits", "Foxes"] );
>
This suggests that solutions to the predator-prey system might be periodic. A second test of this conjecture can be made with a plot of the solution in the phase plane
> odeplot( sol1, [ R(t), F(t) ], 0..20, numpoints=250 );
>
The direction field suggests that the periodic nature of solutions is a general property of predator-prey systems that does not depend on the initial conditions.
> DEplot( {eval( sys1, param1 )}, U, t=0..20, [ [eval(ic1, param1 )] ], stepsize=0.2 );
>
Note that all solutions appear to be counter-clockwise closed orbits that enclose the nontrivial equilibrium solution (
,
) = ( 2, 5 ).
> eval( equil, param1 );
>
While this example is far from a proof, it is true that all solutions to the predator-prey system are periodic. Most introductory texts in differential equations contain a detailed analysis of the predator-prey model.
There are many variations of the standard Lotka-Volterra model for a predator-prey system. For example, the exponential growth/decay that occurs in the absence of the other species can be replaced with a logistic or Gompertz model. The classic May model is another example of a variation of a predator-prey system.
>
[Back to ODE Powertool Table of Contents]
>