I was looking at this answer and I was confused to see the equality $$-\frac12\left[\;\log\left(1-e^{2ix}\right)+\log\left(1-e^{-2ix}\right)\;\right]=-\frac12\log(2-2\cos2x)$$ Which I am unable to prove.
I have tried $$ S=-\frac12\log(1-e^{2ix})-\frac12\log(1-e^{-2ix})=-\frac12\log\frac{1-e^{2ix}}{1-e^{-2ix}} $$ Then with $u=e^{ix}$: $$\frac{1-u^2}{1-\frac1{u^2}}=\frac{1-u^2}{1-\frac1{u^2}}\frac{u^2}{u^2}=-u^2\frac{u^2-1}{u^2-1}=-u^2$$ So $$S=-\frac12\log(-e^{2ix})=-\frac{i\pi}2-ix$$ Which I'm fairly certain is wrong. I'm sure there is something realy simple I'm missing here, could I have some help? Thanks.