In my complex analysis book there is the expression $\frac{1 - |z|^2}{|1 - \bar z e^{it}|^2}$
and it says that when $z = re^{it}$, we can write the above expression as $P_r(t) = \frac{1 - r^2}{1 - 2r\cos t + r^2} = \text{Re}\left( \frac{1 + z}{1 - z} \right)$
I do not see where the $\cos t$ comes from though.
Isn't $\bar z = re^{-it}$, so the top is $1 - r^2$ and the bottom is $|1 - r|^2 = 1 - 2r + r^2$. I have not really figured out where the $\text{Re}(1 + z)/(1 - z)$ comes from either.