TOPIC ON LINEAR RECURRENCE RELATIONS
WITH CONSTANT COEFFICIENTS:-
HOMOGEOUS SOLUTIONS,PARTICULAR
SOLUTIONS, TOTAL SOLUTIONS AND
SOLVING RECURRENCE RELATION USING
GENERATING FUNCTIONS
 Introduction to Linear recurrence relations:- order and
degree of recurrence relations.
 Linear recurrence relations with constant coefficients
 Homogenous solutions
 Paticular solutions for homogenous difference
equations
 Particular solutions for non-homogenous difference
equations
 Total solution and example
 Generating functions
 A recurrence relation is a functional relation between the
independent variable x, dependent variable f(x) and the
differences of various order of f (x). A recurrence relation is also
called a difference equation, and we will use these two terms
interchangeably.
 Example1: The equation f (x + 3h) + 3f (x + 2h) + 6f (x + h) + 9f
(x) = 0 is a recurrence relation.
 It can also be written as
 ar+3 + 3ar+2 + 6ar+1 + 9ar = 0 yk+3 + 3yk+2 + 6yk+1 + 9yk = 0
 Example2: The Fibonacci sequence is defined by the recurrence
relation ar = ar-2 + ar-1, r≥2,with the initial conditions a0=1 and a1=1.
 The order of the recurrence relation or difference
equation is defined to be the difference between the
highest and lowest subscripts of f(x) or ar=yk.
 Example1: The equation 13ar+20ar-1=0 is a first order
recurrence relation.
 Example2: The equation 8f (x) + 4f (x + 1) + 8f (x+2) =
k (x)
 The degree of a difference equation is defined to be the
highest power of f (x) or ar=yk
 Example1: The equation y3
k+3+2y2
k+2+2yk+1=0 has the degree
3, as the highest power of yk is 3.
 Example2: The equation a4
r+3a3
r-1+6a2
r-2+4ar-3 =0 has the
degree 4, as the highest power of ar is 4.
 Example3: The equation yk+3 +2yk+2 +4yk+1+2yk= k(x) has the
degree 1, because the highest power of yk is 1 and its order is
3.
 Example4: The equation f (x+2h) - 4f(x+h) +2f(x) = 0 has the
degree1 and its order is 2.
 A Recurrence Relations is called linear if its degree is one.
 The general form of linear recurrence relation with constant
coefficient is
 C0 yn+r+C1 yn+r-1+C2 yn+r-2+⋯+Cr yn=R (n)
 Where C0,C1,C2......Cn are constant and R (n) is same function of
independent variable n.
 A solution of a recurrence relation in any function which satisfies
the given equation.
 The equation is said to be linear non-homogeneous difference
equation if R (n) ≠ 0.
 Example: Solve the difference equation
yK+4+4yK+3+8yK+2+8yK+1+4yK=0.
 Solution: The characteristics equation is s4+4s3+8s2+8s+4=0
(s2+2s+2) (s2+2s+2)=0 s = -1±i,-1±i
 Therefore, the homogeneous solution of the equation is given by
 yK=(C1+C2 K)(-1+i)K+(C3 +C4 K)(-1-i)K
 A linear homogeneous difference equation with constant coefficients is
given by
 C0 yn+C1 yn-1+C2 yn-2+⋯......+Cr yn-r=0 ....... equation (i)
 Where C0,C1,C2.....Cn are constants.
 The solution of the equation (i) is of the form , where ∝1 is the
characteristics root and A is constant.
 Substitute the values of A ∝K for yn in equation (1), we have
 C0 A∝K+C1 A∝K-1+C2 A∝K-2+⋯....+Cr A∝K-r=0.......equation (ii)
 After simplifying equation (ii), we have
 C0 ∝r+C1 ∝r-1+C2 ∝r-2+⋯Cr=0..........equation (iii)
 The equation (iii) is called the characteristics equation of the difference
equation.
 If ∝1 is one of the roots of the characteristics equation, then is a
homogeneous solution to the difference equation.
 To find the solution of the linear homogeneous difference equations, we
