Let $n$ and $k$ are integers with $n>0$. Prove that \[-\frac{1}{2n}\sum^{n-1}_{m=1}\cot \frac{\pi m}{n}\sin \frac{2\pi km}{n}= \begin{cases}\tfrac{k}{n}-\lfloor\tfrac{k}{n}\rfloor-\frac12 & \text{if }k|n \\ 0 & \text{otherwise}\end{cases}.\]
Source:
Tags: trigonometry, floor function, Miscellaneous Problems
Let $n$ and $k$ are integers with $n>0$. Prove that \[-\frac{1}{2n}\sum^{n-1}_{m=1}\cot \frac{\pi m}{n}\sin \frac{2\pi km}{n}= \begin{cases}\tfrac{k}{n}-\lfloor\tfrac{k}{n}\rfloor-\frac12 & \text{if }k|n \\ 0 & \text{otherwise}\end{cases}.\]