You are on page 1of 22

BITS Pilani

Pilani Campus

MATH F213
Linear Recurrence Relations
Solutions of inhomogeneous
linear recurrence relations
We want to solve the inhomogeneous recurrence relation(IHR)
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + … + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛); n ≥ 𝑘, 𝑐𝑘 ≠ 0.

𝑓(𝑛) is called the forcing function of the IHR (in analogy with
inhomogeneous linear differential equations).

BITS Pilani, Pilani Campus


Relation with homogeneous
recurrence relation
Note that for the homogenous recurrence relation, we saw
that the generating function 𝐴∗ (𝑋) satisfies
𝑄(𝑋) 𝐴∗ 𝑋 = P X .
For the IHR, the generating function satisfies

𝐴 𝑋 𝑄 𝑋 = 𝑃 𝑋 + ෍ 𝑓 𝑛 𝑋𝑛,
𝑛=𝑘
σ∞
𝑛=𝑘 𝑓 𝑛 𝑋
𝑛
i.e. 𝐴 𝑋 = 𝐴∗ 𝑋 + .
𝑄(𝑋)
Thus the general form of the solution of IHR is obtained by
adding to the general form of corresponding
homogeneous relation the coefficient of 𝑋 𝑛 in
σ∞
𝑛=𝑘 𝑓 𝑛 𝑋
𝑛
.
𝑄(𝑋)
BITS Pilani, Pilani Campus
Theorem

Suppose the IHR with constant coefficients is


𝑎𝑛 + 𝑐1 𝑎𝑛−1 + … + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛); n ≥ 𝑘, 𝑐𝑘 ≠ 0 and the HR
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + … + 𝑐𝑘 𝑎𝑛−𝑘 = 0; n ≥ 𝑘, 𝑐𝑘 ≠ 0 is the associated
homogeneous relation.
𝑃 ∞ 𝑃 ∞
1. If 𝑎𝑛1 𝑛=0
and 𝑎𝑛2 𝑛=0
are to solutions of the IHR then
𝑃1 𝑃2 ∞
𝑎𝑛 − 𝑎𝑛 𝑛=0 is a solution of HR.
𝑃1 ∞
2. If 𝑎𝑛 𝑛=0 is a solution of IHR and 𝑎𝑛𝐻 ∞𝑛=0 is a solution of the HR,
𝑃1 ∞
𝐻
then 𝑎𝑛 + 𝑎𝑛 𝑛=0 is a solution of IHR.
𝐻1 ∞ 𝐻𝑘 ∞
3. If 𝑎𝑛 𝑛=0 , … , 𝑎𝑛 𝑛=0 are solutions of HR and 𝐶1 , … , 𝐶𝑘 are
𝐻1 𝐻𝑘 ∞
arbitrary constants, then 𝐶1 𝑎𝑛 + ⋯ + 𝐶𝑘 𝑎𝑛 𝑛=0 is also a solution
of the HR.

BITS Pilani, Pilani Campus


Proof

We can prove the theorem just by verifying the


corresponding recurrence relations, assuming the
premises. For example, let us prove 2.
𝑃1 ∞
𝑎𝑛 𝑛=0 is a solution of IHR implies
𝑃1 𝑃1 𝑃1
𝑎𝑛 + 𝑐1 𝑎𝑛−1 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 𝑓(𝑛). (1)
𝑎𝑛𝐻 ∞𝑛=0 is a solution of the HR implies
𝐻 𝐻
𝑎𝑛𝐻 + 𝑐1 𝑎𝑛−1 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 = 0. (2)
𝑃 ∞
Adding (1) and (2) term by term, we see that 𝑎𝑛1 + 𝐻
𝑎𝑛 𝑛=0
satisfies of IHR.

BITS Pilani, Pilani Campus


