I am trying to prove that If $z\in \mathbb{C}-\mathbb{R}$ such that $\frac{z^2+z+1}{z^2-z+1}\in \mathbb{R}$. Show that $|z|=1$.
1 method , through which I approached this problem is to assume $z=a+ib$ and to see that $$\frac{z^2+z+1}{z^2-z+1}=1+\frac{2z}{z^2-z+1}$$.
So problem reduces to show that $|z|=1$ whenever $\frac{2z}{z^2-z+1}\in \mathbb{R}$
I put $z=a+ib$ and then rationalise to get the imaginary part of $\frac{2z}{z^2-z+1}$ be $\frac{b-b^3-a^2b}{something}$. I equated this to zero and got my answer.
Is there any better method?