Sum of Geometric Sequence

Theorem
Let $x$ be an element of one of the standard number fields: $\Q, \R, \C$ such that $x \ne 1$.

Let $n \in \N_{>0}$.

Then:
 * $\displaystyle \sum_{j = 0}^{n - 1} x^j = \frac {x^n - 1} {x - 1}$

Corollary
Let $a, ar, ar^2, \ldots, ar^{n-1}$ be a geometric progression.

Then:
 * $\displaystyle \sum_{j = 0}^{n - 1} ar^j = \frac {a \left({r^n - 1}\right)} {r - 1}$

Proof 1
Let:
 * $\displaystyle S_n = \sum_{j = 0}^{n - 1} x^j = 1 + x + x^2 + \cdots + x^{n-1}$

Then:
 * $\displaystyle x S_n = x \sum_{j = 0}^{n - 1} x^j = x + x^2 + x^3 + \cdots + x^{n-1} + x^n$

Then:
 * $\displaystyle x S_n - S_n = -1 + x - x + x^2 - x^2 + \cdots + x^{n-1} - x^{n-1} + x^n = x^n - 1$

The result follows.

Proof 2
Using Sum Notation:

Let $\displaystyle S_n = \sum_{j = 0}^{n - 1} x^j$.

Then:

The result follows.

Proof 3
From Difference of Two Powers:


 * $\displaystyle a^n - b^n = \left({a - b}\right) \left({a^{n-1} + a^{n-2} b + a^{n-3} b^2 + \ldots + a b^{n-2} + b^{n-1}}\right) = \left({a - b}\right) \sum_{j=0}^{n-1} a^{n-j-1} b^j$

Set $a = x$ and $b = 1$:


 * $\displaystyle x^n - 1 = \left({x - 1}\right) \left({x^{n-1} + x^{n-2} + \cdots + x + 1}\right) = \left({x - 1}\right) \sum_{j=0}^{n-1} x^j$

from which the result follows directly.

Proof of Corollary
Follows immediately from the fact that $a + ar + ar^2 + \cdots + ar^{n-1}$ is exactly the same as $a \left({1 + r + r^2 + \cdots + r^{n-1}}\right)$.

Comment
Note that when $x < 1$ the result is usually given as:
 * $\displaystyle \sum_{j = 0}^{n - 1} x^j = \frac {1 - x^n} {1 - x}$