How to solve a non-homogeneous recurrence relation?

329 Views Asked by At

I am struggling to understand how to solve this problem. The textbook is extremely confusing to me.

Find the solution to the following 2nd order nonhomogeneous recurrence relation: $a_n=−4(a_{n−1})+12(a_{n−2})+49n$ for $n \ge 2$ with initial conditions $a_0=−23$,$a_1=−9$.

I know how to solve homogeneous problems and you set $a_n = r^n$ and solve, but the $49n$ here makes me not understand how to solve this.

Please help

2

There are 2 best solutions below

0
On

The non-homogenous relation can be "homogenized" as follows:

$a_n-a_{n-1}=-4a_{n-1}+16a_{n-2}-12a_{n-3}+49$

$(a_n-a_{n-1})-(a_{n-1}-a_{n-2})=-4a_{n-1}+20a_{n-2}-28a_{n-3}+12a_{n-4}$.

That is, $a_n=-2a_{n-1}+19a_{n-2}-28a_{n-3}+12a_{n-4}.$

Now it's a homogenous problem, which you said you know how to solve.

3
On

To account for the linear term, you can add a linear term onto assumed form:

$$a_n=a_n'+mn+b$$

Where $a_n'$ is the solution to the homogeneous relation. Substitute this instead to get:

$$a_n=a_n'-7n-20$$

We can then solve the remaining problem:

$$a_n'=-4a_{n-1}'+12a_{n-2}'$$

which gives

$$a_n=\alpha\cdot(-6)^n+\beta\cdot2^n-7n-20$$

Substituting in the initial conditions hence yields the final solution:

$$a_n=-3\cdot(-6)^n-7n-20$$