Finite Sum $\sum\limits_{k=1}^{m-1}\frac{1}{\sin^2\frac{k\pi}{m}}$

Question : Is the following true for any $m\in\mathbb N$? $$\begin{align}\sum_{k=1}^{m-1}\frac{1}{\sin^2\frac{k\pi}{m}}=\frac{m^2-1}{3}\qquad(\star)\end{align}$$

Motivation : I reached $(\star)$ by using computer. It seems true, but I can't prove it. Can anyone help?

By the way, I've been able to prove $\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{{\pi}^2}{6}$ by using $(\star)$.

Proof : Let $$f(x)=\frac{1}{\sin^2x}-\frac{1}{x^2}=\frac{(x-\sin x)(x+\sin x)}{x^2\sin^2 x}.$$ We know that $f(x)\gt0$ if $0\lt x\le {\pi}/{2}$, and that $\lim_{x\to 0}f(x)=1/3$. Hence, letting $f(0)=1/3$, we know that $f(x)$ is continuous and positive at $x=0$. Hence, since $f(x)\ (0\le x\le {\pi}/2)$ is bounded, there exists a constant $C$ such that $0\lt f(x)\lt C$. Hence, substituting $x={(k\pi)}/{(2n+1)}$ for this, we get $$0\lt \frac{1}{\frac{2n+1}{{\pi}^2}\sin^2\frac{k\pi}{2n+1}}-\frac{1}{k^2}\lt\frac{{\pi}^2C}{(2n+1)^2}.$$ Then, the sum of these from $1$ to $n$ satisfies $$0\lt\frac{{\pi}^2\cdot 2n(n+1)}{(2n+1)^2\cdot 3}-\sum_{k=1}^{n}\frac{1}{k^2}\lt\frac{{\pi}^2Cn}{(2n+1)^2}.$$ Here, we used $(\star)$. Then, considering $n\to\infty$ leads what we desired.


Note that $$\frac{1}{\sin^2(x)}=\sum_{n\in\mathbb{Z}}\frac{1}{(x+n\pi)^2}$$

using this identity we can write $$\begin{align}\sum_{k=0}^{m-1}\frac{1}{\sin^2(\frac{x+k\pi}{m})}&=\sum_{k=0}^{m-1}\sum_{n\in\mathbb{Z}}\frac{1}{(\frac{x+k\pi}{m}+n\pi)^2}\\ &=\sum_{k=0}^{m-1}\sum_{n\in\mathbb{Z}}\frac{1}{\frac{(x+k\pi+mn\pi)^2}{m^2}}\\ &=m^2\sum_{k=0}^{m-1}\sum_{n\in\mathbb{Z}}\frac{1}{(x+k\pi+mn\pi)^2}\\ &=m^2\sum_{n\in\mathbb{Z}}\sum_{k=0}^{m-1}\frac{1}{(x+(k+mn)\pi)^2}=\frac{m^2}{\sin^2(x)}\end{align}$$ and $$\sum_{k=1}^{m-1}\frac{1}{\sin^2(\frac{x+k\pi}{m})}=\frac{m^2}{\sin^2(x)}-\frac{1}{\sin^2(\frac{x}{m})}$$ Hence, $$\sum_{k=1}^{m-1}\frac{1}{\sin^2(\frac{k\pi}{m})}=\lim_{x\to0}\frac{m^2}{\sin^2(x)}-\frac{1}{\sin^2(\frac{x}{m})}=\frac{m^2-1}{3}.$$


Consider the polynomial $S_m(x)$, satisfying $S_m(\sin^2 \theta)=\sin^2(m\theta)$.

