Integral over 2 pi of Cosine of m x by Cosine of n x

Theorem
Let $m, n \in \Z$ be integers.

Then:


 * $\displaystyle \int_0^{2 \pi} \cos m x \cos n x \, \mathrm d x = \begin{cases}

0 & : m \ne n \\ \pi & : m = n \end{cases}$

That is:
 * $\displaystyle \int_0^{2 \pi} \cos m x \cos n x \, \mathrm d x = \pi \delta_{m n}$

where $\delta_{m n}$ is the Kronecker delta.

Proof
Let $m \ne n$.

From Sine of Zero is Zero:
 * $\left({\dfrac {\sin \left({m - n}\right) 0} {2 \left({m - n}\right)} + \dfrac {\sin \left({m + n}\right) 0} {2 \left({m + n}\right)} }\right) = 0$

and from Sine of Multiple of Pi:
 * $\left({\dfrac {\sin \left({m - n}\right) 2 \pi} {2 \left({m - n}\right)} + \dfrac {\sin \left({m + n}\right) 2 \pi} {2 \left({m + n}\right)} }\right) = 0$

and so when $m \ne n$:
 * $\displaystyle \int_0^{2 \pi} \cos m x \cos n x \, \mathrm d x = 0$

When $m = n$ we have: