Showing $\left(\frac{z+i}{z-i}\right)^n = -1$ implies $z$ is real I have shown the following identity: $$ \frac{1+e^{i \theta}}{1-e^{i \theta}} = \frac{1}{2}\cot\left(\frac{\theta}{2}\right) $$ And I now need to use this to show that the the equation: $$ \left(\frac{z+i}{z-i}\right)^n = -1$$ has $\Im(z) = 0$.
I'm not sure where to get started on this, I have found a way to do it by conjugating the 2nd equation on both sides and showing that z is equal to its own conjugate, however this does not use the original identity, and I'd really like to see how it follows from that.
Any help would be much appreciated.
 A: Something is wrong with your identity  as  $$\frac{1+e^{i2t}}{1-e^{2it}}=\frac{1+\cos2t+i\sin2t}{1-\cos2t-i\sin2t}=\frac{2\cos^2t+i2\sin t\cos t}{2\sin^2t-i2\sin t\cos t}$$
$$=\frac{2\cos t(\cos t+i\sin t)}{-2i\sin t(i\sin t+\cos t)}=i\cot t$$
Now using De Moivre's formula , $$\frac{z+i}{z-i}=(-1)^{\frac1n}=e^{\frac{(2r+1)i\pi}n}$$ where $0\le r<n$ 
Applying componendo and dividendo, $$\frac z{-i}=\frac{e^{\frac{(2r+1)i\pi}n}+1}{e^{\frac{(2r+1)i\pi}n}-1}=i \cot \frac{(2r+1)\pi}{2n}$$
$$\implies z= \cot \frac{(2r+1)\pi}{2n}$$
A: $$
\frac {1+e^{i \theta}}{1-e^{i \theta}} = -\frac {e^{i\theta/2}+e^{-i\theta/2}}{e^{i\theta/2}-e^{-i\theta/2}} = -\frac {2\cos \frac \theta 2}{2i \sin \frac \theta 2} = -\frac 1i \cot \frac \theta 2 = i \cot \frac \theta 2
$$
You can recheck it here.
As for the second part
$$
\left ( \frac {z+i}{z-i}\right )^n = -1 \\
\frac {z+i}{z-i} = e^{\frac {(2k+1)\pi i}n} \\
z + i = (z-i) e^{\frac {(2k+1)\pi i}n} \\
z \left ( 1-e^{\frac {(2k+1)\pi i}n}\right) = -i \left ( 1+e^{\frac {(2k+1)\pi i}n}\right) \\
z = -i\ \left ( \frac {1+e^{\frac {(2k+1)\pi i}n}}{1-e^{\frac {(2k+1)\pi i}n}} \right )
$$
Based on first result
$$
\frac {1+e^{\frac {(2k+1)\pi i}n}}{1-e^{\frac {(2k+1)\pi i}n}} = i \cot \frac {(2k+1)\pi}{2n}
$$
so
$$
z = -i^2 \cot \frac {(2k+1)\pi}{2n} = \cot \frac {(2k+1)\pi}{2n}
$$
which is real, i.e. $\Im(z) = 0$.
