<s>[INST] Factorise $x^5+x+1$ 
Factorise $$x^5+x+1$$

I'm being taught that one method to factorise this expression which is $=x^5+x^4+x^3-x^4-x^3-x^2+x^2+x+1$
$=x^3(x^2+x+1)-x^2(x^2+x+1)+x^2+x+1$
=$(x^3-x^2+1)(x^2+x+1)$
My question:
Is there another method to factorise this as this solution it seems impossible to invent it?
 [/INST] Note that if $z^3=1, z\neq 1$ so that $z^3-1=(z-1)(z^2+z+1)=0$ then $z^5+z+1=z^2+z+1=0$. A key to this observation is just seeing whether an appropriate root of unity may be a root.
This tells you that $x^2+x+1$ is a factor of $x^5+x+1$, and the question then is how you do the division. The factorisation method you have been shown is equivalent to doing the polynomial long division.
Another method, not suggested by others, is to use the fact that you know $x^2+x+1$ is a factor and multiply through by $x-1$ so that this factor becomes $x^3-1$.
So $(x-1)(x^5+x+1)=x^6-x^5+x^2-1=(x^3-1)(x^3+1)-x^2(x^3-1)=(x^3-1)(x^3-x^2+1)=(x-1)(x^2+x+1)(x^3-x^1+1)$
</s>