# A converging trignometry series [duplicate]

Show that the sum to $$n$$ terms of the series,

$$\cos{x}+ \cos{2x}+ \cos 3x+......$$ is $$\frac{1}{2}\left[\sin (n+\frac x2)\csc(\frac x2-1)\right]$$

Let $$C=\cos x+\cos 2x+\cdots +\cos nx\cdots \cdots (1)$$
and $$S=\sin x+\sin 2x+\cdots\cdots +\sin nx \cdots (2)$$
So $$\displaystyle C+iS=e^{ix}+e^{2ix}+\cdots +e^{i(nx)}=\frac{e^{ix}-e^{i(n+1)x}}{1-e^{ix}}$$
Since $$\cos x = \frac12(e^{ix} + e^{-ix})$$, then \begin{align*} \sum_{k=1}^n \cos kx &= \frac12\sum_{k=1}^ne^{kix} + \frac12\sum_{k=1}^ne^{-kix}\\[5pt] &= \frac12\frac{e^{ix}(e^{nix}-1)}{e^{ix}-1} - \frac12\frac{1-e^{-nix}}{1-e^{ix}}\\[5pt] &= \frac{e^{-nix}(e^{nix}-1)(e^{(n+1)ix}+1)}{2(e^{ix}-1)}. \end{align*} Expanding this using $$e^{ix}=\cos x+i\sin x$$ will, after some tedious simplifying, yield $$\frac12\sin\big(n+\frac x2\big)\csc\big(\frac x2-1\big)$$.