<s>[INST] How to simplify $a^n - b^n$? How to simplify $a^n - b^n$?
If it would be $(a+b)^n$, then I could use the binomial theorem, but it's a bit different, and I have no idea how to solve it.
Thanks in advance.
 [/INST] $$
a^n - b^n = (a-b+b)^n - b^n = \sum_{k=0}^n {n \choose k}(a-b)^{k}b^{n-k} - b^n = (a-b)b^{n-1} + {n \choose 1}(a-b)^2b^{n-2} + ... + {n \choose n-1} (a-b)^{n-1}b + (a-b)^n = (a-b)(b^{n-1} + {n \choose 1}(a-b)b^{n-2} + {n \choose 2}(a-b)^2b^{n-3} + {n \choose 3}(a-b)^3b^{n-4} + ... +  {n \choose n-1} (a-b)^{n-2}b + (a-b)^{n-1} )
$$
too complicated to simplify if you use bionomial expansion.
$$
a^n -b^n = a^n -a^{n-1}b + a^{n-1}b -b^n = a^{n-1}(a-b) + b(a^{n-1}-b^{n-1}) = a^{n-1}(a-b) + b(a^{n-1} -a^{n-2}b + a^{n-2}b -b^{n-1}) = a^{n-1}(a-b) + b(a^{n-2}(a-b) + b(a^{n-2}-b^{n-2})) = a^{n-1}(a-b) + b a^{n-2}(a-b) + b^2(a^{n-2}-b^{n-2}) = a^{n-1}(a-b) + b a^{n-2}(a-b) + b^2 a^{n-3}(a-b) + b^3(a^{n-3}-b^{n-3})
= ...(repeat ) =  a^{n-1}(a-b) + b a^{n-2}(a-b) + b^2 a^{n-3}(a-b) + b^3 a^{n-4}(a-b) + ... + b^{n-2}a(a-b) + b^{n-1}(a-b) = (a-b)(a^{n-1} + b a^{n-2} + b^2 a^{n-3} + ... + b^{n-2}a + b^{n-1})$$
the power of $a$ and $b$ add up to $n-1$ in the second factor.
</s>