Proving $\sum\limits_{k=1}^{N-1}\left[\frac{\sin\left(\frac{\pi km}{N}\right)}{\sin\left(\frac{\pi k}{N}\right)}\right]^{2}=m(N-m)$

closed-formsummationtrigonometric seriestrigonometry

I recently came across a sum (whose closed-form solution I was able to verify via Wolfram Alpha) but have no idea how to get there.

$$\sum\limits_{k=1}^{N-1}\left[\frac{\sin\left(\frac{\pi km}{N}\right)}{\sin\left(\frac{\pi k}{N}\right)}\right]^{2}=m(N-m)$$

I'm pretty sure it's valid for any $m\in 0,1,2\ldots N-1$ and $N\geq2$

My only ideas were to make exponential substitutions or to bring an integral into the mix like this one $$\frac{\pi^{2}}{\sin^{2}(\pi s)}=\int_{0}^{\infty}\frac{x^{s-1}}{1-x}\ln\left(\frac{1}{x}\right)\mathrm dx$$

I couldn't get very far. I figure there's a better way to simplify the fraction of sine functions since they differ only by a dilation of $m$. Let me know what you guys think!

Best Answer

Using the fact that $\sum_{q=0}^{m-1}D_q(x)=\left({\frac {\sin {\frac {mx}{2}}}{\sin {\frac {x}{2}}}}\right)^{2}$, where $D_q(x)=\sum_{|j| \le q}e^{ijx}$ is the Dirichlet Kernel, we can rewrite the original sum as:

$S_{m,N}=\sum_{k=1}^{N-1}\sum_{q=0}^{m-1}\sum_{|j| \le q}e^{\frac{2\pi ijk}{N}}$, where $0 \le m \le N-1$ fixed.

Fixing now $0 \le |j| \le m-1$ and bringing the terms with $j$ together, we get:

$S_{m,N}=\sum_{|j| \le m-1}((m-|j|)\sum_{k=1}^{N-1}e^{\frac{2\pi ijk}{N}})$

But now the term $j=0$ is obviously $m(N-1)$ while all the other inner exponential sums are $-1$ since $0<|j|<N$, hence we get

$S_{m,N}=m(N-1)-\sum_{0<|j| \le m-1}(m-|j|)=m(N-1)-m(m-1)=m(N-m)$

so we are done!