# Equivalence between real part of two complex numbers

Suppose $\forall z \in \mathbb{C}\setminus\{i\}$ we set $\displaystyle f(z)=\frac{z+i}{1+iz}$.

How can I prove that: $\displaystyle \Re (f(z))=\frac{1}{2} \Longleftrightarrow \Re (z) = \frac{|1+iz|^{2}}{4}$

-

$$f(z) = \frac{z+i}{1+iz} = \frac{(z+i)(1-i\bar z)}{(1+iz)(1-i\bar z)} = \frac{z+i-i|z|^2+\bar z}{|1+iz]^2}$$
Hence, $\Re(f(z)) = \frac12$ if and only if $\dfrac{2\Re(z)}{|1+iz|^2} = \dfrac12$. (Note that $z+\bar z = 2\Re(z)$.)