Show that $(x-1)^2$ is a factor of $x^n -nx +n-1$
By factor theorem we know that $(x-a)$ is a factor of $f(x)$ if $f(a)=0$.
In this case, $f(x)=x^n -nx +n-1 \implies f(1)=0$
Hence we conclude that $(x-1)$ is a factor. From hereon, how can I say that $(x-1)^2$ is a factor?
Can we approach the problem without calculus approach? This problem was taken from a book of pre-calculus algebra.