How to prove $\sum_{k=1}^n \cos(\frac{2 \pi k}{n}) = 0$ for any n>1? [duplicate]
Solution 1:
We have $$\sum_{k=1}^{n}\cos\left(\frac{2\pi k}{n}\right)=\textrm{Re}\left(\sum_{k=1}^{n}e^{2\pi ik/n}\right) $$ and so $$\sum_{k=1}^{n}e^{2\pi ik/n}=\frac{e^{2\pi i/n}\left(1-e^{2\pi i}\right)}{1-e^{2\pi i/n}} $$ and notice that $$e^{2\pi i}=\cos\left(2\pi\right)+i\sin\left(2\pi\right)=1 $$ so the claim follows.
Solution 2:
One approach is to write
$$\cos\left(\frac{2\pi k}{n}\right)=\frac{1}{2\sin\left(\frac{2\pi}{n}\right)}\left(\sin\left(\frac{2\pi(k+1)}{n}\right)-\sin\left(\frac{2\pi(k-1)}{n}\right)\right)$$
Now, we have converted the sum into a telescoping sum, which we can evaluate directly as
$$\begin{align} \sum_{k=1}^n\cos\left(\frac{2\pi k}{n}\right)&=\frac{1}{2\sin\left(\frac{2\pi}{n}\right)}\left(\sin\left(\frac{2\pi(n+1)}{n}\right)+\sin\left(\frac{2\pi(n)}{n}\right)\right)\\\\ &-\frac{1}{2\sin\left(\frac{2\pi}{n}\right)}\left(\sin\left(\frac{2\pi(2-1)}{n}\right)+\sin\left(\frac{2\pi(1-1)}{n}\right)\right)\\\\ &=\frac{1}{2\sin\left(\frac{2\pi}{n}\right)}\left(\sin\left(\frac{2\pi(n+1)}{n}\right)-\sin\left(\frac{2\pi(2-1)}{n}\right)\right)\\\\ &=\frac{1}{2\sin\left(\frac{2\pi}{n}\right)}\left(\sin\left(\frac{2\pi}{n}\right)-\sin\left(\frac{2\pi}{n}\right)\right)\\\\ &=0 \end{align}$$
Solution 3:
You are considering the real part of the sum of the roots of $x^n-1$. By Viète's theorem the sum of the roots of $x^n-1$ is the coefficient of $x^{n-1}$, i.e. zero.