<s>[INST] Roots of Unity for Precalculus (a): What is the smallest positive integer $n$ such that all the roots of $z^4 + z^2 + 1 = 0$ are $n^{\text{th}}$ roots of unity?
(b) What is the smallest positive integer $n$ such that all the roots of $z^4 - z^2 + 1 = 0$ are $n^{\text{th}}$ roots of unity?
I am trying to incorporate the roots of unity in here, but I am having trouble so far.  I know that the 2nd roots of unity are inside the fourth units of unity, and I am stuck there.  Any help is appreciated.
 [/INST] (a) $z^6-1=(z^2-1)(z^4+z^2+1)$, so the roots of $z^4+z^2+1$ are all the $\xi\in\overline{\mathbb{Q}}$ such that $\xi^6=1$, except $1$ and $-1$. This means that $n=6$
(b) $z^6+1=(z^2+1)(z^4-z^2+1)$, and moreover $z^{12}-1=(z^6-1)(z^6+1)$, therefore $\xi^4-\xi^2+1=0\longleftrightarrow(\xi^{12}=1\wedge\xi^6\neq1\wedge\xi\neq\pm i$). Which means $n=12$.
</s>