<s>[INST] $S=\left \{z\in\mathbb{C}| (z+i)^{n}=(z-i)^{n} \right \}$ $S=?$ If $n\in\mathbb{N}, n\geq2$ and $S=\big \{z\in\mathbb{C}| (z+i)^{n}=(z-i)^{n} \big \}$ then $S=?$ The right answer is 
$$
S=\left \{\operatorname{ctg}\frac{k\pi}{n} |1\leq k\leq n-1;k\in\mathbb{N}\right \}
$$
I started like this $\left(\frac{z+i}{z-i}\right)^{n}=1$. How to continue? Some ideas?
 [/INST] $$\frac{z+i}{z-i} = \frac{x + (y+1)i}{x + (y-1)i} = \frac{x^2 -  y^2 + 1}{x^2 + (y-1)^2} + \frac{2xy}{x^2 + (y-1)^2}i = r e^{i\theta}$$
so
$$r = \vert \frac{z+i}{z-i} \vert = \sqrt{ \frac{(x^2 -  y^2 + 1)^2}{(x^2 + (y-1)^2)^2} + \frac{4x^2y^2}{(x^2 + (y-1)^2)^2} } = 1$$
which is
$$  (x^2 -  y^2 + 1)^2+4x^2y^2   = (x^2 + (y-1)^2)^2 \tag{1}$$
Another equation could be obtained from the phase, that is 
$$n\theta = 2k\pi \tag{2}$$
where $\theta = \arctan \frac{2xy}{x^2-y^2 + 1} $
</s>