Magnitude and Phase Plot

To plot the magnitude and phase of $H(j \omega) = e^{j a_1 \omega} + e^{j a_2 \omega}$ vs $\omega$, one of the tricks is to express $e^{j a_1 \omega} + e^{j a_2 \omega}$ as follows

(1)
\begin{eqnarray} e^{j a_1 \omega} + e^{j a_2 \omega} & = & e^{j \left(\frac{a_1+a_2}{2} \omega \right)} \left[ e^{j \left(\frac{a_1-a_2}{2} \right)\omega} + e^{-j \left( \frac{a_1-a_2}{2} \omega \right)} \right] \\ \nonumber & = & e^{j \left(\frac{a_1+a_2}{2} \omega \right)} 2 \cos \left[ \left( \frac{a_1 - a_2}{2} \right) \omega \right] \end{eqnarray}

Now, it is easy to see that $|H(j \omega)| = 2 |e^{j \left(\frac{a_1+a_2}{2} \omega \right)}| \cdot |\cos \left[ \left( \frac{a_1 - a_2}{2} \right) \omega \right]|$ which is simply $2 |\cos \left[ \left( \frac{a_1 - a_2}{2} \right) \omega \right]|$.