Write a generating function for the following recursion

rootmeister64

New member
Joined
Nov 7, 2020
Messages
10
Hello. I have to come up with a generating function for the following recursion:

problem.PNG

This is what I have done so far:

result.jpg

Now I do not know what to do. I could take 22 and z2 out of the sum but this doesn't help me at all...
Did I make any mistakes or am I missing something very obvious?
Thank you very much for your time!
 
ready?

[MATH] f_n = 4f_{n-1} - 4f_{n-2} + 2^n \\~\\ x^n f_n = x^n 4f_{n-1} - x^n 4 f_{n-2} + x^n 2^n\\~\\ \sum \limits_{n=2}^\infty x^n f_n = 4\sum \limits_{n=2}^\infty x^n f_{n-1} - 4\sum \limits_{n=2}^\infty x^n f_{n-2} + \sum \limits_{n=2}^\infty x^n 2^n \\~\\ G(x) -2x = 4x \sum \limits_{n=2}^\infty x^{n-1} f_{n-1} - 4 x^2 \sum \limits_{n=2}^\infty x^{n-2} f_{n-2} + 4x^2 \sum \limits_{n=2}^\infty x^{n-2} 2^{n-2} \\~\\ G(x) - 2x = 4x \sum \limits_{n=0}^\infty x^n f_n - 4x^2 \sum \limits_{n=0}^\infty x^n f_n + 4x^2 \sum \limits_{n=0}^\infty (2x)^n\\~\\ G(x) - 2x = 4x G(x) - 4x^2 G(x) + 4x^2 \dfrac{1}{1-2x} \\~\\ G(x) (1 - 4x(1-x)) = 2x + \dfrac{4x^2}{1-2x} \\~\\ G(x) = \dfrac{2x + \dfrac{4x^2}{1-2x}}{1 - 4x(1-x)} \overset{\text{software}}{=} \dfrac{2 x}{(2 x-1)^3} [/MATH]
I leave you to verify this. (hint: Find the taylor series of [MATH]G(x)[/MATH] and see that it matches [MATH]f_n[/MATH])
 
ready?

[MATH] f_n = 4f_{n-1} - 4f_{n-2} + 2^n \\~\\ x^n f_n = x^n 4f_{n-1} - x^n 4 f_{n-2} + x^n 2^n\\~\\ \sum \limits_{n=2}^\infty x^n f_n = 4\sum \limits_{n=2}^\infty x^n f_{n-1} - 4\sum \limits_{n=2}^\infty x^n f_{n-2} + \sum \limits_{n=2}^\infty x^n 2^n \\~\\ G(x) -2x = 4x \sum \limits_{n=2}^\infty x^{n-1} f_{n-1} - 4 x^2 \sum \limits_{n=2}^\infty x^{n-2} f_{n-2} + 4x^2 \sum \limits_{n=2}^\infty x^{n-2} 2^{n-2} \\~\\ G(x) - 2x = 4x \sum \limits_{n=0}^\infty x^n f_n - 4x^2 \sum \limits_{n=0}^\infty x^n f_n + 4x^2 \sum \limits_{n=0}^\infty (2x)^n\\~\\ G(x) - 2x = 4x G(x) - 4x^2 G(x) + 4x^2 \dfrac{1}{1-2x} \\~\\ G(x) (1 - 4x(1-x)) = 2x + \dfrac{4x^2}{1-2x} \\~\\ G(x) = \dfrac{2x + \dfrac{4x^2}{1-2x}}{1 - 4x(1-x)} \overset{\text{software}}{=} \dfrac{2 x}{(2 x-1)^3} [/MATH]
I leave you to verify this. (hint: Find the taylor series of [MATH]G(x)[/MATH] and see that it matches [MATH]f_n[/MATH])
I am grateful for your help! It helped me a lot!
 
Top