Calculate $\sum_{i=1}^n\sin(\frac{\pi\ i}{2n})$ and $\sum_{i=1}^n\sin(\frac{\pi\ i-\pi}{2n})$ 
Need to calculate the following:$\sum_{i=1}^n\sin(\frac{\pi\ i}{2n})$, $\sum_{i=1}^n\sin(\frac{\pi\ i-\pi}{2n})$.

I am sorry that this is short, but I don't know how to even begin. I have tried to look for trigonometric identities, but haven't seen something that fits in these cases. I will be glad for some help. Thanks!
 A: You can find it in a more general case of finding $$\sum_{k=1}^n \sin(kx)$$
The hint for this one would be
$$\sum_{k=1}^n\sin(kx) = \Im\left(\sum_{k=1}^n (e^{ix})^k\right)$$
where $i^2 = -1$.


Here go the calculations:
$$\color{red}{\Im}\left(\sum_{k=1}^n (e^{ix})^k\right)$$
Let us calculate the inner sum.
$$\begin{align}
\sum_{k=1}^n (e^{ix})^k 
&= e^{ix} + e^{2ix} + \dots + e^{nix} \\
&= \frac{e^{ix}(1-e^{nix})}{1-e^{ix}} \\
&= \frac{(\cos x + i\sin x)(1-\cos x - i \sin x)}{1 - \cos x - i \sin x} \\
\end{align}$$
which gives the imaginary part
$${\Im}\left(\sum_{k=1}^n (e^{ix})^k\right) = \frac{\sin\frac{nx}{2}\sin\frac{(n+1)x}{2}}{\sin\frac{x}{2}}$$



Another way without complex numbers is making this a telescoping sum using the identity
$$\sin(kx)\sin(x/2) = \frac{1}{2}\left(\cos\left((k-1/2)x\right)-\cos\left((k+1/2)x\right)\right)$$


While finding $$\sum_{k=1}^n \sin(a+kb)$$
remember that $\sin(a+kb) = \sin(a)\cos(kb) + \cos(a)\sin(kb)$. Then the sum becomes
$$\begin{align}\sum_{k=1}^n \sin(a+kb) &= \sum_{k=1}^n \left[\sin(a)\cos(kb) + \cos(a)\sin(kb)\right] \\&= \sin(a)\sum_{k=1}^n\cos(kb) + \cos(a)\sum_{k=1}^n\sin(kb)\end{align}$$
Now you can use the result from the first part.