Method to solve IHR with
given initial conditions
• Find the general form of the solution of corresponding
HR. We have seen this using characteristic roots.
• Find one solution of IHR. How?
• Adding these we get the general form of a solution of
IHR. Determine the values of the arbitrary constants
which satisfy the required initial conditions.

BITS Pilani, Pilani Campus


Example
Solve the IHR 𝑎𝑛 − 5𝑎𝑛−1 + 6𝑎𝑛−2 = 4𝑛 , n ≥ 2.
Solution : Using the method of generating functions, let
𝐴 𝑋 = σ∞ 𝑎
𝑛=0 𝑛 𝑋 𝑛
. Then, as before,
σ∞ 𝑛 𝑛
𝑛=2 4 𝑋 𝑎0 + 𝑎1 − 5𝑎0 𝑋
𝐴 𝑋 = 2
+ 2
= 𝑇1 + 𝑇2 .
1 − 5𝑋 + 6𝑋 1 − 5𝑋 + 6𝑋
σ∞ 𝑛 𝑛
𝑛=2 4 𝑋 42 𝑋 2
Now 𝑇1 = =
1−5𝑋+6𝑋 2 (1−4𝑋)(1−5𝑋+6𝑋 2 )
𝐶 𝐷 𝐸
= + + for some constants C, D, E.
1−4𝑋 1−2𝑋 1−3𝑋
But the terms in partial fractions of 𝑇2 are exactly last two
terms of 𝑇1 with 𝐷, 𝐸 arbitrary constants. Hence by
absorbing last two terms of 𝑇1 in 𝑇2 we get
𝐶
𝐴 𝑋 = + 𝑇2 .
1 − 4𝑋
BITS Pilani, Pilani Campus
As 𝑇2 is the generating function of ℎ 𝑛 , the solution has
form C4𝑛 + ℎ 𝑛 = 𝐶𝑓 𝑛 + ℎ 𝑛 , where
ℎ 𝑛 is the general form of HR,
f 𝑛 is the RHS of the IHR,
C is a suitable constant.
To determine C, we substitute the solution 𝐶𝑓 𝑛 in IHR to
get a condition in C.

BITS Pilani, Pilani Campus


Another Example

Find the general form of a solution of IHR 𝑎𝑛 − 5𝑎𝑛−1 +


6𝑎𝑛−2 = 2𝑛 .
Here the generating function of 𝑎𝑛 is given by
σ∞𝑛=2 2 𝑛𝑋𝑛 𝑃(𝑋)
𝐴 𝑋 = +
(1 − 2𝑋)(1 − 3𝑋) (1 − 2𝑋)(1 − 3𝑋)
22 𝑋 2 𝑃(𝑋)
= 2
+ .
(1 − 2𝑋) (1 − 3𝑋) (1 − 2𝑋)(1 − 3𝑋)
22 𝑋 2 𝐴 𝐵 𝐶
Now = + + .
(1−2𝑋)2 (1−3𝑋) (1−2𝑋)2 (1−2𝑋) (1−3𝑋)
The last 2 terms of the last line can be absorbed into the
2nd term of 𝐴 𝑋 , the generating function of the general
form of the HR.

BITS Pilani, Pilani Campus


𝑛 𝐴
Coefficient of 𝑋 in the power series expansion of
(1−2𝑋)2
is A(𝑛 + 1)2𝑛 . Again absorbing a part of it in the general
form of the solution of HR, we get a form of a particular
solution of the IHR as 𝐶𝑛2𝑛 .
The constant C can be determined by substituting the
solution in IHR to get a condition on C.
The squared factor in the denominator occurred because 2
was already a simple root of 𝐶 𝑡 . If 2 were a root of 𝐶 𝑡
of multiplicity s, then the term in the generating function,
𝐴
not covered by the generating function of HR, is 𝑠+1
(1−2𝑋)
and hence the coefficient of 2𝑛 will involve 𝐶 𝑠 + 𝑛, 𝑠 𝐴, a
polynomial of degree 𝑠 in 𝑛, whose lower terms can be
absorbed in the solution of HR leaving 𝐶𝑛 𝑠 2𝑛 as the form.
BITS Pilani, Pilani Campus
Method of undetermined
coefficients
• The experience from preceding 2 examples lead to a
method to find a particular solution analogous to the
situation of inhomogeneous linear differential equations
with constant coefficients.
• Depending on the RHS 𝑓(𝑛) of IHR a form of particular
solution (trial solution) containing an undetermined
constant is guessed. By substituting it in the IHR, the
constant is determined.

