# A peculiar limit appearing for $\sum\limits_{j = 1}^{N-1} \frac{\exp \left( i\pi k j / N \right) }{\sin \left( \pi j / N \right)}$

I was interested in the analytical calculation of the following sum: $$\sum\limits_{j=1}^{N-1} \dfrac{ \exp \left( i \pi kj/N \right) }{\sin \left( \pi j / N \right)},$$ where $$N$$ is an arbitrary positive integer, and $$0 \le k \le N$$.

As an inspiration I took answers by @metamorphy from here, and in a similar fashion was able to find that: $$\sum\limits_{j = 0}^{N-1} \dfrac{\exp \left( i 2 \pi k j / N \right) }{1 + i 2 z \sin \left( 2 \pi j / N \right) - z^2} = \dfrac{ N (-z)^{-k} \left( (-z)^N - (-z)^{k+N} z^k + (-z^2)^k - (-z^2)^N \right) }{\left( 1 + z^2 \right) \left( 1 - (-z)^N \right) \left( 1 - z^N \right)},$$ where $$0 \le k \le N$$, and $$z$$ is not a singularity. Obviously, this preliminary answer is useful, as we now only need to carefully take the limit $$\lim\limits_{z\to1} \ldots$$, and set $$N \to 2 N$$.

From the sum above we can subtract the term with $$j=0$$ (as it is the source of divergence for $$z=1$$), and obtain:

$$\sum\limits_{j = 1}^{N-1} \dfrac{\exp \left( i 2 \pi k j / N \right) }{i 2 \sin \left( 2 \pi j / N \right)} = \lim\limits_{z \to 1} \left[ \left( \sum\limits_{j = 0}^{N-1} \frac{\exp \left( i 2 \pi k j / N \right) }{1 + i 2 z \sin \left( 2 \pi j / N \right) - z^2} \right) - \dfrac{1}{1-z^2} \right] = \dfrac{1}{4} \left( -2k + N - \dfrac{2 N}{(-1)^k + (-1)^{1+k-N}} \right).$$

And this answer works perfectly for odd $$N$$, while for even $$N$$ it is divergent. It is clear as for even $$N$$ not only the term with $$j=0$$ is divergent, but also the term $$j=N/2$$, so, a naive strategy would be to subtract this second source of divergency, which is $$\dfrac{\exp \left( i \pi k\right)}{1-z^2}$$, but this clearly does not work, as the Eq. above suggests that this won't help with that denominator $$(-1)^k + (-1)^{1+k-N}$$.

Basically, it means that I have to separately find the sum $$\sum\limits_{j = 1}^{N-1} \dfrac{\exp \left( i 2 \pi k j / N \right) }{i 2 \sin \left( 2 \pi j / N \right)}$$ with a condition $$N = 2 \tilde{N}$$, which is exactly the sum that was intended to be found! (which is a bit funny, hehe, as the problem is reduced to itself for even N).

What am I doing wrong, and may there be an alternative approach? I have an intuition that the problem is due to two different divergences, one of which appears for continuous $$z$$, and the other for discrete $$N$$, and may be it requires a more delicate treatment.

UPDATE: Basically, I was able to obtain that:

$$\lim\limits_{z \to 1} \left[ \sum\limits_{j=0}^{N-1} \dfrac{\exp(i 2 \pi k j / N)}{1 + i 2 z \sin(2 \pi j / N) - z^2} - \text{div. terms} \right] = \begin{cases} \frac{1}{2} \left( N - 2 k \right), & \text{ if N is even, and k is odd,}\\ 0, & \text{ if N is even, and k is even,} \\ \frac{1}{4} \left( - 2 k + N + (-1)^{k+1} N \right), & \text{ if N is odd.} \end{cases}$$

As for even $$N, k$$ the answer is $$0$$, then the trick $$N \to 2 N$$ is useless, as it will not give any information about the original sum, right? Probably, Need to use some other trick to cover this case.

• Guys, even if there are any ideas how to compute this in the $N \to \infty$, it would be highly appreciated. However, conversion from a sum to an integral does not seem to work... At least when done in a naive way. Commented Mar 8, 2022 at 9:56
• @metamorphy even if the calculation of $\sum\limits_{m=1}^{N-1} \dfrac{\exp(i k \pi m/N)}{\sin^2(\pi m /N)}$ is possible, then it would be enough for me personally. But as I wrote in the comments in another place, I was able to obtain it only for the case of even $k$. Commented Mar 23, 2022 at 13:14

Denote, for $$n\in\mathbb{Z}_{>1}$$ and $$k,m\in\mathbb{Z}$$, $$S_m(n,k)=\sum_{j=1}^{n-1}\frac{\exp(i\pi kj/n)}{\sin^m(\pi j/n)},$$ then $$S_m(n,k+1)-S_m(n,k-1)=2iS_{m-1}(n,k)$$, and $$S_0(n,k)$$ is a geometric sum, evaluated elementarily. Thus, the evaluation of $$S_1(n,k)$$ reduces to that of $$S_1(n,0)$$ and $$S_1(n,1)$$, say.
For the latter, we have $$S_1(n,1)=-S_1(n,-1)$$ (seen after replacing $$j$$ by $$n-j$$ in the defining sum), which gives eventually $$S_1(n,1)=(n-1)i$$, and a closed form of $$S_1(n,k)$$ for odd $$k$$. The sum $$S_1(n,0)$$, however, doesn't seem to have a nice closed form (see this question for details, including a complete asymptotics as $$n\to\infty$$), and the same pertains to $$S_1(n,k)$$ for even $$k$$.
Similarly, $$S_2(n,k)$$ can be obtained in closed form for even $$k$$; we have $$S_2(n,k+2)-2S_2(n,k)+S_2(n,k-2)=-4S_0(n,k),\\S_2(n,0)=(n^2-1)/3,\quad S_2(n,\pm 2)=(n-1)(n-5)/3.$$ This time, odd values of $$k$$ are problematic, since clearly $$S_2(n,\pm 1)=\pm iS_1(n,0)$$.
• Dear @metamorphy! Thanks for your persistent interest! I myself gave up on this, and was concentrated rather on the problem with a sine squared. Besides what is already present in the update to the original question, I found out that the sum for odd $k$ is not a polynomial in $k$, so it is some function (the answer for even $k$ is a polynomial though and can be deduced from what I have written already). However, I did not try to fit any functions to the numerical answer or analyze the series in $k$, $N$. Commented Aug 1, 2022 at 12:43