Find all the real solutions to the equation: $(x+i)^n-(x-i)^n=0$ Find all the real solutions to the equation: $$(x+i)^n-(x-i)^n=0$$
The answer is given, I will type it out until the line which is unclear to me (meaning I understand all the steps leading up to the last line).
$$\left(\frac{x+i}{x-i}\right)^n=1 \implies \frac{x+i}{x-i}=\sqrt[n]{1}=\cos \frac{2k \pi}{n}+i\sin\frac{2k\pi}{n},\qquad k=0,1,\ldots,(n-1)$$
Now we find $x$:
$$x=\frac{\sin\frac{2k\pi}{n}-i(1+\cos\frac{2k\pi}{n})}{1-\cos\frac{2k\pi}{n}-i\sin\frac{2k\pi}{n}}$$
The rest is clear, just this last line.
 A: You find correctly that
$$
\frac{x+i}{x-i}=e^{i\alpha},
$$
where
$$
\alpha=\frac{2k\pi}{n},\quad k=0,1,\dots,n-1
$$
Now we also have
$$
x+i=xe^{i\alpha}-ie^{i\alpha}
$$
or
$$
x=i\frac{e^{i\alpha}+1}{e^{i\alpha}-1}
$$
Set $\alpha=2\beta$, so
$$
x=i\frac{e^{i\alpha}+1}{e^{i\alpha}-1}=
i\frac{e^{-i\beta}}{e^{-i\beta}}\frac{e^{2i\beta}+1}{e^{2i\beta}-1}=
i\frac{e^{i\beta}+e^{-i\beta}}{e^{i\beta}-e^{-i\beta}}
$$
Now recall that
$$
e^{i\beta}+e^{-i\beta}=2\cos\beta,\quad
e^{i\beta}-e^{-i\beta}=2i\sin\beta
$$
and you find
$$
x=i\frac{2\cos\beta}{2i\sin\beta}=\cot\beta=\cot\frac{k\pi}{n},
\quad k=0,1,\dots,n-1
$$
A: Just some algebra.
$$\frac{x+i}{x-i}= a \implies x + i = ax - ai \implies x - ax = -i - ai \implies x(1 - a) = -i(1+a) \implies x = \frac{-i(1 + a)}{1 - a}$$
A: I think that you could go one step further $$\frac{x+i}{x-i}= a + i b \implies x=i\frac{a+i b+1}{a+i b-1}=i\frac{a+i b+1}{a+i b-1}\times\frac{a-i b-1}{a-i b-1}$$ Develop and isolate the real and imaginary parts to get $$x=\frac{2 b}{(a-1)^2+b^2}+ i\frac{a^2+b^2-1}{(a-1)^2+b^2}$$ But, an here starts the beauty in your problem : $a$ is a cosine and $b$ is a sine which makes the imaginary part disappearing since $a^2+b^2=1$. 
So what is left is $$x=\frac{2 b}{(a-1)^2+b^2}=\frac{2 b}{a^2-2a+1+b^2}=\frac{2 b}{2-2a}=\frac{ b}{1-a}=\frac{ \sin(\theta)}{1-\cos(\theta)}$$ Now, use the half angle formula $$x=\frac{ \sin(\theta)}{1-\cos(\theta)}=\frac {2 \sin(\frac \theta 2)\cos(\frac \theta 2)}{2\sin^2(\frac \theta 2)}=\cot (\frac{\theta}{2})$$
