Sum $\cot^2\frac{\pi}{2m+1}+\cot^2\frac{2\pi}{2m+1}+\cot^2\frac{3\pi}{2m+1}+\ldots+\cot^2\frac{m\pi}{2m+1}?$ How to find
$$\cot^2\frac{\pi}{2m+1}+\cot^2\frac{2\pi}{2m+1}+\cot^2\frac{3\pi}{2m+1}+\ldots+\cot^2\frac{m\pi}{2m+1}?$$
Of course, the number $m$ is assumed to be a positive integer.
 A: Here is a rather elementary and simple way to sum this series:
We know from De Moivre's Formula that
$$(\cos\theta+\iota\sin\theta)^n=\cos n\theta+\iota\sin n\theta$$
Expanding the LHS using Binomial Theorem,
$$\binom{n}{0}\cos^n\theta+\binom{n}{1}\cos^{n-1}\theta(\iota\sin\theta)+\cdots+\binom{n}{n}\iota^n\sin^n\theta=\cos n\theta+\iota\sin n\theta$$
Equating imaginary parts,
$$\binom{n}{1}\cos^{n-1}\theta(\sin\theta)-\binom{n}{3}\cos^{n-3}\theta(\sin\theta)^3+\binom{n}{5}\cos^{n-5}\theta(\sin\theta)^5-\cdots=\sin n\theta$$
Now let $n=2m+1$,then:
$$\binom{2m+1}{1}\cos^{2m}\theta(\sin\theta)-\binom{2m+1}{3}\cos^{2m-2}\theta(\sin\theta)^3+\cdots=\sin (2m+1)\theta$$
Dividing by $\sin^{2m+1}\theta$, we have a result:
$$\binom{2m+1}{1}(\cot^2\theta)^m-\binom{2m+1}{3}(\cot^2\theta)^{m-1}+\cdots={\sin (2m+1)\theta \over \sin^{2m+1}\theta}\tag{i}$$
Now consider the following equation of the $m^{th}$ degree:
$$\binom{2m+1}{1}x^m-\binom{2m+1}{3}x^{m-1}+\binom{2m+1}{5}x^{m-2}-\cdots=0$$
Making use of the preceding result (i), we can say that $\cot^2{\pi \over 2m+1}$,$\cot^2{2\pi \over 2m+1},\ldots,\cot^2{m\pi \over 2m+1}$ are the $m$ roots of this equation.
Using Vieta's formulas, the sum of roots of this equation (which is the required sum) must be this:
$${2m+1 \choose 3}\over{2m+1 \choose 1}$$
Which on simplification reduces to this:
$${2m^2-m}\over{3}$$
