Representing Complex Exponentials with Real and Imaginary Parts My confusion lies with this : http://www.wolframalpha.com/input/?i=modulus+%28cos%282+pi+r_1%29%2Bcos%282+pi+r_2%29%2Bi+%28sin%282+pi+r_1%29%2Bsin%282+pi+r_2%29%29%29+squared
I was looking at alternate representations, and I was confused how to go from $|Exp(2\pi i R_1) + Exp(2\pi i R_2)|^2$ to a representation using Real and Imaginary parts, as on the link.
To clear confusion:
I was looking at $(-Im(\sin(2 \pi r_1))-Im(\sin(2 \pi r_2))+Re(\cos(2 \pi r_1))+Re(\cos(2 \pi r_2)))^2+(Im(\cos(2 \pi r_1))+Im(\cos(2 pi r_2))+Re(\sin(2 \pi r_1))+Re(\sin(2 \pi r_2)))^2$
 A: Using Prosthaphaeresis Formulas
$$\cos2\pi r_1+\cos2\pi r_2=2\cos(r_1+r_2)\pi\cdot\cos(r_1-r_2)\pi$$
$$\sin2\pi r_1+\sin2\pi r_2=2\sin(r_1+r_2)\pi\cdot\cos(r_1-r_2)\pi$$
So using $|x||y|=|xy|$ (where $x,y$ are complex numbers),
$$\left|\cos2\pi r_1+\cos2\pi r_2+i(\sin2\pi r_1+\sin2\pi r_2)\right|$$
$$=2|\cos(r_1-r_2)\pi|\cdot|\cos(r_1+r_2)\pi+i\sin(r_1+r_2)\pi|$$
Now  what is $|\cos\phi+i\sin\phi|=?$
A: Another way :$$F=\left|\cos A+\cos B+i(\sin A+\sin B)\right|$$
$$=\sqrt{(\cos A+\cos B)^2+(\sin A+\sin B)^2}$$
$$=\sqrt{2+2\cos(A-B)}$$
Using Double-Angle Formulas $\displaystyle \cos2A=2\cos^2A-1$,
$$F=\sqrt{2\cdot 2\cos^2\frac{A-B}2}=2\left|\cos\frac{A-B}2\right|$$
A: Perhaps I am missing something, but the answer seems like it can be presented in a much simpler fashion than the other two answers. 
Euler's formula states that
$$e^{ix} = \cos{x}+i\sin{x},$$
explaining the separation of a complex exponential into real and imaginary components. Thus, for
$$\left| e^{2\pi i r_1} + e^{2\pi i r_2} \right| ^2$$
we expand the two complex exponentials using Euler's formula, resulting in
$$\left| \cos{(2\pi r_1)} + i\sin{(2\pi r_1)} + \cos{(2\pi r_2)} + i\sin{(2\pi r_2)}\right| ^2.$$
Note that if we rearrange the terms and factor an $i$, we are left with
$$\left| \cos{(2\pi r_1)} +\cos{(2\pi r_2)} + i(\sin{(2\pi r_1)} + \sin{(2\pi r_2)})\right| ^2$$
which was your original input on WolframAlpha. In this case, the real part is
$$\cos{(2\pi r_1)} +\cos{(2\pi r_2)}$$
and the imaginary part is
$$\sin{(2\pi r_1)} + \sin{(2\pi r_2)}.$$
As for a proof of Euler's formula, if you scroll down to where it says "Using power series" in the Wikipedia link you will find the proof which is usually encountered first in the calculus sequence.