BITS Pilani, Pilani Campus


Trial Solution for exponentials

Assume 𝑓 𝑛 = 𝐷𝑎𝑛 for some constants 𝐷, 𝑎


If 𝑎 is not a root of 𝐶 𝑡 ,
i.e. if 𝐶 𝑎 ≠ 0, 𝑡ℎ𝑒𝑛 𝑎 𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 ℎ𝑎𝑠 𝑓𝑜𝑟𝑚
𝑎𝑛𝑃 = 𝐶𝑎𝑛 𝑓𝑜𝑟 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝐶 𝑡𝑜 𝑏𝑒 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑑.
𝐶 can be determined by forcing 𝑎𝑛𝑃 to satisfy the IHR.

If 𝑎 is a root of 𝐶(𝑡) of multiplicity 𝑚, then


𝑎 𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 ℎ𝑎𝑠 𝑓𝑜𝑟𝑚
𝑎𝑛𝑃 = 𝐶𝑛𝑚 𝑎𝑛 𝑓𝑜𝑟 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝐶 𝑡𝑜 𝑏𝑒 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑑

BITS Pilani, Pilani Campus


p. 322 Ex #1 (e)

Find a particular solution of IHR by method of


undetermined coefficients :
𝑎𝑛 − 3𝑎𝑛−1 + 2𝑎𝑛−2 = 3𝑛 .
Solution : 𝐶 𝑡 = 𝑡 2 − 3𝑡 + 2. We have 𝐶 3 = 2 ≠ 0.
So we try 𝑎𝑛 = 𝐴3𝑛 , constant 𝐴 to be determined.
Substituting, 𝐴3𝑛 − 3𝐴3𝑛−1 + 2𝐴 3𝑛−2 = 3𝑛 .
9 9
Solving, we get 𝐴 = = .
9−9+2 2
9 𝑛
Thus a particular solution is 𝑎𝑛 = 3 .
2

BITS Pilani, Pilani Campus


p. 323 #1 (g)

Find a particular solution of an IHR


𝑎𝑛 − 3𝑎𝑛−1 + 2𝑎𝑛−2 = 2𝑛 .
Solution : 𝐶 𝑡 = 𝑡 2 − 3𝑡 + 2. We have that 2 is a simple
root of 𝐶 𝑡 .
Thus we try 𝑎𝑛 = 𝐴𝑛2𝑛 , constant 𝐴 to be determined.
Substituting, 𝐴𝑛2𝑛 − 3𝐴 𝑛 − 1 2𝑛−1 + 2 𝑛 − 2 𝐴2𝑛−2 = 2𝑛 .
Thus 𝐶 2 𝑛2𝑛 + 3 2𝑛−1 − 4(2𝑛−2 ) 𝐴 = 2𝑛 .
4
Since 𝐶 2 = 0, we get 𝐴 = = 2.
6−4
Thus 𝑎𝑛 = 2𝑛2𝑛 is a particular solution of the given IHR.

BITS Pilani, Pilani Campus


