Prove that the polynomial $f_n(x)=nx^{n+1}-(n+1)x^n+1$ is divisible by $(x-1)^2$

Solution 1:

Hint: A polynomial $p(x)$ has $(x-a)^n$ has a factor iff $p(a)=p'(a)=\cdots = p^{(n-1)}(a)=0$

...or

Consider $(1-x)^2(1+2x+3x^2+\cdots+nx^{n-1})$

Solution 2:

Note that $$\left(nx^{n+1}-(n+1)x^n+1\right)-\left((n-1)x^n-nx^{n-1}+1\right)=nx^{n-1}(x^2-2x+1)$$and you should get an induction to work

Solution 3:

Hint:

$$ \begin{align} nx^{n+1}-(n+1)x^n+1 & = nx^n(x-1) - (x^{n}-1) \\ &= (x-1)\big(n x^n- x^{n-1}-x^{n-2}- \cdots -1\big) \\ &= (x-1)\big((x^n-x^{n-1})+(x^n-x^{n-2})+\cdots+(x^n-1)\big) = \cdots \end{align} $$