You are on page 1of 16

Boyce/DiPrima 10th ed, Ch 2.

9:
First Order Difference Equations
Elementary Differential Equations and Boundary Value Problems, 10 th edition, by William E. Boyce and Richard C. DiPrima, ©2013 by John Wiley & Sons, Inc.

• Although a continuous model leading to a differential equation


is reasonable and attractive for many problems, there are some
cases in which a discrete model may be more appropriate.
Examples of this include accounts where interest is paid or
charged monthly rather than continuously, applications
involving drug dosages, and certain population growth
problems where the population one year depends on the
population in the previous year. For example,
yn1  f (n, yn ), n  0 ,1, 2, ...
• Notice here that the independent variable n is discrete. Such
equations are classified according to order, as linear or
nonlinear, as homogeneous or nonhomogeneous. There is
frequently an initial condition describing the first term y 0 .
Difference Equation and Equilibrium
Solution
• Assume for now that the state at year n +1 depends only on the
state at year n, and not on the value of n itself
yn1  f ( yn ), n  0 ,1, 2, ...
• Then
y1  f ( y0 ), y2  f ( y1 )  f ( f ( y0 )), y3  f ( y2 )  f 3 ( y0 ),  , yn  f n ( y0 )
• This procedure is referred to as iterating the difference and it is
often of interest to determine the behavior of y n as n →∞.
• An equilibrium solution exists when
yn  f ( yn )
and this is often of special interest, just as it is in differential
equations.
Linear Homogeneous Difference Equations

• Suppose that the population of a certain species in a region in


year n +1 is a positive multiple of the population in year n:
yn1  n yn , n  0 ,1, 2, ...
• Notice that the reproduction rate may differ from year to year.
y1  0 y0 , y2  1 y1  10 y0 , , yn  n1  10 y0
• If the reproduction rate has the same value ρ for all n:
y n   n y0
• If the initial value y 0 is zero, then the equilibrium solution = 0
• Otherwise  0 if   1  asymptotic stability

lim yn   y0 if   1
n 
does not exist if  1 or   1  unstable

Adding/Subtracting a Term to the Equation

• Suppose we have a net increase in population each year:


yn1   yn  bn , n  0 ,1, 2, ...
• Then iterating this:
y1   y0  b0 ,
y2   y1  b1   (  y0  b0 )  b1   2 y0   b0  b1 ,
y3   y2  b2   (  2 y0   b0  b1 )   3 y0   2b0   b1  b2 ,
n 1
yn   y0   b0     bn2  bn1   y0    n1 j b j
n n 1 n

j 0
• If the migration is constant (b) each year:
yn   n y0  (  n 1      1) b
• And as long as ρ ≠ 1, we can use the geometric series formula to get:
1  n  b  b
y n   y0 
n
b  n
 y0  
  1 
1   1  
 b  b
yn   n  y0   
 1   1 

Conditions for an Equilibrium

• Letting n →∞ in the equation for y n we get:


 

lim yn  lim  n  y0 
n  n 

b
1 

 
b
 1 
• Recall that ρ ≠ 1. If it were, the sequence would become:
yn  y0  nb   as n  
b
• If |ρ|<1, lim   0 , so yn 
n
, an equilibrium solution.
n  1 
• If |ρ|>1 or if ρ =-1, lim  n does not exist, so the lim y n fails
n n
to exist unless
b
y0   the solution starts at its equilibriu m and stays there.
1 
 b  b
yn   n  y0   
 1   1 

Example 1: Extending the Model


• If we have a $10,000 car loan at an annual interest rate of 12%, and we
wish to pay it off in four years by making monthly payments (-b), we
can adapt the previous result as follows:
yn  loan balance ($) in the n th month, y0  10,000
0.12 b
  1  1.01, 1    0.01,  100b
12 1 
 b  b
yn   n  y0     1.01n (10,000  100b)  100b
 1   1 
• To pay the loan off in four years, we set y48  0 and solve for b:
y48  1.0148 (10,000  100b)  100b  0 
1.0148
b  100  263.34
1.01  1
48

• The total amount paid on the loan is 48(263.34)=$12,640.32, so the amount


of interest paid is $2640.32.
Nonlinear Difference Equations

• As is the case with differential equations, nonlinear difference


equations are much more complicated and have much more varied
solutions than linear equations.
• We will analyze only the logistic equation, which is similar to the
logistic differential equation discussed in 2.5.
yn
yn1   yn (1  ), n  0 ,1, 2, ...
k
Letting un  yn / k , u n 1   un (1  un )
• Seeking the equilibrium solution yields:
u n   un (1  un )   un   un 
2

 1
u n  0 or u n 

• Are either of these equilibrium solutions asymptotically stable?
 1
u n  0 or u n 

Examining Points Near Equilibrium Solutions


• For the first equilibrium solution of zero, the quadratic term ≈ 0:
Near u n  0, u n 1   un   un   un  u n 1   un
2

• We have already examined this equation and concluded that for |ρ|
< 1, the solution is asymptotically stable.
• We will now consider solutions near the second equilibrium:
 1
Let u n   vn where vn is assumed to be small so quadratic term  0,

 vn 1  (2   )vn   vn  (2   )vn
2
after simplifyin g u n 1 expression 
 vn 1  (2   )vn
• From our previous discussion, we can conclude that v n  0 provided
|2 – ρ| < 1 or 1 < ρ < 3. So, for these values of ρ, we can conclude that
the solution is asymptotically stable.
Solutions for Varying Initial States and
Parameter Values Between 0 and 3 (1 of 2)
n un
0 0.3 un+1=0.8un(1-un)
1 0.168 0.35
2 0.111821 0.3 y 0  0.3,   0.8
3 0.079454 0.25
4
5
0.058513
0.044071
0.2
0.15
  1  un  0
