Arithmetic of complex numbers 
If $z = \cos x + i\sin x$ , show that 
  $$\frac{2}{1+z} =1-i\tan\left(\frac{x}{2}\right),$$ 

I get up to:
$$\frac{1+\cos x -i\sin x}{1+\cos x}.$$

Note that
\begin{align*}\frac{2}{1+z}&=\frac{2(1+\overline{z})}{|1+z|^2}=\frac{2(1+\cos x - i\sin x)}{(1+\cos x)^2 + (\sin x)^2}\\
&=\frac{2(1+\cos x - i\sin x)}{2(1+\cos x)}=1-i\cdot\frac{\sin x}{1+\cos x}
\end{align*}
and recall the tangent half-angle formula. 
