TITLE: Prove that $a^n-b^n = (a-b)(a^{n-1} + a^{n-2}b + \cdots + b^{n-1})$.
QUESTION [7 upvotes]: Exercise

Prove that $a^n-b^n = (a-b)(a^{n-1} + a^{n-2}b + \cdots + b^{n-1})$.


I've posted my solution below. In case someone has a more clever solution, feel free to post it!
(TBH, I was surprised that there was no question on Math.SE regarding this equation!)

REPLY [7 votes]: For $n\geq1$,
\begin{align}
(a-b)\sum_{i=0}^{n-1}a^ib^{n-1-i}&=\sum_{i=0}^{n-1}a^{i+1}b^{n-1-i}-\sum_{i=0}^{n-1}a^ib^{n-i}\\
&=\sum_{i=0}^{n-1}(a^{i+1}b^{n-(i+1)}-a^ib^{n-i})\\
&=a^n-b^n&&(\text{telescoping sum})
\end{align}

REPLY [6 votes]: The result is essentially the fact that $1+x+ \cdots + x^{n-1} = {1-x^n \over 1-x}$ (for $x \neq 1$), or equivalently that
$(1-x)(1+x+ \cdots + x^{n-1}) = 1 -x ^n$ for any $x$.
If $a=b$, or $a=0$ then the result is true.
Suppose $a \neq 0$ and $a \neq b$. Then letting $x={b \over a}$ in the above
and multiplying the result by $a^n$ yields the desired result.
To see the above result, note that
$(1-x) (1+x+ \cdots + x^{n-1}) = (1+x+ \cdots + x^{n-1})-(x+x^2+ \cdots + x^{n}) = 1- x^n$.