Q. Fibonacci generating function \( \frac{x}{1 – x – x^2} \).
Answer
Let \(G(x)=\sum_{n\ge 0}F_nx^n\) with \(F_0=0,\ F_1=1\). Then
\[
G(x)=x+\sum_{n\ge 2}F_nx^n
= x+\sum_{n\ge 2}(F_{n-1}+F_{n-2})x^n
= x + x\sum_{n\ge 2}F_{n-1}x^{\,n-1} + x^2\sum_{n\ge 2}F_{n-2}x^{\,n-2}
= x + xG(x) + x^2G(x),
\]
so \(G(x)(1-x-x^2)=x\) and hence
\[
G(x)=\frac{x}{1-x-x^2}.
\]
With \(\varphi=\dfrac{1+\sqrt{5}}{2}\) and \(\psi=\dfrac{1-\sqrt{5}}{2}\) one gets the partial fraction form
\[
G(x)=\frac{1}{\sqrt{5}}\!\left(\frac{1}{1-\varphi x}-\frac{1}{1-\psi x}\right),
\]
so the coefficients are the Fibonacci numbers
\[
F_n=\frac{\varphi^n-\psi^n}{\sqrt{5}}.
\]
Detailed Explanation
-
Define the Fibonacci sequence and its ordinary generating function. Let the Fibonacci numbers be defined by F_0 = 0, F_1 = 1, and for n ≥ 2, F_n = F_{n-1} + F_{n-2}. Define the generating function
\[F(x) \;=\; \sum_{n=0}^{\infty} F_n\,x^n.\]
-
Form the shifted series xF(x) and x^2F(x) so we can use the recurrence. Compute
\[xF(x) \;=\; \sum_{n=0}^{\infty} F_n\,x^{n+1} \;=\; \sum_{n=1}^{\infty} F_{n-1}\,x^{n},\]
\[x^2F(x) \;=\; \sum_{n=0}^{\infty} F_n\,x^{n+2} \;=\; \sum_{n=2}^{\infty} F_{n-2}\,x^{n}.\]
-
Subtract the shifted series from F(x) to incorporate the recurrence. Consider
\[F(x) – xF(x) – x^2F(x) \;=\; \sum_{n=0}^{\infty} \bigl(F_n – F_{n-1} – F_{n-2}\bigr)\,x^{n},\]
where by convention F_{-1} = 0 so the n = 0 and n = 1 terms are handled by the initial values. For n ≥ 2 the recurrence gives F_n – F_{n-1} – F_{n-2} = 0, so only the first two terms contribute.
Evaluate the left series directly from the first terms: F_0 = 0 and F_1 = 1, so the right-hand side reduces to x. Therefore
\[F(x) – xF(x) – x^2F(x) \;=\; x.\]
-
Solve for F(x). Factor the left-hand side:
\[F(x)\bigl(1 – x – x^2\bigr) \;=\; x.\]
Hence
\[F(x) \;=\; \dfrac{x}{1 – x – x^2}.\]
This shows the ordinary generating function of the Fibonacci sequence is x/(1 – x – x^2).
-
To extract an explicit formula for the coefficients (Binet’s formula), factor the denominator. Solve r^2 – r – 1 = 0 to find the roots
\[\varphi \;=\; \dfrac{1 + \sqrt{5}}{2}, \qquad \psi \;=\; \dfrac{1 – \sqrt{5}}{2}.\]
Then
\[1 – x – x^2 \;=\; (1 – \varphi x)(1 – \psi x),\]
because \varphi + \psi = 1 and \varphi\psi = -1.
-
Perform partial fraction decomposition. Write
\[\dfrac{x}{(1 – \varphi x)(1 – \psi x)} \;=\; \dfrac{A}{1 – \varphi x} \;+\; \dfrac{B}{1 – \psi x}.\]
Multiply through by the denominator to get
\[x \;=\; A(1 – \psi x) + B(1 – \varphi x) \;=\; (A + B) + \bigl(-A\psi – B\varphi\bigr)x.\]
Equate coefficients of powers of x: from the constant term, 0 = A + B, so B = -A. From the x-term, 1 = -A\psi – B\varphi. Substitute B = -A to obtain
\[1 \;=\; -A\psi + A\varphi \;=\; A(\varphi – \psi).\]
Since \varphi – \psi = \sqrt{5}, we get A = 1/\sqrt{5} and B = -1/\sqrt{5}.
-
Express F(x) using the geometric-series expansion for each partial fraction. We have
\[F(x) \;=\; \dfrac{1}{\sqrt{5}}\cdot\dfrac{1}{1 – \varphi x} \;-\; \dfrac{1}{\sqrt{5}}\cdot\dfrac{1}{1 – \psi x}.\]
Expand each as a power series (valid for |x| small enough):
\[\dfrac{1}{1 – \varphi x} \;=\; \sum_{n=0}^{\infty} \varphi^{\,n} x^{n}, \qquad
\dfrac{1}{1 – \psi x} \;=\; \sum_{n=0}^{\infty} \psi^{\,n} x^{n}.\]Therefore
\[F(x) \;=\; \dfrac{1}{\sqrt{5}} \sum_{n=0}^{\infty} \bigl(\varphi^{\,n} – \psi^{\,n}\bigr) x^{n}.\]
-
Read off the coefficients to obtain the closed-form formula for Fibonacci numbers. For n ≥ 0,
\[F_n \;=\; \dfrac{\varphi^{\,n} – \psi^{\,n}}{\sqrt{5}}.\]
In particular F_0 = 0 and F_1 = 1, and the generating function is
\[F(x) \;=\; \sum_{n=0}^{\infty} F_n x^n \;=\; \dfrac{x}{1 – x – x^2}.\]
FAQs
How do you derive the generating function \(\frac{x}{1-x-x^2}\) for the Fibonacci numbers?
How do you get Binet's formula from the generating function?
How can I expand \(\frac{x}{1-x-x^2}\) as a power series?
What is the radius of convergence of this generating function?
How does the generating function give asymptotics for F_n?
How do I get the generating function for shifted Fibonacci sequences F_{n+k}?
How to prove Fibonacci sum identities using the generating function?
Why is partial fraction decomposition useful here?
Math, Calculus, Geometry, etc.