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?

z^4+z^2+1 = 0

(z^2-z+1)(z^2+z+1) = 0
one root is
z = (1+√3 i)/2 = cis(pi/3)
so, z^3 = -1
That means z^6 = 1

To find the smallest positive integer $n$ such that all the roots of the quadratic equation $z^4 + z^2 + 1 = 0$ are $n^{\text{th}}$ roots of unity, we can use the properties of roots of unity.

First, let's find the roots of the quadratic equation. We can rewrite the equation as $z^4 = -z^2 - 1$. Taking the square root of both sides, we get $z^2 = \sqrt{-z^2 -1}$.

To simplify further, let's notice that if $w$ is a solution to the equation $w^2 = -z^2 - 1$, then $-w$ is also a solution. Thus, we can rewrite $z^2$ as $z^2 = \pm i \sqrt{z^2 + 1}$.

Now, let's solve for $z^2$. We square both sides again to get rid of the square root: $(z^2)^2 = (\pm i \sqrt{z^2 + 1})^2$. Simplifying, we have $z^4 = -z^2 - 1$.

Notice that this equation is the same as our original equation $z^4 + z^2 + 1 = 0$. This means that $z^4 = -z^2 - 1$ satisfies the original equation. Therefore, the roots of $z^4 + z^2 + 1 = 0$ are $z^2$, where $z$ satisfies $z^4 = -z^2 - 1$.

Let $w = z^2$. Then, we have $w^2 = -w - 1$. This is a quadratic equation. By solving for $w$, we find that the roots are $w = \frac{-1 \pm \sqrt{5}}{2}$. Therefore, $z^2 = \frac{-1 \pm \sqrt{5}}{2}$.

Now, we want to find the smallest positive integer $n$ such that all the roots of $z^4 + z^2 + 1 = 0$ are $n^{\text{th}}$ roots of unity. In other words, we want $z^2$ to be an $n^{\text{th}}$ root of unity.

An $n^{\text{th}}$ root of unity is a complex number $w$ that satisfies $w^n = 1$. The solutions to this equation can be found by writing $w$ in exponential form: $w = \text{cis}(\theta)$, where $\theta = \frac{2\pi k}{n}$ for $k = 0, 1, 2, \dots, n-1$.

Since $z^2 = \frac{-1 \pm \sqrt{5}}{2}$, we need to choose $n$ such that $\left(\frac{-1 \pm \sqrt{5}}{2}\right)^n = 1$.

By substituting $w = \frac{-1 + \sqrt{5}}{2}$ and $w = \frac{-1 - \sqrt{5}}{2}$ into the equation $w^n = 1$, we can find the possible values of $n$.

For $w = \frac{-1 + \sqrt{5}}{2}$, we have $\left(\frac{-1 + \sqrt{5}}{2}\right)^n = 1$. By writing $w$ in exponential form, we have $\text{cis}\left(\frac{2\pi k}{n}\right) = \frac{-1 + \sqrt{5}}{2}$ for some integer $k$. This equation holds if $\frac{2\pi k}{n} = \arg\left(\frac{-1 + \sqrt{5}}{2}\right) = \frac{2\pi}{10}$ for some integer $k$. Simplifying, we find that $n = 10$ is a possible value.

Similarly, for $w = \frac{-1 - \sqrt{5}}{2}$, we find that $n = 6$ is a possible value.

Therefore, the smallest positive integer $n$ such that all the roots of $z^4 + z^2 + 1 = 0$ are $n^{\text{th}}$ roots of unity is $n = \boxed{6}$.