Recurrence Relations – Solving a Non-Homogeneous Linear Recurrence Relation

recurrence-relations

So i have this non-homogeneous linear recurrence relation to solve:

$$a_{n}=2a_{n-1}-a_{n-2}+2^n+2$$

$a_{1}=7$ and $a_{2}=19$

I know that the non-homogeneous part is $2^n$ and i know how to solve homogeneous linear recurrence relations, but when i get a non-homogeneous one i have no idea how to approach it.

I have this as well: $b_{n}=Aq^n$ when the non-homogeneous part is an exponential function look-alike. So yeah i know it should be of help, but i don't know how to apply it in solution. I need to make a characteristic polynomial as well(if that's what it is called) but i am really stuck at using all that in practical example.

So i am not sure how to solve it, any hints or help would really be appreciated.

Best Answer

If we set $a_n=b_n+2^{n+2}$ we have $$ b_n+2^{n+2}=2 b_{n-1} + 2^{n+2}-b_{n-2}-2^{n}+2^n + 2 $$ or just: $$ b_n = 2b_{n-1}-b_{n-2}+2 $$ In a similar way, if we set $b_n=c_n+ n^2$ we have $$ c_n=2c_{n-1}-c_{n-2}. $$ $a_1=7, a_2=19$ lead to $b_1=-1,b_2=3$ and to $c_1=-2, c_2=-1$.
By the previous homogeneous recurrence relation, it follows that $c_n=n-3$, hence $b_n=n^2+n-3$ and $$\boxed{\phantom{\sum}a_n = \color{red}{2^{n+2}+n^2+n-3}\phantom{\sum}}$$

Related Question