While studying some physics problems on electrostatics, I derived this curious identity that I am having trouble proving. Show that: $$ \sum_{n=1}^{N-1} \cos\left(\frac{2\pi{}n}{N}\right)=-1 $$ where, $N$, is odd.
The original problem was to find the electric field at the centre of a $13$-sided polygon that has $13$ equal charges, $q$, situated at its corners. The distance from the centre to the corners is, $R$. The hand-wavey physics answer was to use symmetry to conclude that the electric field is zero, however this was not mathematically satisfying especially because for a polygon with an odd number of vertices, it is not so simple. Knowing that the electric field must sum to zero, I derived the above identity by considering the contributions in the $x$-axis of all the charges except the one charge located on the $x$-axis. If one could prove this identity, then one could make an argument of rotational symmetry for the remaining charges to show that the electric field sums to zero. How can you prove the above identity?