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 \mathop = 0}^{n - 1} x^j = \frac {x^n - 1} {x - 1}$

Lemma
If $n \in \N_{>0}$ then:


 * $\displaystyle \left({1 - x}\right) \sum_{i \mathop = 0}^{n - 1} x^i = 1 - x^n$

Proof
We proceed by induction on $n$.

We start with the base step, where $n = 1$:

Then, to show the truth for $n$ implies the truth of $n + 1$,

By the lemma:


 * $\displaystyle \left({1 - x}\right) \sum_{i\mathop = 0}^{n - 1} x^i = 1 - x^n$


 * $\displaystyle \sum_{i\mathop = 0}^{n - 1} x^i = \frac{1 - x^n}{1 - x}$

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