How do I factor this polynomial: $$x^4-x^2+1$$ The solution is: $$(x^2-x\sqrt{3}+1)(x^2+x\sqrt{3}+1)$$ Can you please explain what method is used there and what methods can I use generally for 4th or 5th degree polynomials?


Solution 1:

Key Idea $\, $ Completing the square leads to a difference of squares

$$\begin{eqnarray} \overbrace{\color{#0a0}{x^4+1}}^{\rm incomplete\ \large \Box\!\!}\!\! -x^2 &\,=\,& \overbrace{\color{#0a0}{(x^2\!+1)^2}}^{\rm\!\!\! completed\ \large \Box \!\!\!}-\ \color{#c00}{3\, x^2}\ \ \text{so factoring this} \it\text{ difference of squares}\\[.2em] &\,=\,& (x^2+1\color{#c00}\ \ {-\ \ \color{#c00}{\sqrt3 x}})\ (x^2+1\, + \color{#c00}{\sqrt3 x})\\ \end{eqnarray}$$ Another example $$\begin{eqnarray} \overbrace{\color{#0a0}{n^4+4k^4}}^{\rm incomplete\ \large \Box}\!\! &=\,& \overbrace{\color{#0a0}{(n^2\!+2k^2)^2}}^{\rm\!\!\! completed\ \large \Box\!\!\!}\!\!-\!(\color{#c00}{2nk})^2\ \ \text{so factoring this} \it\text{ difference of squares}\\[.2em] &\,=\,& (n^2\!+2k^2\ -\,\ \color{#c00}{2nk})\,(n^2\!+2k^2+\,\color{#c00}{2nk})\\[.2em] &\,=\,&(\underbrace{(n-k)^2}_{\rm\!\!\!\!\!\!\!\!\!\!\! complete\ the\ square\!\!\!\!\!\!\!\!}\ +\ \,k^2)\ \ \underbrace{((n+k)^2}_{\rm\!\!\!\!\!\!\!\!\!\!\! complete\ the\ square\!\!\!\!\!\!\!\!\!\!\!\!\!\!} +\,k^2)\\ \end{eqnarray}$$

This generalizes to completing a product, via the AC-method, viz.

$$\begin{eqnarray} &&axy + bx + cy\, =\, d,\ \ a\ne 0\\ \overset{\times\,a}\iff\, &&\!\! (ax+c)(ay+b)\, =\, ad+bc\end{eqnarray}\qquad\qquad$$

Solution 2:

The first to try would be to look for (rational) roots, but that is fruitless here (you need only test divisors of the constant term, but $\pm1$ is not a root).

Next you might try to factor as $(x^2+ax+b)(x^2+a'x+b')$ with integer coefficients, where once again you could conclude that $bb'=1$, so $b=b'=\pm1$. However, as the solutionm tells as, this won't work to produce integer values $a,a'$ - though if you still give it a try with $b=b'=1$, you might be led to $a,a'=\pm\sqrt 3$.

However, a "trick" works here: Try to add something simple (that is also a easy to take the square root of) in order to obtain a square. Here we have $x^4-x^2+1$, which almost looks like $x^4+2x^2+1=(x^2+1)^2$, so we have $$ x^4-x^2+1=(x^2+1)^2-3x^2 = (x^2+1)^2-(\sqrt3x)^2$$ and can apply the third binomial formula to obtain a factorization.