These are known as spread polynomials, and may easily be derived from the Chebyshev polynomials $T_m(x)$, via $$1-2S_m(\sin^2(\theta)=1-2\sin^2(m\theta)=\cos(m(2\theta))=T_m(\cos(2\theta))=T_m(1-2\sin^2 \theta)$$ so $1-2S_m(x)=T_m(1-2x)$.

Note that \begin{align} &S_{m+1}(\sin^2 \theta)+S_{m-1}(\sin^2 \theta) \\ & =\sin^2(m\theta+\theta)+\sin^2(m\theta-\theta) \\ &=(\sin(m\theta)\cos \theta+\cos(m\theta)\sin \theta)^2+(\sin(m\theta)\cos \theta-\cos(m\theta)\sin \theta)^2 \\ &=2\sin^2(m \theta)\cos^2 \theta+2\cos^2(m \theta) \sin^2(m\theta) \\ &=2(1-\sin^2 \theta)S_m(\sin^2 \theta)+2\sin^2 \theta(1-S_m(\sin^2 \theta)) \end{align}

Thus $S_{m+1}(x)=2(1-2x)S_m(x)-S_{m-1}(x)+2x$.

(We could also have used the more well known recurrence $T_{n+1}(x)=2xT_n(x)-T_{n-1}(x)$ and derived the recurrence for $S_m$ from there.)

Observe that $\sin^2(\frac{k\pi}{m}), k=0, 1, \ldots, m-1$ are roots of the polynomial equation $S_m(x)=0$. Put $S_m(x)=xP_m(x)$, so that $\sin^2(\frac{k\pi}{m}), k=1, 2, \ldots, m-1$ are roots of the polynomial equation $P_m(x)=0$. The recurrence for $S_m$ gives $$P_{m+1}(x)=2(1-2x)P_m(x)-P_{m-1}(x)+2$$

Now if we write $P_m(x)=a_m+b_mx+x^2Q_m(x)$, it is clear by Vieta's formulas that $$\sum_{k=1}^{m-1}{\frac{1}{\sin^2(\frac{k\pi}{m})}}=\frac{\sum_{k=1}^{m-1}{\prod_{j \not =k}{\sin^2(\frac{j\pi}{m})}}}{\prod_{i=1}^{m-1}{\sin^2(\frac{k\pi}{m})}}=-\frac{b_m}{a_m}$$

We prove by induction on $m$ that $a_m=m^2, b_m=-\frac{(m^2-1)m^2}{3}$.

When $m=1$, we have $S_1(x)=x$ so $P_1(x)=1=(1^2)-\frac{(1^2-1)1^2}{3}x$ so the statement is true for $m=1$.

When $m=2$, we have $S_2(x)=4x(1-x)$ so $P_2(x)=4-4x=2^2-\frac{(2^2-1)2^2}{3}x$ so the statement is true for $m=2$.

Suppose that the statement holds for $m=i-1, i$, where $i \geq 2$. Then

\begin{align} P_{i+1}(x)&=2(1-2x)P_i(x)-P_{i-1}(x)+2 \\ &=2(1-2x)(a_i+b_ix+x^2Q_i(x))-(a_{i-1}+b_{i-1}x+x^2Q_{i-1}(x))+2 \\ &=(2a_i-a_{i-1}+2)+(2b_i-4a_i-b_{i-1})x+x^2(-4b_i+2Q_i(x)-Q_{i-1}(x)) \end{align}

Thus (after some algebra manipulation) $$a_{i+1}=2a_i-a_{i-1}+2=(i+1)^2$$ and \begin{align} b_{i+1}=2b_i-4a_i-b_{i-1}&=-2\frac{(i^2-1)i^2}{3}-4i^2+\frac{((i-1)^2-1)(i-1)^2}{3} \\ &=-\frac{((i+1)^2-1)(i+1)^2}{3} \end{align}

We are thus done by induction.

Now,

$$\sum_{k=1}^{m-1}{\frac{1}{\sin^2(\frac{k\pi}{m})}}=-\frac{b_m}{a_m}=-\frac{-\frac{(m^2-1)m^2}{3}}{m^2}=\frac{m^2-1}{3}$$


Using the partial fractions identity, it's possible to split the summation into two

$$ \frac{2}{\sin^2 \theta} = \frac{1}{1-\cos \theta} + \frac{1}{1+\cos \theta}$$

Now our sum over the nth roots

$$ (\star) =\sum_{k=1}^{m-1} \frac{1}{\sin^2 \frac{\pi k }{n}} = \frac{1}{2}\sum_{k=1}^{m-1} \frac{1}{1-\cos \frac{\pi k }{n}} + \frac{1}{2}\sum_{k=1}^{m-1} \frac{1}{1+\cos \frac{\pi k }{n}} $$

If we can find the right polynomial $P(x)$, we can find our sum using the identity for the logarithmic derivative. We need to plug in $x=1$ and $x=-1$ and subtract.

$$ \frac{P'(x)}{P(x)} =\sum \frac{1}{x-r_i} \text{ then } \sum \frac{1}{1-r_i} + \sum \frac{1}{1+r_i} = \frac{P'(1)}{P(1)} - \frac{P'(-1)}{P(-1)} $$

My first guess is the Chebyshev polynomials satisfy $T_n(\cos \theta) = \cos n \theta $.
The roots of $T_m(x) = 0$ are $x = \cos \frac{2\pi k}{m}$ with $k = 0,1,2, \dots, m-1$.
Instead, we need a polynomial with roots of $x = \cos \frac{\pi k}{m}$ which is the derivative $\boxed{P(x)=T'_m(x)}$ (Chebyshev polynomial of second kind)


In the case of the Chebyshev polynomial I got these two expressions for the values of the derivative at $x=1$:

Let $T(\cos \theta) = \cos n \theta$. Then set $\theta = 0$:

$$ T(1) = 1 $$

If we take the derivative (whose zeros have roots exactly where we want)

$$\boxed{ \sin \theta \; T'(\cos \theta) = -n \sin n \theta} \hspace{0.25in}\text{ so that }\hspace{0.25in} \boxed{\displaystyle T'(\cos \theta) = -\frac{n \sin n \theta}{\sin \theta} \bigg|_{\theta=0}= -n^2}$$

and for the second derivative, try the quotient rule:

\begin{eqnarray} T''(\cos \theta) &=& n \cdot \frac{n \cos n \theta \sin \theta - \sin n \theta \cos \theta}{\sin^3 \theta} \\ &=\bigg|_{\theta \approx 0}& n \cdot \frac{n (1 - n^2 \theta^2 /2)(\theta - \theta^3 /6) - (n \theta - (n\theta)^3/6)(1 - \theta^2 /2)}{\theta^3} \\ &=\bigg|_{\theta \approx 0}& \frac{n^2 - n^4 }{3}\end{eqnarray}

If we set $\theta = \pi$, just get a $(-1)^n$ factor. In general your sum is

$$ (\star) = \frac{T'(1)}{T''(1)} = \frac{T'(-1)}{T''(-1)} = \frac{1}{2}\left( \frac{T'(1)}{T''(1)} + \frac{T'(-1)}{T''(-1)}\right) = \frac{\tfrac{1}{3}(n^4 - n^2)}{n^2} = \frac{n^2 - 1 }{3}$$


COMMENTS It is surprisingly hard to pin all the details down. See also: Sum of the reciprocal of sine squared