Generating Function of the Geometric Series Explained with Worked Examples

The geometric series gives the simplest generating function: , and more generally .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Generating function of the geometric series means

A generating function packs a sequence into a power series whose coefficients are the terms. At the series sums to (geometric series convergence). The coefficient of in is , and at equals (the series ).

The coefficients count the ways to distribute identical objects among boxes (stars and bars): each box contributes a factor , and multiplying of them adds the exponents. The binomial series with negative exponent (the binomial series) gives the same coefficients.

Generating functions solve recurrences: multiplying a recurrence by and summing turns it into an algebraic equation, as used for Fibonacci numbers (Binet's formula) and Catalan numbers (Catalan numbers). They are also the probability generating functions of discrete distributions (the probability generating function) and relate to the Z-transform (the Z-transform).

What is it used for?

The geometric series is the generating function for the sequence 1, 1, 1, …, and its powers count distributions.

How to use generating function of the geometric series

  1. Recognise the pattern for .
  2. For powers use as the coefficient of .
  3. Multiply series to combine independent choices.
  4. Evaluate at a value of or read off coefficients.

Graph

The generating function 1/(1 − x) and the partial sum 1 + x + x² + x³x = 0.5: 200.10.20.30.40.50.60.70.80.90246810The generating function 1/(1 − x) and the partial sum 1 + x + x² + x³xvalue1/(1 − x)partial sum to x³Graph with x from 0 to 0.9 and y from 0 to 10.5. Shows the curve 1/(1 − x); the curve partial sum to x³; point x = 0.5: 2 at (0.5, 2).

The partial sum tracks the function for small x and falls behind near 1.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: x = 0.5

Sum .

Worked example
Answer
22
  1. Formula

Example 2: a coefficient

Find the coefficient of in .

Worked example
Answer
2121
  1. Formula

Example 3: x = 0.1, k = 2

Evaluate at .

Worked example
Answer
1.23461.2346
  1. Formula

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

1/(1 − x) at x = 0.5

Σ xⁿ = 2

Sum of 1 + ½ + ¼ + ….

1/(1 − 3x) at x = 0.2

Σ (3x)ⁿ

2.5.

x/(1 − x)² at x = 0.5

Σ n xⁿ

2.

Coefficient of x⁵ in 1/(1 − 2x)

2⁵

32.

Word problems

Σ xⁿ = 1/(1 − x) for |x| < 1; Σ (ax)ⁿ = 1/(1 − ax); and differentiating gives Σ n xⁿ = x/(1 − x)². The coefficient of xⁿ in 1/(1 − ax) is aⁿ.

At 0.5

Evaluate 1/(1 − x) at x = 0.5.

  1. 1/0.5
  2. Check: ✓2

Scaled

Evaluate 1/(1 − 3x) at x = 0.2.

  1. 1/0.4
  2. Check: ✓2.5

Weighted Higher

Evaluate x/(1 − x)² at x = 0.5.

  1. 0.5/0.25
  2. Check: ✓2

Coefficient Higher

Coefficient of x⁵ in 1/(1 − 2x).

  1. 2⁵
  2. Check: ✓32

Common mistakes

Ignoring convergence

any x ✗

|x| < 1 ✓

Radius.

1/(1 + x)

wrong sign ✗

1/(1 − x) ✓

Check.

Coefficient a·n

wrong ✗

aⁿ ✓

Powers.

n xⁿ numerator

1/(1 − x)² ✗

x/(1 − x)² ✓

Missing x.

Exam tips

  1. 1/(1 − x).
  2. 1/(1 − ax): coefficients aⁿ.
  3. Differentiate for nxⁿ.
  4. |x| < 1.
  5. Partial fractions for recurrences.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. 1/(1 − x) at x = 0.2 Foundation

1.25

2. 1/(1 − 2x) at x = 0.25 Foundation

2

3. x/(1 − x)² at x = 0.2 Foundation

0.3125

4. Coefficient of x⁴ in 1/(1 − 3x) Higher

81

5. 1/(1 − x²) at x = 0.5 to 4 d.p. Higher

1.3333

6. 1/(1 − 0.1) Higher

1.1111

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Generating function
Series encoding a sequence.
Geometric series
Σ xⁿ.
Coefficient
Term in xⁿ.
Radius of convergence
Closed form
1/(1 − x).
Partial fractions
Splitting a rational function.

Frequently asked questions

What is the generating function of 1, 1, 1, …?

1/(1 − x).

What is the coefficient of xⁿ in 1/(1 − ax)?

aⁿ.

What is Σ n xⁿ?

x/(1 − x)².

When is it valid?

|x| < 1.

Which page covers Binet’s formula?

Binet’s formula.

Which page covers recurrences?

linear recurrences.

More in Discrete maths and number theory and the formula sheets.