#x^6+1=(x^4-x^2+1)(x^2+1)#

How did I find this? First of all, substitute #x^2 = y# to get #y^3 + 1#.

Notice that #y = -1# is a solution of #y^3+1 = 0#, so #(y+1)# is a factor.

We can easily derive #y^3+1=(y^2-y+1)(y+1)#, noticing the way that the intermediate terms cancel out when you multiply this out.

Substituting #y = x^2# back in, we get:

#x^6+1=(x^4-x^2+1)(x^2+1)#

How do we know this factorization is complete?

There is no linear factor, because #x^6+1# is always > 0 (for real values of #x#).

How about quadratic factors?

Suppose #x^4-x^2+1=(x^2+ax+b)(x^2+cx+d)#.

Looking at the coefficient of #x^3#, we get #a+c = 0#, so #c = -a#:

... #=(x^2+ax+b)(x^2-ax+d)#

The constant term gives us that #bd = 1# so #b = d = 1# or #b = d = -1#.

The coefficient of #x^2# gives us #a^2-(b+d)=1#. Hence #a^2 = 3# or #a^2 = -1#. Neither have integer solutions.