Proof of the formula $a + ax + ax^2 + ... + ax^{n-1} = \frac{a(1-x^n)}{(1-x)}$ where $x \neq 1$

Put the statements in order

$S_n(1-x)=(1-x)(a + ax + ax^2 + ... + ax^{n-1})$

Simplify the right hand side by collecting like terms

$S_n = \frac{a(1-x^n)}{(1-x)}$

Divide both sides by $(1-x)$

The sum of n terms of the series is written

$S_n = a + ax + ax^2 + ax^3 +...+ ax^{n-1}$

$S_n(1-x) = a - ax + ax - ax^2 + ax^2 - ax^3 + ... $

$ ... - ax^{n-1} + ax^{n-1} - ax^n$

$S_n(1-x)=a - ax^n$

Multiply both sides by $(1-x)$

$S_n(1-x)=a(1-x^n)$

Expand the right hand side

Take out the common factor on the right hand side