Finite summation $\sum _{k=0}^{n-1} \csc ^{2 m}\left(\frac{\pi (2 k+1)}{2 n}+y\right)$ How to prove
$$\sum _{k=0}^{n-1} \csc ^4\left(\frac{\pi  (2 k+1)}{2 n}+y\right)=(n \sec (n y))^4-\frac{2}{3} \left(n^2-1\right) (n \sec (n y))^2$$
Moreover, is there a closed-form for higher order summations? Any help will be appreciated.
 A: Fix an $n$. By analytic continuation, it suffices to assume $y$ be a small positive number, so small such that $0<\frac{\pi(2k+1)}{2n}+y<\pi$ for $k=0,\cdots,n-1$.
Integrate $$f_m(z) = \tan (n(z-y)) \csc^{2m} z$$ around rectangle with vertices $\pm \infty i, \pi \pm \infty i$ (Indention has to be made at $0$ and $\pi$), integrals along two horizontal lines tend to $0$, integrals along two vertical lines cancel by periodicity $f_m(z)=f_m(z+1)$. 
$f_m(z)$ has poles at $$z=0 \qquad z = \frac{\pi(2k+1)}{2n}+y\quad \text{ for }k=0,\cdots,n-1$$
therefore
$$\text{Res}[f_m(z),z=0] -\frac{1}{n}\sum _{k=0}^{n-1} \csc^{2m}\left(\frac{\pi  (2 k+1)}{2 n}+y\right) = 0$$
Calculating residues proves your result, along with instances of higher powers:

$$\begin{aligned}&\sum _{k=0}^{n-1} \csc^{6}\left(\frac{\pi  (2 k+1)}{2
n}+y\right)=\\ &\frac{1}{15} n^2 \sec ^2(n y) \left(15 n^4 \sec ^4(n y)-15 n^4 \sec ^2(n y)+2 n^4+15 n^2 \sec ^2(n y)-10 n^2+8\right)\\ &\sum _{k=0}^{n-1} \csc^{8}\left(\frac{\pi  (2 k+1)}{2
n}+y\right)=\\ &\frac{1}{315} n^2 \sec ^2(n y) \left(315 n^6 \sec ^6(n
y)-420 n^6 \sec ^4(n y)+126 n^6 \sec ^2(n y)-4 n^6+420 n^4 \sec ^4(n
y)-420 n^4 \sec ^2(n y)+56 n^4+294 n^2 \sec ^2(n y)-196
n^2+144\right) \end{aligned}$$

Taking $y=0$, one can also easily deduce $\zeta(2n)$ from such finite trigonometric sums.
A: The function
$$
f(z)=\frac{m/z}{(z/a)^m-1}
$$
has residue $1$ where $z^m=a^m$ and residue $-m$ at $0$. For this question, we want $m=2n$ and $a^{2n}=-e^{i2ny}$. Furthermore,
$$
|z|=1\implies\csc^2(\arg(z))=-\frac{4z^2}{(z-1)^2(z+1)^2}
$$

Thus,
$$\newcommand{\Res}{\operatorname*{Res}}\newcommand{\sech}{\operatorname{sech}}
\begin{align}
\sum_{k=0}^{n-1}\csc^2\left(\frac{\pi(2k+1)}{2n}+y\right)
&=\sum_{k=0}^{n-1}\csc^2\left(\frac{k\pi}n+y+\frac\pi{2n}\right)\\
&=\frac12\oint_{|z|\to\infty}\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)\mathrm{d}z\\
&-\frac12\Res_{z=1}\left(\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)\right)\\
&-\frac12\Res_{z=-1}\left(\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)\right)\\
&=0-\left(-\frac{n^2}{2\cos^2(ny)}\right)-\left(-\frac{n^2}{2\cos^2(ny)}\right)\\[9pt]
&=n^2\sec^2(ny)
\end{align}
$$

Furthermore,
$$
\begin{align}
\sum_{k=0}^{n-1}\csc^4\left(\frac{\pi(2k+1)}{2n}+y\right)
&=\sum_{k=0}^{n-1}\csc^4\left(\frac{k\pi}n+y+\frac\pi{2n}\right)\\
&=\frac12\oint_{|z|\to\infty}\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)^2\mathrm{d}z\\
&-\frac12\Res_{z=1}\left(\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)^2\right)\\
&-\frac12\Res_{z=-1}\left(\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)^2\right)\\
&=n^4\sec^4(ny)-\frac{2n^2\left(n^2-1\right)}3\sec^2(ny)
\end{align}
$$

Using the same method,
$$
\begin{align}
\sum_{k=0}^{n-1}\csc^6\left(\frac{\pi(2k+1)}{2n}+y\right)
&=\sum_{k=0}^{n-1}\csc^6\left(\frac{k\pi}n+y+\frac\pi{2n}\right)\\
&=\frac12\oint_{|z|\to\infty}\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)^3\mathrm{d}z\\
&-\frac12\Res_{z=1}\left(\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)^3\right)\\
&-\frac12\Res_{z=-1}\left(\left(-\frac{2n/z}{e^{-i2ny}z^{2n}+1}\right)\left(-\frac{4z^2}{(z-1)^2(z+1)^2}\right)^3\right)\\
&=\frac{2n^2\left(n^2-1\right)\left(n^2-4\right)}{15}\sec^2(ny)-n^4\left(n^2-1\right)\sec^4(ny)+n^6\sec^6(ny)
\end{align}
$$
A: Like How to prove: $11=10^{12}+10^{7}-45\sum_{n=1}^{999}\csc^4\frac{n\pi}{1000}$
Question regarding $f(n)=\cot^2\left(\frac\pi n\right)+\cot^2\left(\frac{2\pi}n\right)+\cdots+\cot^2\left(\frac{(n-1)\pi}n\right)$
Observe that  $n\left(\frac{\pi  (2 k+1)}{2 n}+y\right)=ny+k\pi+\dfrac\pi2$
As $\tan nx=\dfrac{\binom n1\cot^{n-1}x-\binom n3\cot^{n-3}x+\cdots}{\cot^nx-\binom n{n-2}\cot^{n-2}x+\binom n{n-4}\cot^{n-4}x-\cdots},$
if $\tan nx=\tan\left(ny+k\pi+\dfrac\pi2\right)=-\cot ny$
$$-\dfrac1{\tan ny}=\dfrac{\binom n1\cot^{n-1}x-\binom n3\cot^{n-3}x+\cdots}{\cot^nx-\binom n{n-2}\cot^{n-2}x+\binom n{n-4}\cot^{n-4}x-\cdots}$$
$$\implies\cot^n x+n\tan ny\cot^{n-1}x-\binom n2\cot^{n-2}x-\binom n3\tan ny\cot^{n-3}x+\cdots=0$$
So, the roots of $$c^n+n(\tan ny)c^{n-1}-\binom n2c^{n-2}-\binom n3(\tan ny)c^{n-3}+\cdots=0$$ 
are $c_k=\cot\left(y+\dfrac{(2k+1)\pi}{2n}\right), 0\le k\le n-1$
$$\sum _{k=0}^{n-1} \csc ^2\left(\frac{\pi  (2 k+1)}{2 n}+y\right)=\sum _{k=0}^{n-1}\left(1+ \cot^2\left(\frac{\pi  (2 k+1)}{2 n}+y\right)\right)=n+(n\tan ny)^2-2\binom n2=?$$
Similarly, 
$$\csc ^4\left(\frac{\pi  (2 k+1)}{2 n}+y\right)=\left(1+ \cot^2\left(\frac{\pi  (2 k+1)}{2 n}+y\right)\right)^2=?$$
