Factorise Algebraic Expression

Background:

I came across the following problem in class and my teacher was unable to help. The problem was factorise $x^6 - 1$, if you used the difference of 2 squares then used the sum and difference of 2 cubes you came out with the following factorisation; $(x-1)(x+1)(x^2 +x + 1)(x^2 - x + 1)$. However if you used the sum and difference of 2 cubes first you factorised to the following; $(x-1)(x+1)(x^4 + x^2 + 1)$. How would I factorise further from there?

Question

How do you factorise $x^4 + x^2 + 1$?

Thanks

• Can you see a path to writing $(x^2+1)^2 - x^2$? Now, just factor this expression. – Moo Feb 5 '16 at 6:12

In such biquadratic expressions it is often useful to complete the square not as usual from the "quadratic" (=degree 4) and "linear" (=degree 2) terms, but from the "quadratic" and constant terms. Thus consider the best of $$x^4+1+x^2=(x^2+1)^2-x^2=(x^2-1)^2+3x^2$$ Another classical example is $$x^4+1=(x^2+1)^2-2x^2$$
If you plug in $x^2=y$ then you can easily see that its a factor giving two cube roots of unity thus the factors can be given as $(x^2-\omega)(x^2-\omega^2)$
The answer depends very much on the underlying field (or ring). Over $\mathbb{Z}$ we have $$x^6-1=(x^2 + x + 1)(x^2 - x + 1)(x + 1)(x - 1).$$ Here we can just write $$x^4+x^2+1=(x^2+ax+b)(x^2+cx+d),$$ because there is no linear factor, obviously. Then multiplying out and comparing the coefficients gives the result.
On the other hand, for cyclic codes, a natural choice would be a finite field, e.g., $\mathbb{F}_2$, $\mathbb{F}_3$, or some $\mathbb{F}_q$ for a prime power $q$. We have $$x^6-1=(x^2 + x + 1)^2(x + 1)^2$$ over $\mathbb{F}_2$, and $$x^6-1=(x + 2)^3(x + 1)^3$$ over $\mathbb{F}_3$. This follows by the Berlekamp algorithm, or by elementary division arguments.