Answer
In each case, we have to plug the purported solution into the right-hand side of the recurrence relation and see if it simplifies to the left-hand side. Algebra can get tedious, and it is easy to make a mistake.
Work Step by Step
a) We have
an-l + 2an-2 + 2n - 9 = -(n -1) + 2 + 2(-(n -2) + 2) + 2n - 9 = -n+2 =an.
b) We have
an-l + 2an-2 + 2n - 9 = 5(-1)"-1 -(n -1) + 2 + 2(5(-1)n-2 -(n -2) + 2) + 2n - 9 = 5(-1)"-2(-1+2) -n + 2 =a,,.
Note that we had to factor out ( -1)n-2 and that this is the same as ( -1 )" since ( -1 )2 = 1.
c) We have an
-l + 2a,,_2 + 2n - 9 = 3(-l)n-l + 2n-l -(n -1) + 2 + 2(3(-1)"-2 + 2n-2 -(n -2) + 2) + 2n - 9 = 3(-1)"-2(-1+2) + 2n-2(2 + 2) -n + 2 =a,,.
Note that we had to factor out 2n-2 and that 2n-2 · 4 = 2".
d) We have an
-l + 2an-2 + 2n - 9 = 7 · 2n-l -(n -1) + 2 + 2(7 · 2"-2 -(n -2) + 2) + 2n - 9 = 2n-2(7 · 2 + 2 · 7) -n + 2 =an.