Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Deterministic Changes - Chapter 5 of Heinz
Mathematical Modeling, Spring 2019Dr. Doreen De Leon
1 Introduction - Section 5.1 of Heinz
Our plan now is to use mathematics to explain changes in variables. There are two standardways to do this: using difference equations and using differential equations. In this chapter,we will focus on difference equations.
Example 1.1 (Simple Example). Consider the value of a savings account initially openedwith $1,000 that accrues interest paid each month at a rate of 1% per month. If an representsthe amount of money in the account at time interval n, where t = 0 + n and a0 = 1000, wesee that
a1 = 1000 + 1000(0.01) = 1010
a2 = 1010 + 1010(0.01) = 1020.30
...
an = an−1 + 0.01an−1 = 1.01an−1. (1.1)
Equation (1.1) is an example of a difference equation.
2 Linear Changes - Section 5.2 of Heinz
The simplest linear difference equation is a first-order linear difference equation. Assumingthat y0 is given, then
yn = ayn−1 + b, n = 1, 2, . . . , (2.1)
where a and b are any parameter.
Notes:
1
1. Equation (2.1) may also be written as
yn − yn−1 = (a− 1)yn−1 + b,
so (2.1) gives us a formula for changes of yn.
2. The equation is linear because it is linear in yn and yn−1. This is similar to the idea oflinear differential equations in that we can show that
L = (a− 1)yn−1
is a linear operator, as defined in a linear algebra class.
2.1 Solving Linear First-Order Difference Equations
Simple Case: b = 0
Consider the homogeneous linear first-order difference equation, where y0 is given:
yn = ayn−1, n = 1, 2, . . . .
The first few solutions have the form
y1 = ay0
y2 = ay1 = a2y0
y3 = ay2 = a3y0...
yn = any0.
The general solution is, thus,yn = any0, n = 1, 2, . . . .
Notes:
1. If |a| > 1, then limn→∞
|yn| =∞.
2. If |a| < 1, then limn→∞
yn = 0.
3. If |a| = 1, then |yn| = |y0| for all n ∈ N. If a = 1, then yn = y0 for all n, but if a = −1,then yn oscillates between y0 and −y0.
2
General Case: b 6= 0
Consider the homogeneous linear first-order difference equation, where y0 is given:
yn = ayn−1 + b, n = 1, 2, . . . . (2.2)
The first few solutions have the form
y1 = ay0 + b
y2 = ay1 + b
= a(ay0 + b) + b
= a2y0 + ab+ b
y3 = ay2 + b
= a(a2y0 + ab+ b) + b
= a3y0 + a2b+ ab+ b
= a3y0 + b(a2 + a+ 1)
y4 = ay3 + b
= a(a3y0 + b(a2 + a+ 1)) + b
= a4y0 + b(a3 + a2 + a+ 1)
...
yn = any0 + b(an−1 + an−1 + · · ·+ a+ 1).
You may recognize the sum an−1 + an−1 + · · ·+ a+ 1 as
1− an
1− a.
We can easily show this by letting Pn = an−1 + an−2 + · · ·+ a+ 1. Then aPn = an + an−1 +· · ·+ a2 + a, and
Pn − aPn = 1− an,
and so
Pn =1− an
1− a.
Therefore, the solution of (2.2) is
yn = any0 + b
(1− an
1− a
), n = 1, 2, . . . .
Notes:
3
1. The solution obtained above is not defined if a = 1. In that case, the solution is
yn = y0 + nb.
(Verify.)
2. If n = −1, then we see yn oscillates between y0 and −y0 + b. (Verify.)
3. If |a| > 1, then it is not clear what limn→∞
yn is, as this depends on the sign of y0 and b.
4. If |a| < 1, then yn →b
1− aas n→∞.
2.2 Equilibrium Values and Stability
Definition 2.1. A real number y is an equilibrium value, or fixed point, of a first-orderdifference equation yn = f(yn−1) if yn = y for all n = 1, 2, 3, . . . whenever y0 = y. In otherwords, yn = y is a constant solution of the difference equation.
To determine the equilibrium values (solutions), simply set yn = yn−1 = y and solve y = f(y).
Definition 2.2. Let y be the equilibrium solution of a first-order difference equation yn =f(yn−1).
• The equilibrium solution is stable if limn→∞
yn = y as n→∞ for any y0.
• The equilibrium solution is unstable if limn→∞
yn = ±∞ for any y0.
• In all other cases, the equilibrium solution is neither stable nor unstable.
Example 2.1. Find (a) the solution and (b) the equilibrium solution for each of the followingdifference equations. Analyze the stability of the equilibrium solution.
1. yn = 3yn−1, y0 = 1
2. yn =3
4yn−1, y0 = 64
3. yn = 2yn−1 − 1 y0 = 3
4. yn = −yn−1 + 2, y0 = −1
Solution:
4
1. (a) The general solution of the difference equation is yn = 3ny0. Therefore, thesolution is yn = 3n.
(b) The equilibrium solution is found by solving y = 3y, giving y = 0.
The equilibrium solution is unstable, since yn →∞ as n→∞.
2. (a) The general solution of the difference equation is yn =
(3
4
)ny0. Therefore, the
solution is
yn = 64
(3
4
)n.
(b) The equilibrium solution is found by solving y =3
4y, giving y = 0.
The equilibrium solution is stable since yn → 0 as n→∞.
3. (a) The general solution of the difference equation is
yn = 2ny0 + (−1)
(1− 2n
1− 2
),
oryn = 2(2n) + 1.
(b) The equilibrium solution is found by solving y = 2y − 1, or y = 1.
This equilibrium solution is unstable, because yn →∞ as n→∞.
4. (a) The value of the solution of the difference equation oscillates between y0 = −1and −y0 + 2 = 3. We see this because
y1 = −y0 + 2 = 1 + 2 = 3
y2 = −y1 + 2 = −3 + 2 = −1 = y0
y3 = −y2 + 2 = −(−1) + 2 = 3
y4 = −y3 + 2 = −1
...
The solution may be expressed as
yn =
{−1, if n is even
3, if n is odd..
More compactly, we can write
yn = 2(−1)n(−1) + 1 = 2(−1)n+1 + 1.
(b) The equilibrium solution is obtained by solving y = −y + 2, giving y = 1.
Since the limit as n→∞ of yn does not exist, the equilibrium solution is neither stablenor unstable.
5
2.3 A Simple Discrete One-Species Population Model
Consider the population of one species in a region, e.g., the number of people in the world,the number of pine trees in a forest, or the number of bacteria in an experiment. We willignore any differences in the individuals that make up the group (i.e., gender, age, etc.).
In many situations involving a large number of members of a species, it is reasonable toapproximate the population size P (t) as a continuous function of time, perhaps by fitting asmooth curve through the data, since most populations are measured periodically (e.g., thecensus in the U.S.).
In modeling the population growth of a species, we must consider what factors affect thatpopulation. For example, the population of sharks in the Adriatic Sea will depend on thenumber of fish available for the sharks to consume (if there are none, the sharks could becomeextinct). In addition, the presence of a harmful bacteria will negatively impact the sharkpopulation. There are other factors that may also be significant, e.g., water temperatureand salinity.
For simplicity, we first study a simple species, one that is not affected by any others. Sucha species might be part of a lab experiment.
Here, we will discuss one of the simplest models of population growth of a species. Supposemeasurements have been taken over an interval of time 4t. The rate of change of thepopulation as measured over the time interval 4t is
4P4t
=P (t+4t)− P (t)
4t.
This number indicates the absolute rate of increase of the population. The growth rateper unit time of the population, R(t), as measured over the time interval 4t is
R(t) =P (t+4t)− P (t)
4tP (t).
If the growth rate and initial population were known, then the population at later timescould be calculated as
P (t+4t) = P (t) +4tR(t)P (t).
Assuming that the population of the species only changes due to births and deaths (i.e.,ignoring the possibility of migration into and out of the area), we see that
P (t+4t) = P (t) + (# of births)− (# of deaths).
We may define the reproductive beirth rate b and the death rate d as
b =# of births
4tP (t)and d =
# of deaths
4tP (t).
6
Then, the population at a time t+4t is
P (t+4t) = P (t) +4t(b− d)P (t),
so the growth rate R = b− d.
Since we are considering the total population in a region, the birth and death rates areaverages, averaged over the entire population (i.e., not considering age as a factor). Themodel we are now developing may be modified to account for an age distribution.
As a first step in our model, we assume that the number of births and number of deaths areproportional to the total population, so the growth rate is constant, and we have, letting nrepresent the nth time interval, n4t, and n = 0 represent t = t0,
Pn − Pn−1 = R4tP (t),
orPn = (1 +R4t)Pn−1.
Given an initial population size P (t0) = P0, we may determine the population at futuretimes:
P1 = (1 +R4t)P0
P2 = (1 +R4t)P1 = (1 +R4t)2P0
...
Pn = (1 +R4t)nP0.
2.4 Other Examples
Example 2.2 (Simple Investment Annuity). Consider an annuity that is being preparedfor retirement purposes. An annuity is a savings account that pays interest on the amountin the account and allows the investor to withdraw a fixed amount from the account eachmonth until the account is emptied. Suppose the monthly interest paid on the account is1% of the account balance and the owner wants to withdraw $1,000 from the account for 20years before the account is emptied. How much must the initial investment be?
Solution: Let yn be the amount of money in the account after n months. Then
yn = 1.01yn−1 − 1000,
which has a general solution
yn = (1.01)ny0 + (−1000)
(1− (1.01)n
1− 1.01
),
7
oryn = (1.01)ny0 + 10000(1− (1.01)n).
In order to have $1,000 in the account at the end of 20 years, or 240 months, we need
1000 = y240 = (1.01)240y0 + 10000(1− (1.01)240).
Solving for y0 givesy0 = 90819.42.
Therefore, the initial investment in the account should be $90,819.42.
Example 2.3 (Drug Dosage). Suppose that a doctor prescribes a drug for a patient, tellingher to take one pill containing 100 mg of a certain drug every four hours. Assume that thedrug is immediately absorbed into the bloodstream once taken and that every four hoursthe patient’s kidneys eliminate 25% of the drug that is in her bloodstream. If the patientinitially had 0 mg of the drug in her bloodstream prior to taking the first pill, how much ofthe drug will be in the bloodstream after 72 hours? Use the five-step modeling process.
Solution: Step 1: Identify the Problem Determine the relationship between the amountof drug in the bloodstream and time.
Step 2: Identify Relevant Facts and Make Simplifying Assumptions
Variables
• yn - the amount of drug in the bloodstream after n time periods.
• n - the number of 4-hour time periods
Assumptions
• The patient is of normal size and health.
• There are no other drugs being taken that will affect the prescribed drug.
• The drug is completely absorbed into the bloodstream immediately after being in-gested.
• There are no internal or external factors that will affect the drug absorption rate.
• The kidneys eliminate 25% of the drug in the bloodstream after four hours.
• The patient always takes the prescribed dosage at the correct time.
8
Step 3: Construct the Model The change in the amount of drug in the bloodstreamover the previous time period, given by yn − yn−1 is equal to the dose minus the loss fromthe system, or 100− 0.25yn−1 (since 100 mg is taken and 25% of what was previously in thebloodstream has been eliminated). This gives the model
yn − yn−1 = −0.25yn−1 + 100,
oryn = 0.75yn−1 + 100.
Step 4: Solve and Interpret the Model The general solution of this is
yn = (0.75)ny0 + 100
(1− 0.75n
1− 0.75
),
oryn = 400(1− 0.75n).
Therefore, after 72 hours, n =72
4= 18, so the patient has
y18 = 400(1− 0.7518) = 397.745 mg in her bloodstream.
Interpretation: Note that the equilibrium solution for this equation is y = 400 and we caneasily see that yn → 400 as n → ∞, so y = 400 is a stable equilibrium. Provided that 400mg is a safe and effective dosage level of this drug, then the given dosage schedule of 100 mgper hour is acceptable.
Note: We can also solve the difference equation directly using Maple (see the worksheetdeterministic change.mw).
3 Linear Changes with Delays – Section 5.3 of Heinz
The second type of difference equation considered in our textbook is the second-order lineardifference equation. In this case, we assume that initial values y0 and y1 are given. Then,for n = 2, 3, . . . , yn are determined by
yn = Ayn−1 +Byn−2 + C,
where A,B,C are model parameters. Note that we may also write this equation in terms ofthe differences yn − yn−1:
yn − yn−1 = (A− 1)yn−1 +Byn−2 + C.
9
3.1 Solution of Linear Second-Order Difference Equations
Linear Homogeneous Second-Order Difference Equations
Consider the difference equation given by
yn = Ayn−1 +Byn−2.
This is a homogeneous difference equation, because it can be written as
yn − Ayn−1 −Byn−2 = 0.
Theorem 3.1. If xn and yn are two solutions of the homogeneous linear difference equation
yn = Ayn−1 +Byn−2,
then so is any linear combination of xn and yn.
To find the general solution, try a solution inspired by the solution to a homogeneous linearfirst-order difference equation, yn = rn, where r is a constant to be determined. Thenyn−1 = rn−1 and yn−2 = rn−2, so we obtain
rn − Arn−1 −Brn−2 = 0.
Multiplying both sides by r2−n gives the quadratic equation, which we may call the charac-teristic equation,
r2 − Ar −B = 0.
Then
r =A±√A2 + 4B
2.
There are three possibilities for the solutions.
Case 1: A2 + 4B > 0 In this case, we obtain two distinct real roots, r1 and r2, and thegeneral solution is given by
yn = c1rn1 + c2r
n2 ,
where c1 and c2 are determined from the initial values y0 and y1.
Case 2: A2 + 4B = 0 In this case, we obtain one distinct real root, r =A
2, and every
solution has the formyn = c1r
n + c2nrn.
Case 3: A2 + 4B < 0 In this case, we obtain complex conjugate roots,
r1,2 =A
2± i√−(A2 + 4B)
2= α± iβ.
10
The general form of the solution is
yn = c1rn1 + c2r
n2 ,
but
rn1 = (α + iβ)n
= (Reiθ)n
= Rneinθ,
where
R =√α2 + β2
θ = arctan
(β
α
).
Similarly,rn2 = Rne−inθ.
Therefore, the solution may be written as
yn = c1Rneinθ + c2R
ne−inθ,
or
yn = c1Rn(cos(nθ) + i sin(nθ)) + c2R
n(cos(nθ)− i sin(nθ))
= Rn ((c1 + c2) cos(nθ) + i(c1 − c2) sin(nθ))
= Rn(d1 cos(nθ) + d2 sin(nθ)).
So, if A2 + 4B < 0, the solution takes the form
yn = Rn (c1 cos(nθ) + c2 sin(nθ)) ,
where
R =√α2 + β2 =
1
2
√A2 − (A2 + 4B)
=1
2
√−4B
=√−B,
tan θ =β
α=
√−(A2 + 4B)
A.
Note: In the third case, the solutions oscillate, which may be more easily seen by writingthe solution in the form
yn = CRn cos(nθ + ω),
where C =√c21 + c22 and tanω = c1/c1. The amplitude of the oscillations is CRn, so if
|R| < 1 the oscillations are damped and if |R| > 1, the oscillations increase in amplitude toinfinity.
11
Linear Nonhomogeneous Second-Order Difference Equations
To find a general solution of the nonhomogeneous equation, we apply the following theorem.
Theorem 3.2. The general solution of a linear nonhomogeneous second-order differenceequation
yn + ayn−1 + byn−2 = cn,
where a and b are constants, is given by
yn = sn + zn,
where sn is a general solution of the corresponding homogeneous equation and zn is a solutionof the nonhomogeneous equation.
Linear nonhomogeneous second-order difference equations are solved similarly to differentialequations in the case where the inhomogeneity is simple. We wish to solve equations of theform
yn = Ayn−1 +Byn−2 + C,
so the inhomogeneity is C, a constant. One solution to this equation is simply
zn =C
1− A−B, provided 1− A−B 6= 0.
If 1− A−B = 0, then we try a solution of the form zn = an, obtaining
an = Aa(n− 1) +Ba(n− 2) + C,
soan(1− A−B) + a(A+ 2B) = C,
ora(n(1− A−B) + (A+ 2B)) = C.
Since 1− A−B = 0, we obtain
a =C
A+ 2B=
C
−A+ 2,
giving
zn =Cn
−A+ 2, provided A 6= 2.
If 1−A−B = 0 and A = 2, then the solution has the form zn = an2. Substituting this intothe difference equation gives
zn =Cn2
2.
12
Examples
Find a solution for the following second-order difference equations.
1. yn = −2yn−1 + 3yn−2, y0 = 1, y1 = 2
Solution: The characteristic equation is
r2 + 2r − 3 = 0,
yielding r = 1 and r = −3. Therefore, the general solution is
yn = c11n + c2(−3)n = c1 + c2(−3)n.
Next, we find c1 and c2 using the initial values for yn.
1 = y0 = c1 + c2
2 = y1 = c1 − 3c2
. Solving gives c2 = −1
4and c1 =
5
4. Therefore, the solution is
yn =5
4− 1
4(−3)n.
2. yn = 4yn−1 − 4yn−2 + 1, y0 = −1, y1 = 0
Solution: The characteristic equation is
r2 − 4r + 4 = 0,
giving one root, r = 2. The homogeneous solution is then
sn = c12n + c2n2n.
The particular solution, zn is given by
zn = 1,
since 1 − A − B = 1 − 4 − (−4) = 1 6= 0. Therefore, the general solution of thenonhomogeneous equation is given by yn = sn + zn, or
yn = c12n + c2n2n + 1.
Find c1 and c2 using the initial values for yn.
−1 = c1 + 1
0 = 2c1 + 2c2 + 1
. Solving gives c1 = −2 and c2 =3
2. Therefore, the solution is
yn = −2(2n) +3
2n(2n) + 1.
13
3.2 Example: Two Competitive Species
The simplest model for two species competing for the same resources assumes:
(i) a constant growth rate for each population in the absence of the other species; and
(ii) interactions between the two species are not significant.
Therefore, letting xn represent the population of the first species in year n and yn thepopulation of the second species in year n, the model for this situation has the form
xn = axn−1 + byn−1 (3.1)
yn = cxn−1 + dyn−1, (3.2)
where a, b, c, d are all constants. Assuming that ad− bc 6= 0, we can re-write this system asa second-order difference equation in terms of the first species, which we may then solve anduse to determine the population of the second species. We may solve (3.1) for yn−1:
yn−1 =1
b(xn − axn−1).
This implies that
yn =1
b(xn+1 − axn),
and so substitution into (3.2) gives
1
b(xn+1 − axn) = cxn−1 + dyn−1
= cxn−1 +d
b(xn − axn−1),
or
xn+1 = (a+ d)xn − (ad− bc)xn−1,
which we may re-write as
xn = (a+ d)xn−1 − (ad− bc)xn−2,
a second-order difference equation, which we may solve using Maple. The results are veryunpleasant. Let’s consider a specific example, where the constants and initial populationsof each species are known. So, assume
• a = d = 1;
14
• b = −0.1 and c = −0.2; and
• x0 = 100 and y0 = 40.
Since y0 = 20, we have that
x1 = by0 + ax0 = −0.1(40) + 1(100) = 96.
Then our second order equation, along with its starting values, is
xn = 2xn−1 + 1.02xn−2, x0 = 100, x1 = 96.
Solving gives
xn =(−10√
2 + 50)(
1 +1
10
√2
)n+(
10√
2 + 50)(
1− 1
10
√2
)n.
Similarly, we may find a linear second-order equation for yn using (3.1) and (3.2):
yn = (a+ d)yn−1 − (ad− bc)yn−2.
Solving this in a similar way, using the initial conditions y0 = 40 and y1 = cx0 + dy0 =−0.1(100) + 40 = 20, gives us the population of the second species,
yn =(−25√
2 + 20)(
1 +1
10
√2
)n+(
25√
2 + 20)(
1− 1
10
√2
)n.
Sincelimn→∞
xn =∞, limn→∞
yn = −∞,
this model predicts that the second species will become extinct.
Note: If a = 1, b = −0.2, c = −0.1 and d = 1.17, then
xn = 100
(23
25
)n, y = 40
(23
25
)n,
andlimn→∞
xn = limn→∞
yn = 0,
and both species become extinct.
15
4 Nonlinear Changes – Section 5.4 of Heinz
4.1 Analyzing Nonlinear First-Order Difference Equations
In this section, we will discuss nonlinear first-order difference equations, i.e., equations ofthe form
yn = f(yn−1),
where f is any function.
For a nonlinear equation, we may be relegated to using qualitative or numerical solutions.Equilibrium solutions y are determined by solving
y = f(y).
Stability of Equilibrium Solutions
To determine the stability of the equilibrium solution, we will perturb the solution by anamount un:
yn = y + un.
Substituting this into the difference equation gives
y + un = f(y + un−1).
To analyze this, we form the Taylor series of the function about y of the right-hand side:
f(y + un−1) == f(y) + un−1f′(y) + · · · .
Thus, we obtainy + un = f(y) + un−1f
′(y) + · · · ,or, since y = f(y), we have
un = un−1f′(y) + · · · .
Assuming that the function f is sufficiently well-behaved, we can neglect the higher orderterms in the Taylor series, giving us a linear first-order difference equation of the form
un = f ′(y)un−1.
As we have seen before, this equation will have a stable equilibrium, u = 0, provided |f ′(y)| <1. Therefore, for sufficiently well-behaved functions f , the equilibrium solutions for
yn = f(yn−1)
will be stable if |f ′(y)| < 1.
16
4.2 Example: Density-Dependent Population Models
The constant growth-rate population model discussed in Section 2.3 predicts that the pop-ulation will grow exponentially without limits if R > 0. Although this may be accuratefor populations in the early stages of their growth, no population can grow without boundindefinitely. Some examples of limiting factors are density-dependent factors including:
• predation: the density of predators should increase, all other factors being equal, asthe density of the prey population increases;
• parasitism: one species benefits while the other is harmed, but not typically killed, sothe population density of the parasite cannot get too large;
• disease: one factor in the spread of the disease is the number of effective contactsamong individuals in the population, another is the accumulation of waste, both ofwhich increase with increasing population;
• intraspecific competition: competition for resources among members of the same species;and
• interspecific competition: competition for resources with member of other species.
Clearly, the growth rate of a population cannot remain constant. In general, then, we expectthe growth rate to depend on the population density, so
Pn − Pn−1 = r(Pn−1)Pn−1,
where r(Pn−1) is the growth rate depending on the population at time step n− 1.
What are the properties we expect r(Pn−1) to have?
• For moderate-sized populations, growth occurs with only slight limitations from thenatural environment.
• As the population size decreases, r(Pn−1) should approach the growth rate in theabsence of environmental limitations (i.e., r(Pn−1)→ R).
• As the population size increases, we expect the population to grow at a smaller ratedue to the density-dependent limiting environmental factors, so r(Pn−1) decreases asPn−1 increases.
• For a population whose size is at the carrying capacity (i.e., largest supported popu-lation) of the environment, K, we expect the growth rate to be 0.
17
• For a population size above this carrying capacity, we expect the growth rate to becomenegative, since the environment cannot support that number of individuals.
The simplest function which has the above properties is the straight line,
r(Pn−1) = R
(1− Pn−1
K
).
This gives the nonlinear first-order difference equation
Pn − Pn−1 = RPn−1
(1− 1
KPn−1
),
or
Pn = (1 +R)Pn−1
(1− R
1 +R
Pn−1K
). (4.1)
Equation (4.1) is the discrete logistic equation.
If we wish to ensure that the model only permits population values that are nonnegative,then it must be true that
Pn−1 ≤(1 +R)K
Rfor all n,
assuming thatR
(1 +R)K> 0. Since K > 0, this means that we need
R
1 +R> 0,
or either R < −1 or 0 < R. If, however,
R
(1 +R)K< 0,
then Pn is always positive as long as 1 +R > 0 (so −1 < R < 0). But in this case, Pn →∞as n→∞, because Pn > Pn−1 for all n. Therefore, we assume that
R
(1 +R)K> 0.
We wish to find the maximum population size, consider Pn = f(Pn−1), where f(Pn−1) is theright-hand side of (4.1), assuming R > 0. Writing f as a continuous function of P , we canfind the value of P for which f(P ) is maximized by solving f ′(P ) = 0, giving
P =1
2
(R + 1)K
R.
18
Since
f ′′(P ) = −2R
K,
and R > 0, then f(P ) is maximum at this value, or f(Pn−1) has a maximum value at
Pn−1 =1
2
(R + 1)K
R,
giving a maximum value of Pn of
Pn =1
4
(R + 1)2K
R.
Therefore, Pn ≥ 0 ifR < −1 or 0 < R < 3.
We cannot solve the discrete logistic equation analytically. However, we can analyticallydetermine the equilibrium solution(s) and analyze their stability. The equilibrium solutionsare obtained by letting Pn = Pn−1 = P and plugging into (4.1), giving.
P = (1 +R)P
(1− PR
(1 +R)K
).
Solving givesP = 0 and P = K.
To determine the stability of these equilibrium solutions, we may use the technique describedin Section 4.1. We have that
f(P ) = (1 +R)
(1− PR
(1 +R)K
).
Then
f ′(P ) = (1 +R)
(1− PR
(1 +R)K
)− PR
K= 1 +R− 2
PR
K.
Sincef ′(0) = 1 +R,
the equilibrium solution P = 0 is stable only if |1 +R| < 1, or −2 < R < 0. Since
f ′(K) = 1−R,
the equilibrium solution P = K is stable only if |1−R| < 1, or 0 < R < 2.
Notes: Depending on the values of R, we can also obtain oscillation between four differentvalues and something known as chaos in which no prediction of the long-term behavior ispossible. As we have seen, chaos can only happen with nonlinear difference equations.
19
5 Difference and Differential Equations – Section 5.5
of Heinz
5.1 When to Model with Difference Equations and When to Modelwith Differential Equations
Some real-world situations lend themselves to modeling directly with difference equations.
Examples include:
• Models related to economics, e.g., models involving
– compound interest, loan repayments, annuities;
– commodity pricing,
• Population theory
– Useful in modeling animals that breed only during a short, well-defined breedingseason, in which the population would be measured in terms of the number ofbreeding seasons.
– Also useful for smaller populations, in which a change in population size of asingle individual makes a significant change in the population.
• Modeling in epidemiology (again, when the population size is sufficiently small).
• Models involving probability theory, such as models using Markov chains.
• Models involving networks.
A drawback of difference equation models is that they cannot be used to model phenomenain which the system changes between time steps, where time steps can vary from fractionsof a second to millions of years. There are, however, situations where changes can occurinstantaneously (or at least can be modeled as if they do so). These include:
• radiocarbon dating;
• population growth
– for populations where breeding is not restricted to certain seasons; or
– for populations where the population size is sufficiently large that continuousmodeling approximates reality well;
20
• epidemiology;
• physics, e.g., modeling a pendulum;
• chemistry, e.g., growth of a crystal; and
• many, many more.
5.2 Differential Equations as Difference Equations
Differential equations arising from mathematical models are not usually solvable analyti-cally. Instead, we may analyze them qualitatively (as we did for difference equations) ornumerically. When we approximate the solution of a differential equation numerically, weobtain a difference equation. Typically, such difference equations are solved using matrices,as opposed to using recursive solutions as we have done in this chapter.
References
[1] William P. Fox, Mathematical Modeling with Maple, Brooks/Cole, 2012.
[2] Frank Giordano, et al., Mathematical Modeling, Fourth Edition, Brooks/Cole, 2009.
[3] Richard Haberman, Mathematical Models: Mechanical Vibrations, Population Dynam-ics, and Traffic Flow, SIAM, 1998.
[4] Edward K. Yeargers, Ronald W. Shonkwiler, and James V. Herod, An Introduction tothe Mathematics of Biology With Computer Algebra Models, Birkhauser, 1996.
21