$T(n) = 2$ if $n=0$

$T(n) = 9T(n-1)-56n +63$ if $n>=1$

Repeated substitution

$k=1$

$T(n) = 9T(n-1)-56n+63 $

$k =2$

$T(n) = 81T(n-2) -560n + 1134$

$k =3$

$T(n) = 729T(n-3) -5096n + 15309$

I cant find the pattern for the n term and the integer

For now i just have

T(n) = $9^k(n-k)$


First find a particular solution that satisfies $T(n)=9T(n-1)-56n+63$. Let the particular solution be

$$T(n)=An+B.$$

Then we have

$$An+B=9A(n-1)+9B-56n+63.$$

For this to hold for all $n$, we have $A=7$, $B=0$. Then find the general solution of $T(n)=9T(n-1)$, which is $T(n)=9^nC$. So the general solution for the problem is

$$T(n)=7n+9^nC.$$

To find $C$ we need the initial condition $T(1)=2$. So $C=-5/9$. The final solution is

$$T(n)=7n-5\times 9^{n-1}.$$