Sum of a cosine series I have a short question:
It turns out that the following holds:
$\sum_{i=1}^{k-1} \cos(\frac{2\pi i}{k}) = - 1$. 
Why is that? 
Thank you!

Clearly, the Series vanishes if $k=1$
If $k>1, \sin\frac{\pi}k\ne0$
As $2\cos A\sin B=\sin(A+B)-\sin(A-B),$ using this,  $$2\cos\frac{2i\pi}k\sin\frac{\pi}k=\sin\frac{(2i+1)\pi}k-\sin\frac{(2i-1)\pi}k $$
Putting $i=1,2,\cdots,k-1$ and summing we get  $$2\sin\frac{\pi}k\sum_{1\le i\le k-1}\cos\frac{2i\pi}k=\sin\frac{(2k-1)\pi}k-\sin\frac{\pi}k=2\sin\frac{(k-1)\pi}k\cos\frac{k\pi}k$$
Using $\displaystyle\sin C-\sin D=2\sin\frac{C-d}2\cos\frac{C+D}2,$
$\displaystyle\sin\frac{(2k-1)\pi}k-\sin\frac{\pi}k=2\sin\frac{(k-1)\pi}k\cos\frac{k\pi}k$
Now, $\displaystyle \cos\frac{k\pi}k=\cos\pi=-1$ and $\displaystyle \sin\frac{(k-1)\pi}k=\sin\left(\pi-\frac\pi k\right)=\sin\frac\pi k\ne0$
