Sum of Cosines of Multiples of Angle

Theorem

 * $\displaystyle \dfrac 1 2 + \sum_{k \mathop = 1}^n \cos \left({k x}\right) = \frac {\sin \left({\left({2 n + 1}\right) x / 2}\right)} {2 \sin \left({x / 2}\right)}$

where $x$ is not an integer multiple of $2 \pi$.

Proof
By the Product-to-Sum Formula: Cosine by Sine:
 * $2 \cos \alpha \sin \beta = \sin \left({\alpha + \beta}\right) - \sin \left({\alpha - \beta}\right)$

Thus we establish the following sequence of identities:

Summing the above:


 * $\displaystyle 2 \sin \frac x 2 \left({\frac 1 2 + \sum_{k \mathop = 1}^n \cos \left({k x}\right)}\right) = \sin \frac {\left({2 n + 1}\right) x} 2$

as the sums on the form a telescoping series.

The result follows by dividing both sides by $2 \sin \dfrac x 2$.

It is noted that when $x$ is a multiple of $2 \pi$ then:
 * $\sin \dfrac x 2 = 0$

leaving the undefined.