Growth of two conflicting populations

 

by Reinaldo Baretti Machín

 

Home page

http://www1.uprh.edu/rbaretti

http://www1.uprh.edu/rbaretti/methodsoftheoreticalphysics.htm

 

For questions and suggestions write to:

reibaretti2004@yahoo.com

  Free counter and web stats

 References :

 1. Introduction to Nonlinear Differential and Integral Equations by Harold T. Davis ,  page  207 .

Suppose two populations x and y interact such that

                                       dx/dt = a x - b y                                                  ,     (1)

                                       dy/dt = c x - a y                                           .            (2)

Since the quantities  x and y can become negative they do not represent the total population. They stand for an excess or deficiency of a population with respect to an unspecified level  Nx, Ny

The constants   a , b and c have dimensions ~ 1/time . They define three time scales according to the relations

ta = 1/a    , tb =1/b    , tc =1/c .  ∆t has to be small relative to these scales.

The initial conditions are x0 and y0 .   The finite difference solutions are

                                                  xn = xn-1 +  ( ∆t ) { a xn-1 - b y n-1 }              (3)

                                                  yn = yn-1 +  ( ∆t ) { c xn-1 - a y n-1 }    .         (4)

 

Example of population oscillations.

Let a =1/year  , B=3.0/year    c=2/year  with initial conditions   x(0)= 300   , y(0)=200.

Fig 1. Oscillation of x and y populations. 

FORTRAN code

c growth of two conflicting populations 3 abril 2010
data a,b,c /1.,3.0, 2./
data x0,y0 / 300.,200./
ta=1./a
tb=1./b
tc=1./c
tsmall=amin1(ta,tb,tc)
dt=tsmall/200.
tlarge=amax1(ta,tb,tc)
tfinal=5.*tlarge
nstep=int(tfinal/dt)
kp=int(float(nstep)/80.)
kount=kp
print 100, 0., x0,y0
do 10 i=1,nstep
t=dt*float(i)
x1=x0+dt*( a*x0 - b*y0 )
y1=y0+dt*(c*x0 - a*y0 )
if(i.eq.kount)then
print 100, t, x1, y1
kount=kount+kp
endif
x0=x1
y0=y1
10 continue
100 format('t,x,y=',3(3x,e10.3))
stop
end