<s>[INST] 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?
 [/INST] $$
   \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
$$
</s>