# Show that $\sum\limits_{i=1}^N\sin^2\frac{m\pi i}{N+1}=\frac{N+1}{2}$

I have recently found this excercise and was not able to solve it so far. Show that

$$\sum_{i=1}^N\sin^2\frac{m\pi i}{N+1}=\frac{N+1}{2}\;,$$ where $m \in \lbrace1,2,...,N\rbrace$.

This was one of my attempts:

$$\sum_{i=1}^N\sin^2\frac{m\pi i}{N+1}=\sum_{i=1}^N\frac{1}{2}\left[\cos(0)-\cos\frac{2m\pi i}{N+1}\right]=\frac{1}{2}-\frac{1}{2}\sum_{i=1}^N\cos\frac{2m\pi i}{N+1}$$

It seems the last sum should be equal to $-N$. Can anyone give me a clue?

-
By the way, $\sum_{k=1}^N \frac{\cos(0)}{2}$ equals $\frac{N}{2}$, not $\frac{1}{2}$. – Sasha May 9 '12 at 21:54
Thanks Sasha! In this case I've found the solution:D Silly – adamG May 9 '12 at 21:58

$$\sum_{k=1}^{n} \cos\left( \frac{2 m \pi k}{n+1}\right) = \Re \sum_{k=1}^{n} \exp\left( i \frac{2 m \pi k}{n+1}\right) = \Re\left( \sum_{k=1}^n z^k \right) = \Re\left( \frac{1-z^n}{1-z} z \right)$$ where $z= \exp\left( i \frac{2 m \pi}{n+1}\right)$. Since $z^{n+1} = 1$: $$\Re\left(\frac{z-1}{1-z}\right) = -1$$
Note that $\cos x$ can be expressed in terms of the exponential function (i.e. Euler's formula), and so the sum of cosines is really the sum of a geometric series which is easily summable.