Using polar form to prove $|z| = 1 \implies \text{Re}\left(\frac{1-z}{1+z}\right) = 0$

This was an answer provided to a question I asked previously. I followed the other approaches to the question; however, I couldn't seem to follow this one:

$$\frac{1-z}{1+z}=\dfrac{1-e^{i\theta}}{1+e^{i\theta}}=\dfrac{e^{-\frac{i\theta}{2}}-e^{\frac{i\theta}{2}}}{e^{-\frac{i\theta}{2}}+e^{\frac{i\theta}{2}}}=\dfrac{-2i\sin\frac{\theta}{2}}{2\cos\frac{\theta}{2}}=-i\tan\frac{\theta}{2}$$

How do you progress from the 2nd term to the 3rd term and then from the 3rd term to the 4th? What identity/logic is used etc.?

-

To get from the second term to the third, multiply numerator and denominator by $e^{-\frac{i\theta}{2}}$:

$$e^{-\frac{i\theta}{2}}(1 \pm e^{i\theta}) = e^{-\frac{i\theta}{2}} \pm e^{\frac{i\theta}{2}}$$

Then to get to the fourth term from the third, use the following identities:

$$\sin x = \frac{e^{ix}-e^{-ix}}{2i}$$

$$\cos x = \frac{e^{ix}+e^{-ix}}{2}$$

These can be derived straightforwardly from $e^{ix} = \cos x + i \sin x$.

-
Beat me to it. +1 – user21436 Mar 19 '12 at 2:16
OK, I follow the steps now. I thought I would see why this is a proof if I could follow, but apparently not. How does arriving at $-i\tan\frac{\theta}{2}$ mean that the real part = 0? – stariz77 Mar 19 '12 at 2:44
@stariz77: Do you know what the real part of, say, $-3i$ or $i/2$ is? $\tan(\theta/2)$ is real. – anon Mar 19 '12 at 2:48
@anon: Ah ok. So it's effectively saying 0 - $i\tan\frac{\theta}{2}$ which implies the real part is 0? – stariz77 Mar 19 '12 at 2:51
@stariz77: Yes, that's correct. – anon Mar 19 '12 at 3:18

To get from the second term to the third, multiply numerator and denominator by $e^{-i\theta/2}$; to get from the third term to the fourth, use the identities $$\cos \theta=\frac12(e^{i\theta}+e^{-i\theta})$$ and $$\sin \theta=\frac{i}2(e^{-i\theta}-e^{i\theta})=\frac{e^{i\theta}-e^{-i\theta}}{2i}\;,$$ which are derivable from $e^{i\theta}=\cos\theta+i\sin\theta$ and $e^{-i\theta}=\cos(-\theta)+i\sin(-\theta)=$ $\cos\theta-i\sin\theta$.

-
Beat me to it. +1 – user21436 Mar 19 '12 at 2:16