TITLE: $\cos^2(\frac{\pi}{101})+\cos^2(\frac{2\pi}{101})+\cos^2(\frac{3\pi}{101})+...+\cos^2(\frac{100\pi}{101})=?$
QUESTION [6 upvotes]: Find the value: $$\cos^2\left(\frac{\pi}{101}\right)+\cos^2\left(\frac{2\pi}{101}\right)+\cos^2\left(\frac{3\pi}{101}\right)+\cos^2\left(\frac{4\pi}{101}\right)+\cos^2\left(\frac{5\pi}{101}\right)+\cdots \\ \cdots+\cos^2\left(\frac{99\pi}{101}\right)+\cos^2\left(\frac{100\pi}{101}\right)$$

My attempt:I've tried it by considering the sum 
$$\sin^2\left(\frac{\pi}{101}\right)+\sin^2\left(\frac{2\pi}{101}\right)+\sin^2\left(\frac{3\pi}{101}\right)+\sin^2\left(\frac{4\pi}{101}\right)+\sin^2\left(\frac{5\pi}{101}\right)+\cdots \\ \cdots+\sin^2\left(\frac{99\pi}{101}\right)+\sin^2\left(\frac{100\pi}{101}\right)$$
along with 
$$\cos^2\left(\frac{\pi}{101}\right)+\cos^2\left(\frac{2\pi}{101}\right)+\cos^2\left(\frac{3\pi}{101}\right)+\cos^2\left(\frac{4\pi}{101}\right)+\cos^2\left(\frac{5\pi}{101}\right)+\cdots \\ \cdots +\cos^2\left(\frac{99\pi}{101}\right)+\cos^2\left(\frac{100\pi}{101}\right)$$ which gives $ 100$ as resultant but failed to separate the sum of
 $$\sin^2\left(\frac{\pi}{101}\right)+\sin^2\left(\frac{2\pi}{101}\right)+\sin^2\left(\frac{3\pi}{101}\right)+\sin^2\left(\frac{4\pi}{101}\right)+\sin^2\left(\frac{5\pi}{101}\right)+\cdots\\ \dots+\sin^2\left(\frac{99\pi}{101}\right)+\sin^2\left(\frac{100\pi}{101}\right)$$ at last.
I tried the next approach by  using de Movire's theorem but failed to separate the real and imaginary part.
I've invested a great amount of time in the so it would be better if someone please come up with an answer.

REPLY [2 votes]: Let $x_{k} = \cos^{2}(k\pi/n)$ where $k = 1, 2, \dots, n$. Then we can see that $z_{k} = 2x_{k} - 1 = \cos(2k\pi/n)$ and hence these are the roots of the equation $P_{n}(z) = 1$ where $P_{n}(z)$ is a polynomial such that $P_{n}(\cos x) = \cos nx$. These polynomials are famous by the name Chebyshev polynomials and satisfy the recurrence $$P_{n + 1}(z) = 2zP_{n}(z) - P_{n - 1}(z)$$ and using the above recurrence we can easily show (via induction) that if $n\geq 2$ then the coefficient of $z^{n - 1}$ in $P_{n}(z)$ is $0$ and hence the sum of roots $z_{k} = \cos(2k\pi/n)$ is $0$. Also note that $z_{n} = 1$ so that $\sum_{k = 1}^{n - 1} z_{k} = -1$ and hence $$\sum_{k = 1}^{n - 1}x_{k} = \frac{n - 2}{2}$$ Putting $n = 101$ we get the desired sum as $99/2$. 

In case the recurrence satisfied by $P_{n} (z) $ seems mysterious one has to note that $$\cos(n+1)x+\cos(n-1)x=2\cos x\cos nx$$ which means that $$P_{n+1}(\cos x) +P_{n-1}(\cos x)=2\cos x P_{n} (\cos x) $$ and replacing $\cos x$ by $z$ we get the desired recurrence.