[Math] How to factor $x^5 + x + 1$

factoringpolynomials

I put $x^5 + x + 1$ into Wolfram and my TI-89 to factor it and they both arrived at the same factored answer:

$$(x^2+x+1)(x^3-x^2+1)$$

I've tried to expand this out to reverse engineer it:

$$\begin{aligned}
(x^2+x+1)(x^3-x^2+1) &= x^2(x^3-x^2+1)+x(x^3-x^2+1) + 1(x^3-x^2+1) \\
&= x^5 \color{red}- \color{red}x^{\color{red}4} + \color{red}x^\color{red}2 + \color{red}x^\color{red}4 \color{red}-\color{red}x^\color{red}3 + x + \color{red}x^\color{red}3 \color{red}-\color{red}x^\color{red}2 + 1
\end{aligned} $$

I am not sure where one would even get the idea to both add and subtract those red terms into the original and then rearrange them in that way to factor it. Is there a thought process that would accompany this? Or is there another way to approach this question entirely?

Best Answer

A more intuitive way to factor it would be to add the terms $x^4 + x^3 +x^2$. Then the polynomial above will transform into:

$$ x^5 + x^4 + x^3 +x^2 + x+1 - x^2(x^2 + x+ 1) $$ $$ = \dfrac{x^6-1}{x-1} - x^2(x^2 + x+ 1)$$ $$ = \dfrac{(x^3-1)(x^3+1)}{x-1} - x^2(x^2 + x+ 1)$$ $$= (x^2+x+1)(x^3+1)- x^2(x^2 + x+ 1)$$ Which gives the result.

Related Question