<s>[INST] Why isn't $x^2+x+1$ a factor of $x^{12}+x^6+1$? When we solve the equation
$$x^{12}+x^6+1=0$$ we obtain $2$ solutions that also satisfy $$x^2+x+1=0$$
namely $-\frac{1}{2}\pm i\frac{\sqrt3}{2}$.
Shouldn't this imply that $x^2+x+1$ is a factor of $x^{12}+x^6+1$? However, the fully factorsied form of
$x^{12}+x^6+1$ is $$(x^6-x^3+1)(x^6+x^3+1)$$
The reason I think that it should be a factor is that when we have, for a function $f(x)$, (here a polynomial,) $f(a)=0$ then we know that $(x-a)$ is a factor of $f(x)$.
If we multiply $(x-(-\frac{1}{2}+ i\frac{\sqrt3}{2}))$ by $(x-(-\frac{1}{2}- i\frac{\sqrt3}{2}))$ which are both factors of $x^{12}+x^6+1$ we get $x^2+x+1$. It seems to me that this should apply to the polynomials above. I have a feeling that my logic is specious, but I'm not entirely certain why; I think the answer to my problem may be that $x^2+x+1$ is factor of $x^{12}+x^6+1$, but only if the other factor has complex coefficients, but I'm not sure. Thank you for your help.
EDIT
Oh wow, I'm so sorry for making such a stupid mistake everyone, thanks for correcting me (see numerous comments and answers). I was looking at a few polynomials simultaneously and got mixed up. Thanks for your help.
 [/INST] I just want to note a technique based on my comment to the original post where a factor of $x^2+x+1$ can be shown longhand for $x^{2n}+x^n+1$ where $n$ is not a multiple of $3$.
Suppose $n=3m+1$ then $$x^{6m+2}+x^{3m+1}+1=x^{6m+2}-x^2+x^{3m+1}-x+x^2+x+1=$$$$=x^2\left(x^{6m}-1\right)+x\left(x^{3m}-1\right)+x^2+x+1$$ and the two bracketed terms are divisible by $x^3-1=(x-1)(x^2+x+1)$
With $n=3m+2$ we have similarly $$x^{6m+4}+x^{3m+2}+1=x^{6m+4}-x+x^{3m+2}-x^2+x^2+x+1=$$$$=x\left(x^{6m+3}-1\right)+x^2\left(x^{3m}-1\right)+x^2+x+1$$ and a factor $x^3-1$ is there for the two bracketed terms.
The various other methods are more efficient, but this is direct.
</s>