Euler's formula

e^{i\alpha} = \cos(\alpha) + i \sin(\alpha)

provides an easy way to remember the addition and subtraction formulas for \sine and co\sine.

Indeed, from

e^{i(\alpha +\beta)} = e^{i\alpha} \cdot e^{i\beta}

and Euler's formula we obtain

e^{i(\alpha +\beta)} = \cos(\alpha + \beta) + i \sin(\alpha + \beta)

and, on the other hand,

e^{i\alpha} \cdot e^{i\beta} = (\cos(\alpha) + i \sin(\alpha))(\cos(\beta) + i \sin(\beta)).

Carrying out the multiplication and regrouping leads to

e^{i(\alpha + \beta)} = (\cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta)) + i (\cos(\alpha)\sin(\beta) + \sin(\alpha)\cos(\beta)).

We thus arrive at the two formulas:

\cos(\alpha + \beta) = \cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta)

and

\sin(\alpha + \beta) = \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta).

More generally, with \sin being an odd function,

\cos(\alpha \pm \beta) = \cos(\alpha)\cos(\beta) \mp \sin(\alpha)\sin(\beta)

and

\sin(\alpha \pm \beta) = \sin(\alpha)\cos(\beta) \pm \cos(\alpha)\sin(\beta).

Taking \alpha=\beta gives

\sin2\alpha = 2\cos\alpha \sin\alpha

and

\cos2\alpha = \cos^{2}\alpha - \sin^{2}\alpha = 2\cos^{2}\alpha-1.

Next,

\cos(\alpha+\beta)+\cos(\alpha-\beta)=2\cos\alpha \cos\beta.

Also, solving, say, \gamma=\alpha+\beta and \delta=\alpha-\beta for \alpha and \beta, we obtain \alpha=\frac{\gamma+\delta}{2} and \beta=\frac{\gamma-\delta}{2}. This leads to

\cos(\gamma)+\cos(\delta)=2\cos\frac{\alpha+\beta}{2} \cos\frac{\alpha-\beta}{2}.

Similarly,

\sin(\gamma)+\sin(\delta)=2\sin\frac{\alpha+\beta}{2} \cos\frac{\alpha-\beta}{2}.