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.
You are correct that if all of the roots of a polynomial $f(x)$ are roots of a polynomial $g(x)$, then $f(x)$ is a factor of $g(x)$.
However $x^2 + x + 1$ is not a factor of $x^{12} + x^6 + 1$. The reason is because $- \frac{1}{2} \pm i \frac{\sqrt{3}}{2}$ are not roots of that polynomial. This is because
$$ \left( - \frac{1}{2} \pm i \frac{\sqrt{3}}{2} \right)^3 = 1,$$
so plugging it into $x^{12} + x^6 + 1$ gives $(x^3)^4 + (x^3)^2 + 1 = 1 + 1 + 1 = 3 \neq 0$.