My Initial Question :
I understand how to solve a recurrence relation like such:
$t(n) = t(n-1) + t(n-2)$.
I would turn it into:
$t(n) - t(n-1) - t(n-2) = 0$, then $r^2 - r - 1 = 0$, then you solve for roots and such.
But what do I do if the recurrence relation looks like this?
$t(n) = t(n-1) + t(n-2) + 4$.
Can I follow the same pattern and do:
$t(n) - t(n-1) - t(n-2) = 4$, then $r^2 - r - 1 = 4$, then $r^2 - r - 5 = 0$ and continue on?
I was able to solve my problem using the following method:
I decremented n by 1 turning:
$t(n)=t(n−1)+t(n−2)+4$
into
$t(n-1)=t(n−2)+t(n−3)+4$
I then subtracted the second equation from the first to get:
$t(n)= 2t(n−1)-t(n-3)$
After which I was able to carry on fine.