A solution bn to the non-homogeneous recurrence is similar to f(n).
Guess:
bn=cn+d
Then:
cn+d+4(c(n−1)+d)−5(c(n−2)+d)=n+2
n−4=0
c=d=bn=0
Solution of the given recurrence is
an=bn+hn
where hn is a solution for the associated homogeneous recurrence:
hn+4hn−1−5hn−2=0
In our case: an=hn
Characteristic equation:
r2+4r−5=0
r1=2−4−16+20=−5,r2=1
an=α1r1n+α2r2n
an=α1(−5)n+α2
a0=α1+α2=1
a1=−5α1+α2=−1
−5α1+(1−α1)=−1
α1=1/3,α2=2/3
Solution:
an=31(−5)n+32
Comments