have the three cases that are discussed as follows:
 Case1 If the characteristics equation has repeated real roots.
 If ∝1=∝2, then (A1+A2 K) is also a solution.
 If ∝1=∝2=∝3 then (A1+A2 K+A3 K2) is also a solution.
 Similarly, if root ∝1 is repeated n times, then.
 (A1+A2 K+A3 K2+......+An Kn-1)
 The solution to the homogeneous equation.
 Case2: If the characteristics equation has one imaginary root.
 If α+iβ is the root of the characteristics equation, then α-iβ is also
the root, where α and β are real.
 Thus, (α+iβ)K and (α-iβ)K are solutions of the equations. This
implies
 (α+iβ)K A1+(α-iβ)K A2
 Is also a solution to the characteristics equation, where A1 and
A2 are constants which are to be determined.
 Case3: If the characteristics equation has repeated imaginary
roots.
 When the characteristics equation has repeated imaginary
roots,
 (C1+C2 k) (α+iβ)K +(C3+C4 K)(α-iβ)K
 Is the solution to the homogeneous equation
Example1: Solve the difference equation ar-3ar-1+2ar-2 =0
 Solution: The characteristics equation is given by
 s2-3s-1+2s-2 => s2-3s+2=0 or (s-1)(s-2)=0
⇒ s = 1, 2
 Therefore, the homogeneous solution of the equation is
given by
 ar=C 1 +C2.2r or c C 1 (1)K+C2(2)K
 Example2: Solve the difference equation 9yK+2-6yK+1+yK=0.
 Solution: The characteristics equation is
 9s2-6s+1=0 or (3s-1)2=0
⇒ s =1/3,1/3
 Therefore, the homogeneous solution of the equation is given by
yK=(C1+C2 k)(1/3)k
 Example3: Solve the difference equation yK-yK-1-yK-2=0.
 Solution: The characteristics equation is s2-s-1=0
s=1+√5
 2
 Therefore, the homogeneous solution of the equation is
 .
 C1 (1+√5) and C2(1-√5 )
2 2
 (A) Homogeneous Linear Difference Equations and
Particular Solution:
 We can find the particular solution of the difference equation when the
equation is of homogeneous linear type by putting the values of the
initial conditions in the homogeneous solutions.
 Example1: Solve the difference equation 2ar-5ar-1+2ar-2=0 and find
particular solutions such that a0=0 and a1=1.
 Solution: The characteristics equation is 2s2-5s+2=0
(2s-1)(s-2)=0
s = and 2.
 Therefore, the homogeneous solution of the equation is given by
 ar(h)= C1+C2 .2r..........equation (i)
 Putting r=0 and r=1 in equation (i), we get
a0=C1+C2=0...........equation (a)
a1= C1+2C2=1...........equation.(b)
 Solving eq (a) and (b), we have
C1=-2/3and C2=2/3
 Hence, the particular solution is
 Ar(p) =-2/3(1/2)r+2/3.2r
 Example2: Solve the difference equation ar-4ar-1+4ar-2=0
and find particular solutions such that a0=0 and a1=6.
 Solution: The characteristics equation is
s2-4s+4=0 or (s-2)2=0 s = 2, 2
 Therefore, the homogeneous solution of the equation is
given by
ar(n)=(C1+C2 r).2r.............. equation (i)
 Putting r = 0 and r = 1 in equation (i), we get
a0=(C1+0).20 = 1 ∴C1=1
a1=(C1+C2).2=6 ∴C1+C2=3⇒C2=2
 Hence, the particular solution is
ar(P)=(1+2r).2r.
 . Theorems that give us a method for solving non-
homogeneous recurrences are listed below:-
 Theorem 1:- If f(n) is a solution to the associated
homogeneous recurrence, and g(n) is a solution to the non-
homogeneous recurrence, then f(n) + g(n) is also a solution
to the non-homogeneous recurrence.
 Theorem 2:- Suppose the non-homogeneous term is of the
form p(n)sn, where p(n) is a polynomial of degree r and s is a
constant. If s is not a root of the characteristic equation, then
there is a particular solution of the form q(n)sn , where q is a
polynomial of degree at most r. If s is a root of the
characteristic equation of multiplicity t, then there is a
particular solution of the form nt q(n)sn, where q is a
polynomial of degree at most r.
 Theorem 3:- If the non-homogeneous term is of
the form p 1(n) s1
n +p 2(n)s2
n+ · · · + p m(n)sm
n,
then there is a particular solution of the form f
1(n) + f2(n) + · · · + f m(n) where, for each i, f
i(n) is a particular solution to the non
homogeneous recurence a n= α 1a n-1 + α 2a n-2 + · · ·
+ α kan-k + pi(n)si
n
 Procedure for solving non-homogeneous recurrences. 1. Write
