trigonometric finite series equals to polynomial function I am interest to prove the equation below :
$$
\sum_{k=1}^m  \tan^2\left(\frac{k\pi}{2m+1}\right) =  m(2m+1) 
$$
you can understand better the first member of the equation here:
WolframAlpha
(mark the whole url with your mouse because i dont know why the link isn't blue at all)
sorry but i am not familiar writing equations here .
i hope to understand. 
so what's the problem in formula i cannot eliminate the trigonometric functions to prove this series is a polynomial .
any idea how to manipulate the formula ?
 A: This answer is a nearly identical copy of falagar's beautiful answer here, all credit goes to him.

For the sake of legibility let $x_k:=\tfrac{k\pi}{2m+1}$ for $k=1,\ldots,m$. By Euler's formula we have the identity
$$(\cos x_k+i\sin x_k)^{2m+1}=(-1)^k,$$
for each $k$. The binomial expansion of the left hand side gives us
$$\sum_{j=0}^{2m+1}\binom{2m+1}{j}(i\sin x_k)^j(\cos x_k)^{2m+1-j}=(-1)^k.$$
Taking the imaginary parts of both sides shows that the terms with odd $j$ sum to zero:
$$\sum_{j=0}^m\binom{2m+1}{2j+1}(-1)^j(\sin x_k)^{2j+1}(\cos x_k)^{2m-2j}=0.$$
Dividing both sides by $(\sin x_k)(\cos x_k)^{2m}$ we find that
$$\sum_{j=0}^m\binom{2m+1}{2j+1}(-1)^j(\tan x_k)^{2j}=\sum_{j=0}^m\binom{2m+1}{2j+1}\left(-(\tan x_k)^2\right)^j=0,$$
This means that $-(\tan x_k)^2$ is a root of the polynomial
$$\sum_{j=0}^m\binom{2m+1}{2j+1}X^j=0,$$
for $k=1,\ldots,m$, and the values of $-(\tan x_k)^2$ are distinct for distinct values of $k$. Hence these are all roots of the polynomial above, and by Vieta's formulas its roots sum to
$$-\frac{\tbinom{2m+1}{2m-1}}{\tbinom{2m+1}{2m+1}}=-\binom{2m+1}{2m-1}=-m(2m+1).$$
