If z is a complex number and $ \frac {z^2 + z+ 1} {z^2 -z +1}$ is purely real then find the value of $|z|$ .
I tried to put $ \frac {z^2 + z+ 1} {z^2 -z +1} =k $ then solve for $z$ and tried to find |z|, but it gets messy and I am stuck. The answer given is |z|=1
Proposition. $\frac{z^2+z+1}{z^2-z+1}$ is real if and only if $z\in\Bbb R$ or $|z|=1$.
I'll let you handle the $\Leftarrow$ direction. For $\Rightarrow$, write $k=\frac{z^2+z+1}{z^2-z+1}=\frac{(z+z^{-1})+1}{(z+z^{-1})-1}\implies z+z^{-1}=\frac{k+1}{k-1}$.
When is $z+z^{-1}$ real for nonreal $z$? (What's its imaginary part?)