down the associated homogeneous recurrence and find its general
solution.
 2. Find a particular solution the non-homogeneous recurrence.
This may involve solving several simpler non-homogeneous
recurrences (using this same procedure).
 3. Add all of the above solutions together to obtain the general
solution to the non-homogeneous recurrence.
 4. Use the initial conditions to get a system of k equations in k
unknowns, then solve it to obtain the solution you want.
 Example 15 Solve an = 4a n-1−4a n-2+n. 2n +3n +4, n ≥ 2, a0 = 0, a1 =
1. The associated homogeneous recurrence is an = 4a n-1 − 4a n-2 . Its
characteristic equation is x2 = 4x − 4, or (x − 2)2 = 0. Thus, 2 is the
only root and it has multiplicity 2. The general solution to the
associated homogeneous recurrence is c 12n + c 2n2n .
 To
find a particular solution to the non-homogeneous recurrence, we add
together particular solutions to the three “simpler” non-homogeneous
recurrences: • a n= 4a n-1 − 4a n-2 + n2n , (i)
 a n= 4a n-1 − 4a n-2 + 3n , and (ii)
a n= 4a n-1− 4a n-2 + 4. (iii)
Let’s find a particular solution to
equation (iii) first. The non homogeneous term is 4 = 4 · 1 n , and
since 1 is not a root of the characteristic equation, Theorem 2 says
there is a particular solution of the form c1n . To determine c, plug
c1n=c into the non-homogeneous recurrence and get 16 c =
4c − 4c + 4 = 4. Thus, a particular solution to the recurrence under
consideration is a n = 4
 . Now let’s do the same for equation (ii). The
non-homogeneous term is 3n = 1 · 3n . Since 3 is
not a root of the characteristic equation, Theorem
5 says there is a particular solution of the form
c3n . To determine c, plug c3n into the non-
homogeneous recurrence and get c3n = 4c3n-1−
4c3n-2 + 3n . After dividing by the common factor
of 3n-2 , we have 9c = 12c − 4c + 9, or c = 9.
Thus, a particular solution to the recurrence under
consideration is an = 9 · 3n .
 Let’s find a particular solution to equation
(i). The non homogeneous term is n2n .
Since 2 is a root of the characteristic
equation with multiplicity 2, NHLRR 2 says
there is a particular solution of the form n2
(un + v)2n .
 To determine u and v, plug this expression
into the non homogeneous recurrence and get
n2 (un+v)2n = 4(n−1)2 (u(n−1)+v)2n-1
−4(n−2) 2 (u(n−2)+v)2n-2 +n2n .
 After dividing both sides by 2n − 2 and doing a bit of algebra this
becomes
 4un3+ 4vn2 = 8u(n − 1)3 + 8v(n − 1)2
 −4u(n − 2)3 − 4v(n − 2)2 + 4n
 = 8u(n 3 − 3n 2 + 3n − 1) + 8v(n 2 − 2n + 1) −4u(n 3
− 6n2 + 2n − 8) − 4v(n2− 4n + 4) + 4n
 = (8u − 4u)n 3 + (−24u + 8v + 24u − 4v)n2 +(24u −
16v − 48u + 16v + 4)n + (−8u + 8v + 32u − 16v)
 Equating coefficients of like powers of n on the LHS and RHS
gives: 4u = 4u,
 4v = (−24u + 8v + 24u − 4v)
 0 = (24u − 16v − 48u + 16v + 4) = −24u + 4
 0 = (−8u + 8v + 32u − 16v) = −24u − 8v
 The first two equations tell us nothing. The
third equation implies u = 1/6. Substituting
this value into the last equation and solving
gives v = 1/2. Thus, a particular solution to
the given recurrence is n2 ( 1/6 n + 1/2 )2n
. By Theorem 6, combining the three
particular solutions just obtained gives a
particular solution to an = 4a n-1 − 4a n-2+
n2n+ 3n + 4. It is 4 + 9 · 3n + n2 ( 1/6 n
+ 1 /2 )2n .
 The total solution or the general solution of a non-
