Chapter 4
Chapter 4
terms of one or more preceding terms 𝑎1 , 𝑎2 , 𝑎3 , … . 𝑎𝑛 . Moreover, the sequence is called the
solution to the recurrence relation if it satisfies the recurrence relation.
𝑎𝑛 = 2𝑎𝑛−1 + 1 , 𝑛 ≥ 2 (1)
For (1) we would need one initial value to find a particular or single 𝑎𝑛 . For example, if 𝑎0 = 1
then 𝑎1 = 3 and 𝑎2 = 7.
For (2) we would need two initial values to find a particular or single 𝑎𝑛. For example, if 𝑎0 = 1
and 𝑎1 = 5 then 𝑎2 = 19 and 𝑎3 = 65.
Example 1: Verify that the solution of the recurrence relation 2𝑎𝑛−1 + 1 , 𝑛 ≥ 2 with 𝑎0 = 0
is 𝑎𝑛 = 2𝑛 − 1
Solution: We have to do two things
a) Check that the given formula gives the correct initial value
b) Check that the given formula solves the recurrence relation.
b) We evaluate 2𝑎𝑛−1 + 1 using the given formula and show that it is equal to 𝑎𝑛 .
Consider 𝑎𝑛 = 2𝑛 − 1
𝑎𝑛−1 = 2𝑛−1 – 1 so
2𝑎𝑛−1 + 1 = 2(2𝑛−1 – 1) + 1 = 2𝑛 − 1
1
Example 2: Solve the following 𝑎𝑛 = 2𝑎𝑛−1 + 1, 𝑛 ≥ 2, 𝑐
𝑛−1
1 − 2𝑛−2+1
𝑎𝑛 = 2 𝑎1 ( )
1−2
𝑎𝑛 = 2𝑛−1 (3 + 1) − 1
𝑎𝑛 = 2𝑛−1 (22 ) − 1
𝑎𝑛 = 2𝑛−1 (22 ) − 1 is the required ′𝑛′th term.
Exercises 1:
1. Let 𝑎𝑛 = 2𝑎𝑛−1 + 𝑎𝑛−2 with 𝑎0 = 1 and 𝑎1 = 1. Find 𝑎2 , 𝑎3 , 𝑎4 and 𝑎5 .
2. Verify that the solution of the recurrence relation 𝑎𝑛 = 3𝑎𝑛−1 with 𝑎0 = 4 is 𝑎𝑛 = 4(3)𝑛 .
2
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓 (𝑛) (3)
where 𝑐1 , 𝑐2, … , 𝑐𝑘 are real numbers, and 𝑐𝑘 ≠ 0. If 𝑓(𝑛) is identically zero (𝑓(𝑛) = 0) in the
recurrence relation (3) defined above, then the recurrence relation (3) is called homogeneous,
otherwise it is called nonhomogeneous.
Example 1:
a) 𝑎𝑛 + 6𝑎𝑛−1 = 0 is linear homogeneous recurrence relation with constant coefficient of
degree (order) 1.
b) 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 = 0 is linear homogeneous recurrence relation with constant
coefficient of degree (order) 2.
Example 2: Determine which of these are linear homogenous recurrence relations with constant
coefficients. Also, find the degree of these that are.
Yes, degree is 3
b) 𝑎𝑛 = 2𝑛𝑎𝑛−1 + 𝑎𝑛−2
c) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−4
Yes, degree is 4
d) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎 + 2
2
e) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2
f) 𝑎𝑛 = 𝑎𝑛−2
g) 𝑎𝑛 = 𝑎𝑛−1 + 𝑛
3
4.3 Solutions of linear recurrence relations
The recurrence is linear because the all the “𝑎𝑛 ” terms are just the terms (not raised to some
power nor are they part of some function). So 𝑎𝑛 = 2𝑎𝑛−1 is linear but 𝑎𝑛 = 2(𝑎𝑛−1 )2is not.
a) 𝑎𝑛 = 2𝑎𝑛−1 𝑓𝑜𝑟 𝑛 ≥ 1, 𝑎𝑛 = 3
By using Theorem 3 with 𝑘 = 1, we have 𝑎𝑛 = 𝛼2𝑛 for some constant 𝛼. To find 𝛼, we can
use the initial condition, 𝑎0 = 3, to find it.
3 = 𝛼20
3 = 𝛼. 1
3=𝛼
4
b) 𝑎𝑛 = 𝑎𝑛−1 𝑓𝑜𝑟 𝑛 ≥ 1, 𝑎0 = 2
2 = 𝛼10
2=𝛼
So the solution is 𝑎𝑛 = 2. 1𝑛 . But we can simplify this since 1𝑛 = 1 for any n, so our solution
is 𝑎𝑛 = 2 for any 𝑛.
When both side of the equation is divided by 𝑟 𝑛−𝑘 we obtain the equation
𝑟 𝑘 + 𝑐1 𝑟 𝑘−1 + 𝑐2 𝑟 𝑘−2 + ⋯ + 𝑐𝑘−1 𝑟 + 𝑐𝑘 = 0 (5)
of the last equation (5), which is called the characteristic equation of the recurrence relation
(4). The solutions of the characteristic equation (5) are called characteristic roots of the
recurrence relation (4). As we will see, these characteristic roots can be used to give an explicit
formula for all the solutions of the recurrence relation (4).
Let us first see the rule to find all the possible solutions (general solution) homogeneous
recurrence relation with constant coefficients of degree 1.
All the possible solutions or general solution to the linear homogenous recurrence relation with
constant coefficient of degree 1
𝑎𝑛 + 𝑐𝑎𝑛−1 = 0
is 𝑎𝑛 = 𝛼 (−𝑐 )𝑛 , where 𝛼 is a constant.
5
Theorem 1: Consider a linear homogeneous recurrence relation with constant coefficient of
degree 2
𝑎𝑛 + 𝑐1𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 = 0 (6)
for 𝑛 ≥ 2, where 𝑐1 and 𝑐2 are constants, and consider its characteristic equation
𝑟 2 + 𝑐1 𝑟 + 𝑐2 = 0 (7)
Case 1: If the characteristic equation (7) has two distinct roots 𝑟1 and 𝑟2 , then the sequence
{𝑎𝑛 }∞
𝑛=0 is the solution of the recurrence relation (6) if and only if
𝑎𝑛 = 𝛼1 𝑟1𝑛 + 𝛼2 𝑟2𝑛
Where 𝛼1 and 𝛼2 are constants.
𝑟2 − 𝑟 − 2 = 0
⇒ (𝑟 + 1)(𝑟 − 2) = 0
So 𝑟 = −1 and 𝑟 = 2. Thus, the characteristic equation has two distinct roots 𝑟 = −1 and 𝑟 = 2
Hence, the general solution is
𝑎𝑛 = 𝛼1 (−1)𝑛 + 𝛼2 (2)𝑛
Where 𝛼1 and 𝛼2 are constants.
Solution:
𝑎𝑛 = −7𝑎𝑛−1 − 12𝑎𝑛−2
⇒ 𝑎𝑛 + 7𝑎𝑛−1 + 12𝑎𝑛−2 = 0
6
Thus, the characteristic equation is
𝑟 2 + 7𝑟 + 12 = 0
and finding the roots of the characteristic equation using quadratic formula or factorization, we
have 𝑟 = −3 and 𝑟 = −4 . Hence, the general solution is
𝑎𝑛 = 𝛼1 (−3)𝑛 + 𝛼2 (−4)𝑛
Where 𝛼1 and 𝛼2 are constants.
Putting 𝑛 = 0 and 𝑛 = 1 in 𝑎𝑛 = 𝛼1 (−3)𝑛 + 𝛼2 (−4)𝑛 and using the initial conditions gives, we
have
𝛼1 + 𝛼2 = 0
−3𝛼1 − 4𝛼2 = 5
Hence,
𝑎𝑛 = 5(−3)𝑛 − 5(−4)𝑛
is the solution.
𝑎𝑛 = 𝑎𝑛−1 + 2𝑎𝑛−2
with 𝑎0 = 2 and 𝑎1 = 7?
𝑟1 = −1 and 𝑟2 = 2
𝑎𝑛 = (−1)𝑛+1 + 3 ∙ 2𝑛 .
7
Example 4: Solve the recurrence relation 𝑎𝑛 = 5𝑎𝑛−1 − 6𝑎𝑛−2 , 𝑛 ≥ 2, 𝑎0 = 1, 𝑎1 = 5.
Solution: 1) Rewriting the recurrence relation 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 = 0, the characteristic
equation is 𝑟 2 − 5𝑟 + 6 = 0.
The roots are 𝑟1 = 2 and 𝑟2 = 3 we have the general solution
𝑎𝑛 = 𝛼1 𝑟1𝑛 + 𝛼2 𝑟2𝑛
(for constants 𝛼1 and 𝛼2 ) to the recurrence 𝑎𝑛 = 5𝑎𝑛−1 − 6𝑎𝑛−2 .
Using 𝑎0 = 1 and 𝑎1 = 5, we get a specific solution. From the first initial condition we get,
1 = 𝑎0 = 𝛼1 (20 ) + 𝛼2 (30 ) = 𝛼1 + 𝛼2 .
From the second, we get 5 = 𝑎1 = 𝛼1 (2) + 𝛼2 (3) = 2𝛼1 + 3𝛼2 .
Solving these, we get 𝛼2 = 3 and 𝛼1 = −2. So the specific solution to our recurrence
relation is
𝑎𝑛 = −2(2𝑛 ) + 3(3𝑛 ) = −2𝑛+1 + 3𝑛+1
Example 5: Solve the recurrence relation 𝑎𝑛 = 7𝑎𝑛−1 − 10𝑎𝑛−2 = 0 with 𝑎0 = 2 and 𝑎1 = 3.
Solution: Rewrite the recurrence relation 𝑎𝑛 = 7𝑎𝑛−1 − 10𝑎𝑛−2 = 0 . Now form the characteristic
equation:
𝑟 2 − 7𝑟 − 10 = 0
(𝑟 − 2)(𝑟 − 5) = 0
So 𝑟1 = 2 and 𝑟2 = 5 are the characteristic roots. We therefore know that the solution to the
recurrence relation will have the form
𝑎𝑛 = 𝛼1 2𝑛 + 𝛼2 5𝑛
To find 𝛼1 and 𝛼2 , plug in 𝑛 = 0 and 𝑛 = 1 to get a system of two equations with two
unknowns:
2 = 𝛼1 20 + 𝛼2 50 = 𝛼1 + 𝛼2
3 = 𝛼1 21 + 𝛼2 51 = 2𝛼1 + 5𝛼2
7 1
Solving this system gives 𝑎 = 3 and 𝑏 = − 3 so the solution to the recurrence relation is
8
7 1
𝑎𝑛 = 2𝑛 − 5𝑛
3 3
Case II: If the characteristic equation (7) has only one root 𝑟0 , then the sequence {𝑎𝑛 }∞
𝑛=0 is the
Case III: If the characteristic equation (7) has complex root, then the sequence {𝑎𝑛 }∞
𝑛=0 is the
Example 7: Solve the recurrence relation 𝑎𝑛 = 2𝑎𝑛−1 − 2𝑎𝑛−2 with initial conditions 𝑎0 =
𝑎1 = 1.
Solution: There characteristic equation is 𝑟 2 − 2𝑟 + 2 = 0, which has roots
𝑟 = 1 ± √−1 = 1 ± 𝑖
So our general solution is
𝑎𝑛 = 𝛼1 (1 + 𝑖 )𝑛 + 𝛼2 (1 − 𝑖 )𝑛
9
We now find the specific solution. For one, we have 1 =𝑎0 = 𝛼1 + 𝛼2 ,
so 𝛼2 = 1 − 𝛼1. From the second initial condition, we have
𝑎1 = 1 = 𝛼1 (1 + 𝑖 ) + 𝛼2 (1 − 𝑖 ) = 𝛼1 (1 + 𝑖 ) + (1 − 𝛼1 )(1 − 𝑖 ) = 2𝛼1 𝑖 + 1 − 𝑖
1
Solving give 𝛼1 = 𝛼2 = , so we get the specific solution
2
1 1
𝑎𝑛 = (1 + 𝑖 )𝑛 + (1 − 𝑖 )𝑛
2 2
Summary of general solutions
1 2 𝑟1 ≠ 𝑟2 𝑎𝑛 = 𝛼1 𝑟1𝑛 + 𝛼2 𝑟2𝑛
3 2 𝑟 = 𝛼 ± 𝑖𝛽 𝑎𝑛 = 𝛼1 (1 + 𝑖 )𝑛 + 𝛼2 (1 − 𝑖 )𝑛
where 𝑐1 , 𝑐2, … , 𝑐𝑘 are constants and 𝑐𝑘 ≠ 0 and 𝑓(𝑛) is a function not identically zero
depending only on 𝑛. The recurrence relation
is called the associated homogenous recurrence relation. It plays an important role in the solution
of the nonhomogeneous recurrence relation.
Example 1: The following are linear nonhomogeneous recurrence relations with constant
coefficients:
10
1) 𝑎𝑛 = 𝑎𝑛−1 + 2𝑛
2) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 𝑛2 + 𝑛 + 1
3) 𝑎𝑛 = 3𝑎𝑛−1 + 𝑛3𝑛
4) 𝑎𝑛 =𝑎𝑛−1 +𝑎𝑛−2 +𝑎𝑛−3 +𝑛!
Theorem 2: Consider the linear nonhomogeneous recurrence relations with constant coefficients
of degree 𝑘
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛)
𝑎𝑛 − 4𝑎𝑛−1 = − 15 , 𝑓𝑜𝑟 𝑛 ≥ 1
Solution: The given recurrence relation is of the form 𝑎𝑛 − 4𝑎𝑛−1 = 𝑓(𝑛) , where 𝑓(𝑛) = −15.
(𝑝)
We choose particular solution 𝑎𝑛 = 𝑞, where 𝑞 is a constant. Then, we have to find 𝑞 by
(𝑝)
substituting 𝑎𝑛 in to the given recurrence relation, that is
(𝑝) (𝑝)
𝑎𝑛 − 4𝑎𝑛−1 = −15
(𝑝) (𝑝)
Observe that 𝑎𝑛 = 𝑞 and 𝑎𝑛−1 = 𝑞. Thus, we have −4𝑞 = − 15.
⟹ −3𝑞 = −15 ⟹ 𝑞 = 5
(𝑝)
Hence, 𝑎𝑛 =5 is the particular solution of the recurrence relation.
11
Example 3: Solve 𝑎𝑛 = 2𝑎𝑛−1 + 7 ∙ 5𝑛 for 𝑛 ≥ 1 and 𝑎0 = 4.
Solution: First we find the general solution to the corresponding homogeneous recurrence 𝑎𝑛 −
2𝑎𝑛−1 = 0. This has characteristic equation 𝑟 − 2 = 0 which has root 𝑟 = 2 so we have the
general solution
(ℎ)
𝑎𝑛 = 𝛼1 · 2𝑛 .
Now we want a particular solution to 𝑎𝑛 − 2𝑎𝑛−1 = 7 ∙ 5𝑛 . Lets guess that there is one of the
form 𝐶5𝑛 . Plugging into the recurrence relation, we get
𝐶5𝑛 − 2𝐶 ∙ 5𝑛−1 = 7 ∙ 5𝑛
35
which is true if and only if 𝐶 · 5 − 2𝐶 = 35, 𝑜𝑟 𝐶 = . So
3
(𝑝) 35 𝑛
𝑎𝑛 = 5
3
is a solution to the recurrence.
The general solution to the recurrence is thus
(ℎ) (𝑝) 35 𝑛
𝑎𝑛 = 𝑎𝑛 + 𝑎𝑛 = 𝛼1 · 2𝑛 + 5
3
Using the initial conditions we now find the specific solution. We have
35 35
4 =𝑎0 = 𝛼1 · (20 ) + (50 ) = 𝛼1 + ,
3 3
which gives
23
𝛼1 = − 3 .
12