Solving multiple recurrence relations

25 Views Asked by At

I have these three equations:

$f_n + g_n + h_n = 5^n$

$f_n = 3 f_{n-1} + g_{n-1}$

$h_n = 3 h_{n-1} + g_{n-1}$

If I subtract the last two from each other, I can get:

$h_n - f_n = 3(h_{n-1} - f_{n-1}) + 0 = 3^n$

The problem is that I know the result, but I'm flat out stuck and can't figure out how to get there. Here is what I should end up with:

$h_n = h_{n−1} + 5^{n−1} + 3^{n−1}$

1

There are 1 best solutions below

1
On BEST ANSWER

From the first relation we get $(f_n+h_n)=5^n-g_n$. Now add the two recurrence relations given to get $$(f_n+h_n)=3(f_{n-1}+h_{n-1})+2g_{n-1}.$$ This can be written as: $$5^n-g_n=3(5^{n-1}-g_{n-1})+2g_{n-1}.$$ This gives: $$g_n-g_{n-1}=2 . 5^{n-1}.$$ Hopefully you can take it from here and get $g_n=\frac{5^n-1}{2}+g_0$.