How can I prove $x^5+x^4-x-1=(x-1)(x+1)^2(x^2+1)$ by polynomial division? I see that $x=1$ is a zero of the denominator, but how do I get the other factors? Our professor said polynomial division, but I don't see it.
BTW, I know how to get the solution with the binomial formula: \begin{align*} x^5+x^4-x-1 & = (x^5 - x) + (x^4 - 1)\\ & = x(x^4 - 1) + (x^4 - 1)\\ & = (x + 1)(x^4 - 1)\\ & = (x+1)(x^2 + 1)(x^2 - 1)\\ & =(x+1)^2(x^2 + 1)(x - 1)\\ & = \cdots \end{align*}
But I want to know another way to obtain the result.
$\frac{d}{dx}(x^5+x^4-x-1)|_{x=-1}=5(-1)^4+4(-1)^3-1=0$, but $\frac{d^2}{dx^2}(x^5+x^4-x-1)|_{x=-1}=20(-1)^3+12(-1)^2-1\neq 0$, this implies that $x=-1$ is a root of multiplicity two, so $(x-1)^2$ divides $x^5+x^4-x-1$, and as you point out $x=1$ is a root, then $(x+1)(x-1)^2=x^3+x^2-x-1$ divides $x^5+x^4-x-1$. If you use polynomial division $x^5+x^4-x-1\div x^3+x^2-x-1$ easily, you get that the remaining factor is $x^2+1$