Trial solution for polynomial
times an exponential
Let 𝑓 𝑛 = 𝑃0 + 𝑃1 𝑛 + ⋯ + 𝑃𝑠 𝑛 𝑠 𝑎𝑛 .
If 𝐶 𝑎 ≠ 0, 𝑡ℎ𝑒𝑛 𝑎 𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑜𝑓 𝑡ℎ𝑒 𝐼𝐻𝑅 ℎ𝑎𝑠 𝑓𝑜𝑟𝑚
𝑎𝑛𝑃 = 𝐴0 + 𝐴1 𝑛 + ⋯ + 𝐴𝑠 𝑛 𝑠 𝑎𝑛
𝑓𝑜𝑟 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡𝑠 𝐴𝑖 𝑡𝑜 𝑏𝑒 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑑.
If 𝑎 is a root of 𝐶(𝑡) of multiplicity 𝑚 , then
𝑎 𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑜𝑓 𝑡ℎ𝑒 𝐼𝐻𝑅 ℎ𝑎𝑠 𝑓𝑜𝑟𝑚
𝑎𝑛𝑃 = 𝑛𝑚 𝐴0 + 𝐴1 𝑛 + ⋯ + 𝐴𝑠 𝑛 𝑠 𝑎𝑛
𝑓𝑜𝑟 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡𝑠 𝐴𝑖 𝑡𝑜 𝑏𝑒 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑑.

BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus
Trial solution for polynomials

This is just a special case of previous case with 𝑎 = 1.


So if 𝑓 𝑛 𝑖𝑠 𝑎 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙 𝑜𝑓 𝑑𝑒𝑔𝑟𝑒𝑒 𝑠, 𝑡𝑟𝑦
𝑎𝑛 = a polynomial of degree s if 𝐶(1) ≠ 0.
If 1 𝑖𝑠 𝑎 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑖𝑐𝑖𝑡𝑦 𝑘 𝑜𝑓 𝐶 𝑡 , 𝑡𝑟𝑦
𝑎𝑛 = 𝑛𝑘 a polynomial of degree s .

BITS Pilani, Pilani Campus


p. 324 #7

Find the complete solution to 𝑎𝑛 + 2𝑎𝑛−1 = 𝑛 + 3; 𝑛 ≥ 1 and


with 𝑎0 = 3.
Solution : Here 𝐶 𝑡 = 𝑡 + 2 has root −2. Since
recurrence relation is of degree 1, the general solution of
corresponding HR is
𝑎𝑛𝐻 = 𝐶(−2)𝑛 ; 𝑛 ≥ 0, 𝐶 an arbitrary constant.
To find a particular solution, since 𝑓 𝑛 = (𝑛 + 3)1𝑛 and
𝐶(1) ≠ 0, trial solution is 𝑎𝑛𝑃 = (𝐴𝑛 + 𝐵)1𝑛 = 𝐴𝑛 + 𝐵,
where 𝐴, 𝐵 are constants to be determined.
Substituting 𝑎𝑛𝑃 , 𝐴𝑛 + 𝐵 + 2 𝐴 𝑛 − 1 + 𝐵 = 𝑛 + 3.
Hence comparing coefficients, 3𝐴 = 1, −2𝐴 + 3𝐵 = 3.
𝑛 11
Thus 𝑎𝑛𝑃 = + .
3 9
BITS Pilani, Pilani Campus
This gives the general solution of the IHR as
𝑛
𝑛 11
𝑎𝑛 = 𝐶(−2) + + .
3 9
The arbitrary constant 𝐶 is determined using the initial
11
condition 𝑎0 = 3. This gives 3 = 𝐶 + . Hence the
9
complete solution of the given problem is
16 𝑛
𝑛 11
𝑎𝑛 = (−2) + + .
9 3 9

BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus
Superimposition Principle
𝑃1
If 𝑓 𝑛 = 𝛼𝑔 𝑛 + 𝛽ℎ(𝑛) is the RHS of an IHR and if {𝑎𝑛 }
𝑃
and {𝑎𝑛2 } are particular solutions of the IHR with same
LHS but RHS’s 𝑔 𝑛 and ℎ(𝑛) respectively, then
𝑃 𝑃
{𝛼𝑎𝑛1 + 𝛽𝑎𝑛2 } is a particular solution of the given IHR.

BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus

You might also like