How to calculate $z^4 + \frac1{z^4}$ if $z^2 + z + 1 = 0$?

From $z^2 + z + 1 = 0$, we have $$z +\frac{1}{z}=-1.$$ Taking square, we get $$z^2 +\frac{1}{z^2}+2=1,$$ which implies that $$z^2 +\frac{1}{z^2}=-1.$$ I think you will know what to do next.


Essentially the same calculation also follows from the observation that $x^2+x+1=\phi_3(x)$ is the third cyclotomic polynomial. So $z^3-1=(z-1)(z^2+z+1)=0$, and hence $z^3=1$ for any solution $z$. Therefore $$ z^4+\frac{1}{z^4}=z\cdot z^3+\frac{(z^3)^2}{z^4}=z+z^2=-1. $$


$$\begin{align*} z^4+\frac1{z^4}&=(-z-1)^2+\frac1{(-z-1)^2}\\ &=z^2+2z+1+\frac1{z^2+2z+1}\\ &=(-z-1)+2z+1+\frac1{(-z-1)+2z+1}\\ &=z+\frac1{z}=\frac{z^2+1}{z}=\frac{-z-1+1}{z}=-1 \end{align*}$$