Prove polynomial identity $x^k-1=(x-1)(x^{k-1}+x^{k-2}+\ldots+1).$ I am confused, as not clear except by multiplying both terms on the r.h.s, and showing that all cancel out except the two on the l.h.s., as below:
$(x)(x^{k-1}+x^{k-2}+\ldots+1) - (x^{k-1}+x^{k-2}+\ldots+1)= x^k -1$

It's like this: $(x-1)(x^{k-1}+x^{k-2}+\ldots+1)$
$=x(x^{k-1}+x^{k-2}+\ldots+1) - (x^{k-1}+x^{k-2}+\ldots+1)$
$=x^{k-1+1}+x^{k-2+1}+x^{k-3+1}+x^{k-4+1}...+x^3+x^2+x-x^{k-1}-x^{k-2}-x^{k-3}-...-x-1$
$=x^{k}+x^{k-1}+x^{k-2}+x^{k-3}...+x^3+x^2+x-x^{k-1}-x^{k-2}-x^{k-3}-...-x^2-x-1$
$=x^{k}+(x^{k-1}+x^{k-2}+x^{k-3}...+x^3+x^2+x)-(x^{k-1}+x^{k-2}+x^{k-3}+...+x^2+x)-1$
$=x^k-1$
You can also prove it by reversing the solution above.
