Solve the recurrence relation
$$a_n = 7a_{n-1} - 16a_{n-2} +12a_{n-3} + n4^n $$
With initial conditions:
$a_0 = −2$
$a_1 = 0$
$a_2 = 5$
I solve the homogenous part like that:
$$a_n - 7a_{n-1} + 16a_{n-2} -12a_{n-3} = 0 $$
$$ p(r) = r^3 -7r^2 + 16r - 12 $$
$$ p(r) = (r-2)^2(r-3) $$
But I am stucked with the non-homogenous part.
For $$ g(n) = 4^n $$ We can use $$ q(r) = A4^n $$ But for $$ g(n) = n4^n $$
What we should do?
$$a_n = 7a_{n-1} - 16a_{n-2} +12a_{n-3} + n4^n$$ Here $g(n)=n4^n$. Try $$a_n^p=(cn+d)4^n$$ for the particular solution. $c$ and $d$ are constants to be found.