6 0.033703 0.1
7 0.026054 0.05
8 0.0203 0
9 0.01591 0 2 4 6 8 10 12
10 0.012526

n un
0 0.8 un+1=1.5un(1-un)
1 0.24 1
2 0.2736
0.8 y0  0.8,   1.5
3 0.298115
4 0.313863 0.6
  1 0.5 1
5 0.32303 0.4 1    3  un   
6 0.328022
0.2
 1.5 3
7 0.330636
8 0.331974 0
9 0.332651 0 2 4 6 8 10 12
10 0.332991
Solutions for Varying Initial States and
Parameter Values Between 0 and 3 (2 of 2)
n un
0 0.3 un+1=2.8un(1-un)
1 0.588
0.678317
0.8 y 0  0.3,   2.8
2
3 0.610969 0.6   1 1.8
4 0.665521 1    3  un    0.6429
5 0.623288
0.4  2.8
6 0.65744 0.2
7 0.630595
8 0.652246 0
9 0.6351 0 2 4 6 8 10 12
10 0.648895

n un
0 0.9 un+1=2.8un(1-un)
1 0.252 1
2 0.527789
0.8 y0  0.9,   2.8
3 0.697838

  2.8 as above  u n  0.6429


4 0.590409 0.6
5 0.677114 0.4
6 0.612166
0.2
7 0.664773
8 0.62398 0
9 0.656961 0 2 4 6 8 10 12
10 0.631017
Summary of Asymptotic Stability Intervals

• We found that the difference equation u n 1   un (1  un ) has two


 1
equilibrium solutions: u n  0 or u n 

• Considering nonnegative values of the parameter ρ, the first
equilibrium solution required that 0 ≤ ρ <1, while the second
equilibrium solution required that 1 < ρ < 3. there is an
exchange of stability from one equilibrium solution to the
other at ρ = 1. This is demonstrated in the chart below:
u
1.0

0.8

0.6
u=(ρ-1)/ρ
0.4

0.2
u=0
0.5 1.0 1.5 2.0 2.5 3.0
0.2
exchange of stability at ρ = 1
0.4
Solutions of the Difference Equation That Do
Not Approach an Equilibrium (1 of 4)
n un
0 0.3
Below is an example of a 2-cycle. Notice how as n
1 0.672 increases, the value of un alternates between two
2 0.705331
3 0.665085 values (0513 and 0.799).
4 0.71279
5 0.655105 ρ = 3.2 and y0 = 0.3
6 0.723016
7 0.640845
8 0.736521
9 0.620986
10 0.75316 un+1=3.2un(1-un)
11 0.594912
0.9
12 0.771173
13 0.564688 0.8
14 0.78661 0.7
15 0.537136 0.6
16 0.795587 0.5
17 0.520411 0.4
18 0.798667 0.3
19 0.514554
0.2
20 0.799322
0.1
21 0.5133
22 0.799434 0
23 0.513086 0 5 10 15 20 25 30
24 0.799452
Solutions of the Difference Equation That Do
Not Approach an Equilibrium (2 of 4)
n
n
un
u(n)
Below is an example of a 4-cycle. Notice how as n
0 0.3 increases, the value of un alternates between four
1 0.735 values (0.3828, 0.5009, 0.8269, 0.8750).
2 0.681713
3 0.759432
4 0.639433
ρ = 3.5 and y0 = 0.3
⋯ ⋯
12 0.392152
13 0.834291 un+1=3.5un(1-un)
14 0.483873
1
15 0.87409
0.9
16 0.385199
0.8
17 0.828873 0.7
18 0.49645 0.6
19 0.874956 0.5
20 0.382928 0.4
21 0.82703 0.3
22 0.50068 0.2
23 0.874998 0.1
24 0.382817 0
25 0.826938 0 5 10 15 20 25 30
26 0.50089
27 0.874997
28 0.38282
Solutions of the Difference Equation That Do
Not Approach an Equilibrium (3 of 4)
• Notice from the preceding graphs how the behavior of the solution
to the difference equation u n 1   un (1  un ) behaves rather
unpredictably when ρ > 3. First, at ρ = 3.2, we saw the sequence
oscillate between two values, creating a period of two. Then, at ρ =
3.5, the terms in the sequence were oscillating among four values,
creating a period of 4. It is actually around ρ = 3.449 that this
doubling of the period occurs and this is called a point of
bifurcation. As ρ increases slightly further, periodic solutions of
period 8, 16, … occur.
• By the time we reach ρ > 3.57, the solutions possess some regularity,
but no discernible detailed pattern is present for most values of ρ.
The term chaotic is used to describe this situation. One of the
features of chaotic solutions is extreme sensitivity to the initial
conditions. This is demonstrated on the following slide.
Chaotic Solutions (4 of 4)

• Below are two solutions to u n 1  3.65 un (1  un )


• The gray solution corresponds to the initial state y0  0.300
• The brown solution corresponds to the initial state y0  0.305
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 10 20 30 40 50 60
What Chaotic Solutions May Suggest

• On the basis of Robert May’s analysis of the nonlinear


equation we have considered
u n 1   un (1  un ) and similarly y'  ry(1 - y)
as a model for the population of certain insect species, we
might conclude that if the growth rate ρ is too large, it will be
impossible to make effective long-range predictions about
these insect populations.
• It is increasingly clear that chaotic solutions are much more
common than was suspected at first, and that they may be part
of the investigation of a wide range of phenomena.

You might also like