For MrCargoPants

Prove \(a^n - b^n = (a - b)\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right)\)

Here's the solution: First, I simply distribute \(a - b\) over the complicated bit

$$\begin{align} & (a - b)\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right) \\ =\;& a\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right) \\ -\;& b\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right) \end{align}$$

I will now expand each term on the right-hand side

$$\begin{align} & a\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right) \\ =\;& a^n + a^{n - 1}b + \ldots + a^2b^{n - 2} + ab^{n - 1} \\[1em] & -b\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right) \\ =\;& -a^{n - 1}b + a^{n - 2}b^2 - \ldots - ab^{n - 1} - b^n \end{align}$$

Now I will add those together

$$\begin{align} & a^n + a^{n - 1}b + \ldots + a^2b^{n - 2} + ab^{n - 1} \\ -\;& a^{n - 1}b + a^{n - 2}b^2 - \ldots - ab^{n - 1} - b^n \end{align}$$

Notice that we have \(a^{n - 1}b\) and \(-a^{n - 1}b,\) and likewise for all terms except \(a^n\) and \(b^n.\) Thus

$$(a - b)\left(a^{n - 1} + a^{n - 2}b + \ldots + ab^{n - 2} + b^{n - 1}\right) = a^n - b^n$$