Factorize in $\mathbb{R}[x]$ or $\mathbb{Q}[x]$ :

$$P(x)=x^6+x^2+1$$

I know all roots of $P$ are complex and I don't know if there a factorization

But My try as following :

$$P(x)=x^6+x^2+1=(x^3)^2+1+2x^3-2x^3+x^2$$

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

I don't know how I complete?


For factorisation in $\mathbb{Q}[X]$:

As you note $X^6+X^2+1$ has no real roots.

Now $X^6+X^2+1=(X^3+X+1)^2$ modulo $2$, and this cubic is irreducible modulo $2$.

Hence, if the polynomial factorises over $\mathbb{Q}$ - and so over $\mathbb{Z}$ - it factorises as the product of two cubics. But every cubic has a real root, so we can't have such a factorisation.


Hint

Since your polynomial has real coefficient, then $$p(X)=X^6+X^2+1$$ has roots $$\{z_1,\bar z_1, z_2,\bar z_2, z_3,\bar z_3\},$$ where $\bar z$ denotes the complex conjugate of $z$. Therefore you can write $p(X)$ as $$(X^2+a_1X+b_1)(X^2+a_2X+b_2)(X^2+a_3X+b_3)$$

where $$X^2+a_iX+b_i=(X-z_i)(X-\bar z_i).$$