If $ \frac {z^2 + z+ 1} {z^2 -z +1}$ is purely real then $|z|=$? 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
 A: First note:
$$\frac{z^2 + z + 1}{z^2 - z + 1} = 1 + \frac{2z}{z^2 - z + 1}$$
So the given fraction is real if and only if the fraction $\frac{z}{z^2 - z + 1}$ is real. But a fraction is real if and only if its reciprocal is, so we need:
$$\frac{z^2 - z + 1}{z} = z - 1 + z^{-1}$$
To be a real number. So we get:
$$\boxed{\text{The fraction is real if and only if } z + z^{-1} \text{ is real (or } z= 0).}$$ 
Now if $z = a + bi$, with $z \neq 0$, the imaginary part of $z + z^{-1}$ is $b - \frac{b}{a^2 + b^2} = \frac{b(a^2 + b^2 - 1)}{a^2 + b^2} = \frac{b(|z| - 1)}{|z|}$. Hence we get:
$$\boxed{\text{Either } |z| = 1 \text{ or } z \text{ is real.}}$$
A: 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?)
A: Let's come up with a more interesting question (which might be what you intended to ask). 

Find an $\alpha \in \mathbb{R}$ such that $\forall z \in \mathbb{C}: |z| = \alpha \implies \dfrac{z^2+z+1}{z^2-z+1} \in \mathbb{R} \cup \{\infty\}$. 

I'll show that $\alpha = 1$ works. If $|z| = 1$, then $z = e^{i\theta}$ for some $\theta \in [0,2\pi)$. 
Thus, $\dfrac{z^2+z+1}{z^2-z+1} = \dfrac{z+1+z^{-1}}{z-1+z^{-1}} = \dfrac{e^{i\theta}+e^{-i\theta}+1}{e^{i\theta}+e^{-i\theta}-1} = \dfrac{2\cos\theta+1}{2\cos\theta-1} \in \mathbb{R} \cup \{\infty\}$, as desired. 
Therefore, if $|z| = 1$, then $\dfrac{z^2+z+1}{z^2-z+1}$ is either purely real or undefined. 
A: Suppose $|z|=r$, so that $z\bar{z}=r^2$ or $\bar{z}=r^2/z$.
We have that $$\overline{\frac{z^2+z+1}{z^2-z+1}}=\frac{\bar{z}^2+\bar{z}+1}{\bar{z}^2-\bar{z}+1}=\frac{r^4/z^2+r^2/z+1}{r^4/z^2-r^2/z+1}=\frac{z^2+r^2 z+r^4}{z^2-r^2z+r^4}. $$
But if the expression $$ \frac{z^2+z+1}{z^2-z+1}$$ is real, we must have
$$\overline{\frac{z^2+z+1}{z^2-z+1}}=\frac{z^2+z+1}{z^2-z+1}. $$
This should help you determining $r=|z|$.
A: raj
Since the fraction is real, so it is equal to its conjugate. That is, $\frac{z^2+z+1}{z^2-z+1}={\bar{(\frac{z^2+z+1}{z^2-z+1})}}$. Then by simple calculations one can obtain
$(z\bar{z}-1)(z-\bar{z})=0$. Since $z$ is complex so $z\bar{z}=\mid{{z}\mid^2}=1$
