Is there any closed form for the following finite sum $$\sum_{j=1}^{n-1}\frac{(-1)^j}{\sin (\frac{j\pi}{n})}$$ where $n$ is an even number?
Any comment or reference is welcome.
Is there any closed form for the following finite sum $$\sum_{j=1}^{n-1}\frac{(-1)^j}{\sin (\frac{j\pi}{n})}$$ where $n$ is an even number?
Any comment or reference is welcome.
The sum can be rewritten as an integral, by means of $$\frac{1}{\sin (\pi j/n)}=\frac{n}{\pi}\int_0^\infty\frac{s^{j-1}}{ s^n+1}\,ds,\;\;0<j<n,$$ $$\Rightarrow \sum_{j=1}^{n-1}\frac{(-1)^j}{\sin (\pi j/n)}=-\frac{n}{\pi}\int_0^\infty \frac{(-s)^{n-1}+1}{ (s+1)(s^n+1)}\,ds=\begin{cases} 0&\text{for odd}\;\;n,\\ -\frac{2n}{\pi}\int_0^1\frac{s^{n-1}+1}{ (s+1)(s^n+1)}\,ds&\text{for even}\;\;n. \end{cases} $$ This does not simplify further for arbitrary even $n$. The large-$n$ asymptotics for even $n=2p$ can be readily derived from the integral expression, $$\lim_{p\rightarrow\infty}\frac{1}{2p}\sum_{j=1}^{2p-1}\frac{(-1)^j}{\sin (\pi j/n)}= -\frac{2}{\pi}\int_0^1\frac{1}{s+1}\,ds=-\frac{2}{\pi}\ln 2=-0.441271$$
Higher order terms in a series expansion were evaluated in On a generalization of Watson's trigonometric sum, or Dowker's sum of order one half, $$\sum_{j=1}^{n-1}\frac{(-1)^j}{\sin (\pi j/n)} = -\frac{\,2n\ln2\,}{\,\pi\,}\: - 2\sum_{r=1}^{N-1} \frac{\,(-1)^{r+1}\big(2^{2r-1}-1\big) \big(2^{2r}-1\big)\pi^{2r-1} B^2_{2r}\,}{\,r\, (2r)!\, n^{2r-1}\,} \, + \, O\big(n^{1-2N}\big),$$ where the $B_p$ are Bernoulli numbers and $n$ is even. The first few terms are $$\sum_{j=1}^{n-1}\frac{(-1)^j}{\sin (\pi j/n)} =-\frac{\,2n\ln2\,}{\,\pi\,} -\frac{\pi}{\,12\, n\,} +\frac{7\pi^3}{\,1440\,n^3\,} -\frac{31\pi^5}{\,30\,240\,n^5\,}+\frac{2159\pi^7}{\,4\,838\,400\,n^7\,}+\ldots $$
As a curiosity, I note that the sum for odd $n$, with an offset $\phi$ in the argument of the sine, can be evaluated in closed form: $$\sum_{j=0}^{n-1}\frac{(-1)^j}{\sin(\phi+\pi j/n)}=\frac{n}{\sin n\phi},\;\;n=1,3,5,\ldots$$ A result due to Euler, see On a finite sum of cosecants appearing in various problems
I'm not sure if this representation is really helpful, but the above sum $S_n$ can be written in terms of the $q$-digamma function $\psi_q(z)$. Define $q=r\exp(2\pi i/n)$ and $m=\lfloor n/4\rfloor$, with $r<1$ and even $n$, then \begin{align} S_n &= 1 + \frac{n}{\pi}\lim_{r\to1^-} \big[ \psi_q\left( 1 \right) -\psi_q\left(\tfrac{1}{2}\right) +\psi_q\left(m+\tfrac{n}{2}+1\right) -\psi_q\left(m+\tfrac{n}{2}+\tfrac{1}{2}\right) \\ & \qquad{} -\psi_q(m+1) +\psi_q\left(m+\tfrac{1}{2}\right) -\psi_q\left(\tfrac{n}{2}+1\right) +\psi_q\left(\tfrac{n}{2}+\tfrac{1}{2}\right) \big]. \label{eq:1}\tag{1} \end{align}
Mathematica finds this representation if one uses the symmetry $ j \leftrightarrow n-j$ and splits the sum into even and odd parts.