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
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.