Reading an solution I get stuck at this step.
$$ \frac{1}{2i} \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n} \left( e^{2in} - e^{-2in} \right) \\ = - \frac{1}{2i} \left( \ln(1 + e^{2i}) - \ln(1- e^{-2i}) \right) $$
Could someone explain to me what is done here? How can $\sum$ be replace with $\ln$? What is really done here? Is it possible to divide this into more steps?
Hints:
$$\ln (1+x)=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^{n}}{n} $$
Where $x\in (-1,1]$