Find $\frac{\sum_\limits{k=0}^{6}\csc^2\left(x+\frac{k\pi}{7}\right)}{7\csc^2(7x)}$ Find the value of 
$\dfrac{\sum_\limits{k=0}^{6}\csc^2\left(x+\dfrac{k\pi}{7}\right)}{7\csc^2(7x)}$
when $x=\dfrac{\pi}{8}$.
The Hint given is: $n\cot nx=\sum_\limits{k=0}^{n-1}\cot\left(x+\dfrac{k\pi}{n}\right)$
I dont know how it comes nor how to use it

For future reference with this problem being tagged complex-numbers we
show how to evaluate the sum using residues. Suppose we are interested
in
$$S(n) = \sum_{k=0}^{n-1} \csc^2\left(x+\frac{k\pi}{n}\right)
= \sum_{k=0}^{n-1} \frac{2}{1-\cos\left(2x+\frac{2k\pi}{n}\right)}.$$
where we take $x$ to be a real number.
With $$f(z) = \frac{4}{2-\exp(2ix)z-1/\exp(2ix)/z}
\frac{nz^{n-1}}{z^n-1}$$
or alternatively
$$f(z) = \frac{4}{2-\exp(2ix)z-1/\exp(2ix)/z} \frac{1}{z}
\frac{n}{z^n-1}
\\ = \frac{4}{2z-\exp(2ix)z^2-1/\exp(2ix)}
\frac{n}{z^n-1}
\\ = -\frac{4\exp(-2ix)}{z^2 - 2z\exp(-2ix) + \exp(-4ix)}
\frac{n}{z^n-1}
\\ = -\frac{4\exp(-2ix)}{(z-\exp(-2ix))^2}
\frac{n}{z^n-1}$$
we get for the sum with $\zeta_k = \exp(2\pi i k/n)$
$$\sum_{k=0}^{n-1} \mathrm{Res}_{z=\zeta_k} f(z)$$
which means we can evaluate the sum using the negative of the residues
at $z=\exp(-2ix)$  and at  infinity.  Note however  that with  $R$ the
radius  of  a  circle  going  to   infinity  we  get  that  $f(z)$  is
$\theta(1/R^{n+2})$  and  $2\pi  R  \times  1/R^{n+2}  =  2\pi  \times
1/R^{n+1}$ vanishes  so the residue  at infinity is zero.  That leaves
for the other residue
$$\left.
\left(-\frac{4n\exp(-2ix)}{z^n-1}\right)'\right|_{z=\exp(-2ix)}
= \left.\frac{4n\exp(-2ix)}{(z^n-1)^2} \times n z^{n-1}
\right|_{z=\exp(-2ix)}
\\ = \frac{4n^2\exp(-2inx)}{(\exp(-2inx)-1)^2}
= -\frac{(2i)^2 n^2}{(\exp(-inx)-\exp(inx))^2}.$$
We obtain
$$S(n) -\frac{(2i)^2 n^2}{(\exp(inx)-\exp(-inx))^2} = 0$$
or
$$\bbox[5px,border:2px solid #00A000]{
S(n) = n^2 \csc^2(nx).}$$
