Find the closed form of the recurrence equation

70 Views Asked by At

$f_{n}=0.5f_{n-1}+2f_{n-2}+1$

Hey, I'm trying to find the closed form of this recurrence equation. I tried the plug and chug method but couldn't get it, can someone kindly explain this to me? Thanks a lot!

1

There are 1 best solutions below

0
On

Hint

I suppose that what is making the problem is the $+1$ in $$f_n=\frac 12 f_{n-1}+2f_{n-2}+1$$ To get rid of it, let $f_n=g_n+a$ and replace $$g_n+a=\frac 12 (g_{n-1}+a)+2(g_{n-2}+a)+1$$ that is to say$$g_n=\frac 12 g_{n-1}+2g_{n-2}+(\frac 32 a+1)$$ To go back to the standard problem, may be, you could set $a=??$