Solve $G(n)=a \, G(n-1)+b$ by generating functions

90 Views Asked by At

I'm having a lot of difficulty solving

$$G(n) = a \, G(n-1)+b \hspace{5mm} \text{for} \hspace{5mm} n=2,3,...$$ and a given $a$ and $b$ by generating functions. I can find a general formula for the n-th term using difference equations, however I'd also like to derive the same answer by creating using a generating function. The trouble is that I cannot make progress. I've tried changing the expression to $G(n)=(a+1) \, G(n-1) - a \, G(n-2)$ to make it homogeneous, and trying to find a partial fraction, but neither seem to be productive. Can anyone offer some advice?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $f(x)=\sum_{n=0}^\infty G(n)x^n$. Then you get:

$f(x)=\sum_{n=0}^\infty G(n)x^n=G(0)+\sum_{n=1}^\infty G(n)x^n=G(0)+\sum_{n=1}^\infty [aG(n-1)+b]x^n=$

$G(0)+a\sum_{n=1}^\infty G(n-1)x^n+b\sum_{n=1}^\infty x^n=G(0)+ax\sum_{n=0}^\infty G(n)x^n+b(\frac{1}{1-x}-1)=$

$=G(0)+axf(x)+b(\frac{1}{1-x}-1)$

Solving the equation you get $f(x)=\frac{G(0)(1-x)+bx}{(1-ax)(1-x)}$. Can you continue from here?