I couldn't remember if we had a general TIL thread - I know we have an R specific one but this is just math related.

Today I learned (or rather discovered) that

Euler's formula is a much easier way to derive/remember the "Sine of sums" and "Cosine of sums" trig identities

(relevant wikipedia link).

So Euler's formula tells us that

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

Now we'll apply that to

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

Now use Euler's formula on both sides

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

Now expand the right hand side

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

Now to get the identities of interest we just equate the real portion and then the imaginary portion of the equation giving us

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

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

I always have an easier time remembering derivations compared to just memorizing formulas. I'm not sure how often anybody here comes across a need for the sum of sines or sum of cosines identities - I know I needed them a lot in my PhD theory courses once we started using characteristic functions to solve everything...