Show $|1-e^{ix}|^2=2(1-\cos x)$ Show $|1-e^{ix}|^2=2(1-\cos x)$
$$|1-e^{ix}||1-e^{ix}|=1-2e^{ix}+e^{2ix}=e^{ix}(e^{-ix}-2+e^{ix})=e^{ix}(2\cos x-2)=-2e^{ix}(1-\cos x)$$
Not sure how they got rid of the $-e^{ix}$ factor. Did I expand the absolute values wrong? thank you

Recall that $$e^{ix} = \cos x + i\sin x$$
Then $$\left|1 - e^{ix}\right|^2 = |1 - (\cos x + i\sin x)|^2$$
Can you take it from here? Or, expand $$\left|1-e^{i x}\right|^2 = (1-e^{i x}) (1-e^{-i x})$$ and then use the identity above.