homogeneous linear difference equation with constant
coefficients is the sum of the homogeneous solution
and a particular solution. If no initial conditions are
given, obtain n linear equations in n unknowns and
solve them, if possible to get total solutions.
 If y(h) denotes the homogeneous solution of the
recurrence relation and y(p) indicates the particular
solution of the recurrence relation then, the total
solution or the general solution y of the recurrence
relation is given by
y =y(h)+y(p).
 in the previous example, to find total solution we have
to combine the homogenous solution and particular
solution and then solve them using initial conditions
as shown:-
 The general solution is c 12n + c 2n2n + 4 + 9 · 3n + n2 (
1/6 n + 1/2 )2n . To determine the constants, use the
initial conditions. a0 = 0 ⇒ c 1 + 4 + 9 = 0
a1 = 1 ⇒ 2c 1+ 2c 2 + 4 + 27 + (1/6 + 1/2)2 = 1 The
first equation says c1 = −13. Plugging this into the
second equation gives c2 = −8/3. Thus, the solution to
the recurrence is an = (−13)2n + (−8/3)n2n + 4 + 9 · 3n +
n2 ( 1 6 n + 1 2 )2n .
 Generating function is a method to solve the
recurrence relations.
 Let us consider, the sequence a0, a1, a2....ar of
real numbers. For some interval of real numbers
containing zero values at t is given, the function
G(t) is defined by the series
G(t)= a0,
a1t+a2 t2+⋯+ar tr+............equation (i)
 This function G(t) is called the generating
function of the sequence ar.
 Example: Solve the recurrence relation ar+2-3ar+1+2ar=0
 By the method of generating functions with the initial
conditions a0=2 and a1=3.
 Solution: Let us assume that
 Multiply equation (i) by tr and summing from r = 0 to ∞, we
have
 (a2+a3 t+a4 t2+⋯)-3(a1+a2 t+a3 t2+⋯)+2(a0+a1 t+a2 t2+⋯)=0
[∴ G(t)=a0+a1 t+a2 t2+⋯]
 +2G(t)=0............equation (ii)
 Put t=1 on both sides of equation (iii) to find A. Hence
-1=- A ∴ A = 1
 Put t= 1/2 on both sides of equation (iii) to find B. Hence
1/2 =1/2 B ∴ B = 1
 Thus G (t) = .Hence,ar=1+2r.
 LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS

LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS

  • 1.
    TOPIC ON LINEARRECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS:- HOMOGEOUS SOLUTIONS,PARTICULAR SOLUTIONS, TOTAL SOLUTIONS AND SOLVING RECURRENCE RELATION USING GENERATING FUNCTIONS
  • 2.
     Introduction toLinear recurrence relations:- order and degree of recurrence relations.  Linear recurrence relations with constant coefficients  Homogenous solutions  Paticular solutions for homogenous difference equations  Particular solutions for non-homogenous difference equations  Total solution and example  Generating functions
  • 3.
     A recurrencerelation is a functional relation between the independent variable x, dependent variable f(x) and the differences of various order of f (x). A recurrence relation is also called a difference equation, and we will use these two terms interchangeably.  Example1: The equation f (x + 3h) + 3f (x + 2h) + 6f (x + h) + 9f (x) = 0 is a recurrence relation.  It can also be written as  ar+3 + 3ar+2 + 6ar+1 + 9ar = 0 yk+3 + 3yk+2 + 6yk+1 + 9yk = 0  Example2: The Fibonacci sequence is defined by the recurrence relation ar = ar-2 + ar-1, r≥2,with the initial conditions a0=1 and a1=1.
  • 4.
     The orderof the recurrence relation or difference equation is defined to be the difference between the highest and lowest subscripts of f(x) or ar=yk.  Example1: The equation 13ar+20ar-1=0 is a first order recurrence relation.  Example2: The equation 8f (x) + 4f (x + 1) + 8f (x+2) = k (x)
  • 5.
     The degreeof a difference equation is defined to be the highest power of f (x) or ar=yk  Example1: The equation y3 k+3+2y2 k+2+2yk+1=0 has the degree 3, as the highest power of yk is 3.  Example2: The equation a4 r+3a3 r-1+6a2 r-2+4ar-3 =0 has the degree 4, as the highest power of ar is 4.  Example3: The equation yk+3 +2yk+2 +4yk+1+2yk= k(x) has the degree 1, because the highest power of yk is 1 and its order is 3.  Example4: The equation f (x+2h) - 4f(x+h) +2f(x) = 0 has the degree1 and its order is 2.
  • 6.
     A RecurrenceRelations is called linear if its degree is one.  The general form of linear recurrence relation with constant coefficient is  C0 yn+r+C1 yn+r-1+C2 yn+r-2+⋯+Cr yn=R (n)  Where C0,C1,C2......Cn are constant and R (n) is same function of independent variable n.  A solution of a recurrence relation in any function which satisfies the given equation.  The equation is said to be linear non-homogeneous difference equation if R (n) ≠ 0.  Example: Solve the difference equation yK+4+4yK+3+8yK+2+8yK+1+4yK=0.  Solution: The characteristics equation is s4+4s3+8s2+8s+4=0 (s2+2s+2) (s2+2s+2)=0 s = -1±i,-1±i  Therefore, the homogeneous solution of the equation is given by  yK=(C1+C2 K)(-1+i)K+(C3 +C4 K)(-1-i)K
  • 7.
     A linearhomogeneous difference equation with constant coefficients is given by  C0 yn+C1 yn-1+C2 yn-2+⋯......+Cr yn-r=0 ....... equation (i)  Where C0,C1,C2.....Cn are constants.  The solution of the equation (i) is of the form , where ∝1 is the characteristics root and A is constant.  Substitute the values of A ∝K for yn in equation (1), we have  C0 A∝K+C1 A∝K-1+C2 A∝K-2+⋯....+Cr A∝K-r=0.......equation (ii)  After simplifying equation (ii), we have  C0 ∝r+C1 ∝r-1+C2 ∝r-2+⋯Cr=0..........equation (iii)  The equation (iii) is called the characteristics equation of the difference equation.  If ∝1 is one of the roots of the characteristics equation, then is a homogeneous solution to the difference equation.  To find the solution of the linear homogeneous difference equations, we have the three cases that are discussed as follows:
  • 8.
     Case1 Ifthe characteristics equation has repeated real roots.  If ∝1=∝2, then (A1+A2 K) is also a solution.  If ∝1=∝2=∝3 then (A1+A2 K+A3 K2) is also a solution.  Similarly, if root ∝1 is repeated n times, then.  (A1+A2 K+A3 K2+......+An Kn-1)  The solution to the homogeneous equation.  Case2: If the characteristics equation has one imaginary root.  If α+iβ is the root of the characteristics equation, then α-iβ is also the root, where α and β are real.  Thus, (α+iβ)K and (α-iβ)K are solutions of the equations. This implies  (α+iβ)K A1+(α-iβ)K A2  Is also a solution to the characteristics equation, where A1 and A2 are constants which are to be determined.
  • 9.
     Case3: Ifthe characteristics equation has repeated imaginary roots.  When the characteristics equation has repeated imaginary roots,  (C1+C2 k) (α+iβ)K +(C3+C4 K)(α-iβ)K  Is the solution to the homogeneous equation Example1: Solve the difference equation ar-3ar-1+2ar-2 =0  Solution: The characteristics equation is given by  s2-3s-1+2s-2 => s2-3s+2=0 or (s-1)(s-2)=0 ⇒ s = 1, 2  Therefore, the homogeneous solution of the equation is given by  ar=C 1 +C2.2r or c C 1 (1)K+C2(2)K
  • 10.
     Example2: Solvethe difference equation 9yK+2-6yK+1+yK=0.  Solution: The characteristics equation is  9s2-6s+1=0 or (3s-1)2=0 ⇒ s =1/3,1/3  Therefore, the homogeneous solution of the equation is given by yK=(C1+C2 k)(1/3)k  Example3: Solve the difference equation yK-yK-1-yK-2=0.  Solution: The characteristics equation is s2-s-1=0 s=1+√5  2  Therefore, the homogeneous solution of the equation is  .  C1 (1+√5) and C2(1-√5 ) 2 2
  • 11.
     (A) HomogeneousLinear Difference Equations and Particular Solution:  We can find the particular solution of the difference equation when the equation is of homogeneous linear type by putting the values of the initial conditions in the homogeneous solutions.  Example1: Solve the difference equation 2ar-5ar-1+2ar-2=0 and find particular solutions such that a0=0 and a1=1.  Solution: The characteristics equation is 2s2-5s+2=0 (2s-1)(s-2)=0 s = and 2.  Therefore, the homogeneous solution of the equation is given by  ar(h)= C1+C2 .2r..........equation (i)  Putting r=0 and r=1 in equation (i), we get a0=C1+C2=0...........equation (a) a1= C1+2C2=1...........equation.(b)  Solving eq (a) and (b), we have C1=-2/3and C2=2/3  Hence, the particular solution is  Ar(p) =-2/3(1/2)r+2/3.2r
  • 12.
     Example2: Solvethe difference equation ar-4ar-1+4ar-2=0 and find particular solutions such that a0=0 and a1=6.  Solution: The characteristics equation is s2-4s+4=0 or (s-2)2=0 s = 2, 2  Therefore, the homogeneous solution of the equation is given by ar(n)=(C1+C2 r).2r.............. equation (i)  Putting r = 0 and r = 1 in equation (i), we get a0=(C1+0).20 = 1 ∴C1=1 a1=(C1+C2).2=6 ∴C1+C2=3⇒C2=2  Hence, the particular solution is ar(P)=(1+2r).2r.
  • 13.
     . Theoremsthat give us a method for solving non- homogeneous recurrences are listed below:-  Theorem 1:- If f(n) is a solution to the associated homogeneous recurrence, and g(n) is a solution to the non- homogeneous recurrence, then f(n) + g(n) is also a solution to the non-homogeneous recurrence.  Theorem 2:- Suppose the non-homogeneous term is of the form p(n)sn, where p(n) is a polynomial of degree r and s is a constant. If s is not a root of the characteristic equation, then there is a particular solution of the form q(n)sn , where q is a polynomial of degree at most r. If s is a root of the characteristic equation of multiplicity t, then there is a particular solution of the form nt q(n)sn, where q is a polynomial of degree at most r.
  • 14.
     Theorem 3:-If the non-homogeneous term is of the form p 1(n) s1 n +p 2(n)s2 n+ · · · + p m(n)sm n, then there is a particular solution of the form f 1(n) + f2(n) + · · · + f m(n) where, for each i, f i(n) is a particular solution to the non homogeneous recurence a n= α 1a n-1 + α 2a n-2 + · · · + α kan-k + pi(n)si n  Procedure for solving non-homogeneous recurrences. 1. Write down the associated homogeneous recurrence and find its general solution.  2. Find a particular solution the non-homogeneous recurrence. This may involve solving several simpler non-homogeneous recurrences (using this same procedure).  3. Add all of the above solutions together to obtain the general solution to the non-homogeneous recurrence.  4. Use the initial conditions to get a system of k equations in k unknowns, then solve it to obtain the solution you want.
  • 15.
     Example 15Solve an = 4a n-1−4a n-2+n. 2n +3n +4, n ≥ 2, a0 = 0, a1 = 1. The associated homogeneous recurrence is an = 4a n-1 − 4a n-2 . Its characteristic equation is x2 = 4x − 4, or (x − 2)2 = 0. Thus, 2 is the only root and it has multiplicity 2. The general solution to the associated homogeneous recurrence is c 12n + c 2n2n .  To find a particular solution to the non-homogeneous recurrence, we add together particular solutions to the three “simpler” non-homogeneous recurrences: • a n= 4a n-1 − 4a n-2 + n2n , (i)  a n= 4a n-1 − 4a n-2 + 3n , and (ii) a n= 4a n-1− 4a n-2 + 4. (iii) Let’s find a particular solution to equation (iii) first. The non homogeneous term is 4 = 4 · 1 n , and since 1 is not a root of the characteristic equation, Theorem 2 says there is a particular solution of the form c1n . To determine c, plug c1n=c into the non-homogeneous recurrence and get 16 c = 4c − 4c + 4 = 4. Thus, a particular solution to the recurrence under consideration is a n = 4
  • 16.
     . Nowlet’s do the same for equation (ii). The non-homogeneous term is 3n = 1 · 3n . Since 3 is not a root of the characteristic equation, Theorem 5 says there is a particular solution of the form c3n . To determine c, plug c3n into the non- homogeneous recurrence and get c3n = 4c3n-1− 4c3n-2 + 3n . After dividing by the common factor of 3n-2 , we have 9c = 12c − 4c + 9, or c = 9. Thus, a particular solution to the recurrence under consideration is an = 9 · 3n .
  • 17.
     Let’s finda particular solution to equation (i). The non homogeneous term is n2n . Since 2 is a root of the characteristic equation with multiplicity 2, NHLRR 2 says there is a particular solution of the form n2 (un + v)2n .  To determine u and v, plug this expression into the non homogeneous recurrence and get n2 (un+v)2n = 4(n−1)2 (u(n−1)+v)2n-1 −4(n−2) 2 (u(n−2)+v)2n-2 +n2n .
  • 18.
     After dividingboth sides by 2n − 2 and doing a bit of algebra this becomes  4un3+ 4vn2 = 8u(n − 1)3 + 8v(n − 1)2  −4u(n − 2)3 − 4v(n − 2)2 + 4n  = 8u(n 3 − 3n 2 + 3n − 1) + 8v(n 2 − 2n + 1) −4u(n 3 − 6n2 + 2n − 8) − 4v(n2− 4n + 4) + 4n  = (8u − 4u)n 3 + (−24u + 8v + 24u − 4v)n2 +(24u − 16v − 48u + 16v + 4)n + (−8u + 8v + 32u − 16v)  Equating coefficients of like powers of n on the LHS and RHS gives: 4u = 4u,  4v = (−24u + 8v + 24u − 4v)  0 = (24u − 16v − 48u + 16v + 4) = −24u + 4  0 = (−8u + 8v + 32u − 16v) = −24u − 8v
  • 19.
     The firsttwo equations tell us nothing. The third equation implies u = 1/6. Substituting this value into the last equation and solving gives v = 1/2. Thus, a particular solution to the given recurrence is n2 ( 1/6 n + 1/2 )2n . By Theorem 6, combining the three particular solutions just obtained gives a particular solution to an = 4a n-1 − 4a n-2+ n2n+ 3n + 4. It is 4 + 9 · 3n + n2 ( 1/6 n + 1 /2 )2n .
  • 20.
     The totalsolution or the general solution of a non- homogeneous linear difference equation with constant coefficients is the sum of the homogeneous solution and a particular solution. If no initial conditions are given, obtain n linear equations in n unknowns and solve them, if possible to get total solutions.  If y(h) denotes the homogeneous solution of the recurrence relation and y(p) indicates the particular solution of the recurrence relation then, the total solution or the general solution y of the recurrence relation is given by y =y(h)+y(p).
  • 21.
     in theprevious example, to find total solution we have to combine the homogenous solution and particular solution and then solve them using initial conditions as shown:-  The general solution is c 12n + c 2n2n + 4 + 9 · 3n + n2 ( 1/6 n + 1/2 )2n . To determine the constants, use the initial conditions. a0 = 0 ⇒ c 1 + 4 + 9 = 0 a1 = 1 ⇒ 2c 1+ 2c 2 + 4 + 27 + (1/6 + 1/2)2 = 1 The first equation says c1 = −13. Plugging this into the second equation gives c2 = −8/3. Thus, the solution to the recurrence is an = (−13)2n + (−8/3)n2n + 4 + 9 · 3n + n2 ( 1 6 n + 1 2 )2n .
  • 22.
     Generating functionis a method to solve the recurrence relations.  Let us consider, the sequence a0, a1, a2....ar of real numbers. For some interval of real numbers containing zero values at t is given, the function G(t) is defined by the series G(t)= a0, a1t+a2 t2+⋯+ar tr+............equation (i)  This function G(t) is called the generating function of the sequence ar.
  • 23.
     Example: Solvethe recurrence relation ar+2-3ar+1+2ar=0  By the method of generating functions with the initial conditions a0=2 and a1=3.  Solution: Let us assume that  Multiply equation (i) by tr and summing from r = 0 to ∞, we have  (a2+a3 t+a4 t2+⋯)-3(a1+a2 t+a3 t2+⋯)+2(a0+a1 t+a2 t2+⋯)=0 [∴ G(t)=a0+a1 t+a2 t2+⋯]  +2G(t)=0............equation (ii)
  • 24.
     Put t=1on both sides of equation (iii) to find A. Hence -1=- A ∴ A = 1  Put t= 1/2 on both sides of equation (iii) to find B. Hence 1/2 =1/2 B ∴ B = 1  Thus G (t) = .Hence,ar=1+2r.