One Finite Sum

In this post I want to find the value of the following finite sum,

\displaystyle\sum_{k=1}^{m-1}\frac{1}{\sin^2(\frac{k\pi}{m})}

I use the following amazing identity that you can see it’s proof in my previous posts

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

By this identity, I can write

                    \displaystyle\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}

                                                           \displaystyle=\sum_{k=0}^{m-1}\sum_{n\in\mathbb{Z}}\frac{1}{\frac{(x+k\pi+mn\pi)^2}{m^2}}

                                                          \displaystyle=m^2\sum_{k=0}^{m-1}\sum_{n\in\mathbb{Z}}\frac{1}{(x+k\pi+mn\pi)^2}

                                                          \displaystyle=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)}

and this follows that

\displaystyle\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,

\boxed{\displaystyle\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}}

One Finite Sum