Discrete Difference Equations From Mathematics For The Life Sciences
Discrete Difference Equations From Mathematics For The Life Sciences
These notes discuss how we can use sequences from data or from theory to determine how
biologically relevant variables change. One of the main objectives is to learn how to use mathe-
matical formulae to describe a sequence and what the long-term implications are for the variable
being measured. One example is using your sequence of heights measured from birth to age 10
to predict what your adult height would be. Note that we are using height as an example rather
than weight because adult height is much more constrained, and does not change much over
adulthood, as compared to body weight (you might consider why this is so).
Year Count
Year Count Year Count Year Count
1998 5439
1959 2206 1972 3696 1985 5359
1999 4367
1960 2297 1973 4989 1986 4321
2000 6045
1961 2650 1974 3779 1987 5044
2001 4632
1962 2277 1975 4552 1988 3092
2002 6974
1963 2242 1976 3872 1989 5388
2003 4528
1964 2213 1977 4049 1990 4079
2004 6875
1965 2567 1978 4037 1991 4416
2005 5154
1966 3152 1979 3475 1992 4828
2006 6631
1967 2186 1980 4448 1993 4291
2007 7051
1968 2998 1981 3660 1994 4861
2008 4882
1969 2628 1982 5141 1995 4662
2009 6896
1970 3450 1983 4890 1996 4827
2010 6190
1971 2829 1984 3500 1997 4377
2011 6739
Table 1: Data collected by Tennessee birders for the Audubon Christmas Bird Count. Data
reflects the total count of Northern Cardinals sighted in Tennessee.
Cardinals: Birders in Tennessee have reported seeing the Northern Cardinal (Cardinalis
cardinalis) since 1959. The numbers reported are given in the Table 1. We could make a
sequence out of this data. If an represents the count at year n, where n = year − 1959 then,
a0 = 2206, a1 = 2297, a3 = 2650, . . . , a50 = 6896, a51 = 6190, a52 = 6739.
This particular sequence has 53 terms in the sequence.
A real sequence is a function f : N → R with domain being the natural numbers N and the
range being contained in the real numbers R. We write an = f (n) and call an the nth term in
the sequence.
2
EXAMPLE: Sequence
2n
Suppose we defined the sequence an = f (n) = (−1)n n+1 . Find the first 5 terms of this
sequence.
Solution: We can use the function definition of the sequence to find each term.
2·1
f (1) = (−1) = −1
1+1
2·2 4
f (2) = (−1)2 =
2+1 3
2·3 6 3
f (3) = (−1)3 =− =−
3+1 4 2
2·4 8
f (4) = (−1)4 =
4+1 5
2·5 10 5
f (5) = (−1)5 =− =−
5+1 6 3
Limit of a Sequence
Our objective is to point out how we can use mathematical descriptions of sequences to
analyze the behavior of simple models.
Suppose we have a sequence {an } whose terms are getting closer and closer to L as n gets
larger and larger. Then we say that the limit of the sequence {an } is L. Formally, we write
lim an = L
n→∞
if the the sequence {an } converges to the limit L (a finite number). If the sequence {an } increases
toward infinity or decreases toward negative infinity as n → ∞, then we say that the sequence
{an } does not have a limit. Thus, note that not all sequences have limits.
x0 = 1, x1 = 1
3
xn+1 = f (xn ),
then we say that this sequence is built from a first order difference equation or recurcive
equation. The term ‘first order’ meaning that to find xn+1 , you only need to use the previous
value, xn . Notice, that if we know x0 (the initial value in the sequence) then we can determine
all the terms in the sequence, coming from a first difference equation.
EXAMPLE: Doves
A population of doves increases by 3% each year. Let xn be the size of the population at year
n. Then xn+1 = xn + .03xn = 1.03xn . Thus, the first order difference equation that describes
the population is
xn+1 = 1.03xn .
Notice that if we know x0 , then
x1 = 1.03x0
x2 = 1.03x1 = 1.03(1.03x0 ) = (1.03)2 x0
..
.
xn = (1.03)n x0 .
xn+1 = rxn
x1 = rx0
x2 = rx1 = r(rx0 ) = r2 x0
x3 = rx2 = r(r2 x0 ) = r3 x0
..
.
xn = r n x0
4
The general solution to difference equation represents the xn in terms of x0 , n and other given
constants. For a geometric sequence, the general solution is is
xn = r n x0 .
When 0 < r < 1, the sequence decays to zero. It has a limit of zero, meaning as n get large
(n → ∞), xn → 0. For r > 1, the terms of the sequence increase exponentially.
EXAMPLE: Hares
A population of wild hares increases by 13% each year. Currently, there are 200 hares. If xn
is the number of hares in the population at the end of year n, find
3. the number of hares in the population at the end of six years from now.
2. Using the notation of the definition of a geometric sequence, here r = 1.13, thus the general
solution to the difference equation in (a) is
xn = (1.13)n x0 = 200(1.13)n .
3. For n = 6, x6 = 200(1.13)6 ≈ 416. Thus, at the end of year six there are approximately
416 hares.
If a population increases by a fixed number d each time period, we say the sequence is an
arithmetic sequence,
xn+1 = xn + d.
Suppose we know the intial value x0 , and then the general solution to an arithmetic sequence
is:
x1 = x0 + d
x2 = x1 + d = (x0 + d) + d = x0 + 2d
..
.
xn = x0 + nd.
5
b
Thus, our particular solution is pn = 1−a .
Step 3: Lastly, we form the general solution as the sum of the homogeneous and particular
solutions. That is,
b
xn = can + .
1−a
b b
Notice x0 = c + 1−a , thus c = x0 − 1−a .
To see why building a general solution in this way works, consider two solutions, sn and wn ,
to
xn+1 = axn + b.
6
We have yn solving the homogeneous equation, giving yn = can for a constant c. Any general
solution can be written as sn = can + wn .
Therefore, the general solution to the difference equation is
b b
xn = x0 − an + .
1−a 1−a
xn+1 = axn − b
|{z} (1)
|{z} |{z}
pop. @ t = n + 1 pop growth or decline fixed decrease
Notice that in Equation (1), the population grows or declines first (with the factor a) and
then a fixed amount b is being removed. Thus, this model could represent a population that is
being harvested by a fixed amount at each time step after growth or decline. If the constant b
was being added in the equation, then the difference equation might model a population (after
growth or decline) that was being augmented by a fixed amount each time step (think of a fish
population being restocked each season).
About the order of events: If one harvests the population before the growth happens, then
you would start with this equation:
EXAMPLE: Fisheries
Consider a lake fish population whose yearly birth rate is 1.2, and yearly death rate is 0.7.
Each year, fishing is allowed until 1200 fish are caught. Thereafter, fishing is banned. Currently,
there are 12,230 fish in the lake.
1. Write a difference equation for the lake fish population and find the general solution.
3. If the resource managers of the lake wanted the population to remain constant each year,
what level of harvesting should they allow?
7
Solution: Let xn be the size of the fish population at the end of year n. Then x0 = 12, 230.
2. For n = 5, xn = 9830(1.5)5 + 2400 ≈ 77, 047. Thus, there are approximately 77,047 fish
in the lake after 5 years.
3. To keep the population constant, we would want xn+1 = xn for all n. Specifically x1 = x0 .
Let h be the harvesting level we wish to find. Thus, using x1 = x0 in
x1 = 1.5x0 − h,
x0 = 1.5x0 − h
(1 − 1.5)x0 = −h
−0.5x0 = −h
−0.5(12, 230) = −h
h = 6115
Thus, if the lake resource managers allowed 6115 fish each season to be caught, the fish
population size will remain constant from year to year.
x0 = 0.8x0 + α
8
(1 − 0.8)x0 = α
0.2x0 = α
α = 0.2(12, 230) = 2446
Thus, each year the lake must be stocked with an additional 2,446 fish to maintain a constant
population size.
ln(x)
ln (f (x)) = ln (acx )
= ln a + ln cx
= ln a + x ln c
Does this look like the equation of a line? Look closer using y = ln (f (x)),
constant constant
z}|{ z}|{
ln y = ln a + |{z}
x ln c .
|{z}
variable variable
We see that the y-intercept is ln a and the slope is ln c (if c = e ≈ 2.71828... then ln c = 1).
Notice the original vertical axis variable f (x) has been rescaled to ln (f (x)). Notice also that
we could have just as easily used log instead of ln.
9
Now, consider the allometric (power) function g(x) = axc where a and c are constants.
Again, let us take the natural log of both sides of the equation and see what happens.
ln (g(x)) = ln (axc )
= ln a + ln (xc )
= ln a + c ln x
Again, if we take a closer look we should see the equation of a line using y = (g(x)),
constant
constant
z}|{ z}|{
ln y = ln a + c ln x
|{z}
|{z}
variable variable
where the y-intercept is ln a and the slope is c. Here, in the allometric case, the vertical axis
variable g(x) has been rescaled to ln (g(x)) and the horizontal axis variable has been rescaled
to ln x. Notice this is different from the exponential case in which only the vertical axis was
rescaled.
What is the big picture?
? Given an allometric (power) equation, if we rescale both the x and y axes to be logarithmic,
we get an equation for a line.
Hopefully, looking at the data plotted out, the first observation you make is that the data are
not linearly related. Let us try rescaling the y-axis data on a logarithmic scale. Additionally,
on the horizontal axis, let x = 15 (year − 1940).
x y ln y
Year Bluefish (lbs) Rescaled
0 15,000 9.616
1 150,000 11.918
2 250,000 12.429
3 275,000 12.525
4 270,000 12.506
5 280,000 12.543
6 290,000 12.578
7 650,000 13.385
8 1,200,000 13.998
9 1,500,000 14.221
10 2,750,000 14.827
With the exception of the data point corresponding to the year 1940, the data appear to be
more linearly related when the y-axis data is rescaled. If we fit a least-squares regression line to
this data, we find the equation for the best fit line is
ln y = 0.3797x + 10.8784
where x is the year and y is the pounds of bluefish harvested. We can convert this equation to
an exponential equation:
ln y = 0.3797x + 10.8784
eln y = e0.3797x+10.8784
y = e0.3797x × e|10.8784
{z }
constant
11
Using this equation we could extrapolate how many fish were caught in 2000. First, we compute
1
x= (2000 − 1940) = 12.
5
Then,
y = (53, 019) e0.3797(12) = 5, 049, 529.
Thus, we estimate that in the year 2000, about 5.05 million pounds of blue fish were caught.
EXAMPLE: Mutation Rates
Researchers studying the relationship between the generation time of a species and the
mutation rate for genes that cause deleterious effects gathered the following data.
Generation Genomic
Species Time Mutation Rate
(in years) (per generation)
D. melanogaster/D. pseudoobscura 0.1 0.070
D. melanogaster/D. simulans 0.1 0.058
D. picticornis/D. silvestris 0.2 0.071
Mouse/rat 0.5 0.50
Chicken/old world quail 2 0.49
Dog/cat 4 1.6
Sheep/cow 6 0.90
Macaque/New World Monkey 11 1.9
Human/chimpanzee 25 3.0
Let x = the generation time and y = the genomic mutation rate. If we rescale both the
vertical and the horizontal axes then we have the following data
12
ln x ln y
-2.3 -2.659
-2.3 -2.847
-1.6 -2.645
-0.7 -0.693
0.7 -0.713
1.4 0.470
1.8 -0.105
2.4 0.642
3.2 1.099
If we fit a least-squares regression line to this data, we find the equation for the best fit line
is
ln y = 0.7097 ln x − 1.0316.
We can convert this equation to an allometic (power function) equation using the properties of
logarithms and exponentials,
ln y = ln x0.7097 − 1.0316
0.7097 −1.0316
eln y = eln x
0.7097 −1.0316
eln y = eln x e
0.7097 −1.0316
y = x e
y = 0.3564x0.7097 .
Using this equation, if we knew a certain species had a generation time of 5 years, we could
interpolate the genomic mutation rate of this species,
y = 0.3564(10)0.7097 = 0.1827.
Thus, we would estimate that this particular species has a genomic mutation rate of 0.1827
mutations per generation.
Exercise 1.
Warm blooded animals use large quantities of energy to maintain body temperature because
of heat loss through body surface. In fact, biologists believe that the primary energy drain on a
resting warm blooded animal is the maintenance of body temperature. The table below shows
the body weights in grams (g) and pulse rates in beats per minute (bpm) for nine different bird
species.
13
(a) Make a hypothesis about how you think body weight and pulse rate are related in birds?
How might your hypothesis explain birds maintaining their body heat.
(b) What type of function (linear, exponential, or allometric (power)) best describes the rela-
tionship between the weight and pulse rate data? Explain. Find the equation for the the
function that best describes the data as y in terms of x.
Exercise 2.
Researchers measured the diameters of 20 trees in a central Amazon rain forest and used
14
C-dating to determine the ages of these trees. The data are given in the following table.
(a) Make a scatter plot of age on the vertical axis and diameter on the horizontal axis/
(b) What type of function (linear, exponential, or allometric) best describes the relationship
between the age and diameter data? Explain. Write the function for y in terms of x.
Exercise 3.
In an attempt to measure how the pace of city life is related to the size of the city, two
researchers measured the mean speed of pedestrians in 15 cities by measuring the mean time it
took them to walk 50 feet.
14
(a) Plot the original pairs of numbers (x, y). Is the pattern linear or nonlinear?
(c) Plot y against ln x. Are the data more linear now than in part (a)?
(d) Compute R2 for y against ln x. Is R2 closer to 1 than in part (b)? What does this say about
how the data are related?
(e) Find the equation for the least squares regression line of y against ln x.
Partial answers
Exercise 1
(a) As weight increases, then pulse decreases. Pulse rates can affect the maintaining of body
heat.
(b) allometric, ln(y) = −0.28 ln x + 7.5 and y = x0.28 e7.5
Exercise 2
allometric, y = 1.24x1.23 .
Exercise 3
(a) Nonlinear,
(b) R2 = 0.584,
(c) Yes, the data looks more linear,
(d) R2 = 0.845 which is close to 1 which means the original data are not linearly related,
(e) y = 0.410 ln x − 0.307.