How to prove that for $m>2$ $$\sum_{k=1}^m \cos^2\left(\frac{2 \pi k}{m}\right) = \frac{m}{2}.$$
This could be useful for me solving a Differential Geometry problem. And Wolfram Alpha says it's true. But i can only be certain with a proof
How to prove that for $m>2$ $$\sum_{k=1}^m \cos^2\left(\frac{2 \pi k}{m}\right) = \frac{m}{2}.$$
This could be useful for me solving a Differential Geometry problem. And Wolfram Alpha says it's true. But i can only be certain with a proof
Note that $\cos^2 z=\frac{1+\cos2z}{2}$. Substituting gives us $$\sum_{k=1}^m \cos^2\left(\frac{2 \pi k}{m}\right) = \frac{m}{2}+\frac{1}{2}\sum_{k=1}^m \cos\left(\frac{4 \pi k}{m}\right).$$ Also $\operatorname{Re}e^{iz}$ is $\cos z$. Your problem can be rewritten to $$\frac{1}{2}\sum_{k=1}^m \operatorname{Re}\left(\exp\left(\frac{2 \pi k}{m}\right)\right) = \frac{1}{2}\operatorname{Re}\sum_{k=1}^m\exp\left(4 \pi i\frac{k}{m}\right)=\operatorname{Re}\frac{1-\exp\left(4\pi i\right)}{1-\exp\left(4\pi i\frac{k}{m}\right)}=0.$$ Now you may use the geometric progression.
Let $ S = \sum_{k=1}^m \cos^2(\frac{2 \pi k}{m}) $
Multiply by 2 and subtract m
$2S - m = \sum_{k=1}^m 2\cos^2(\frac{2 \pi k}{m}) -1 $
Since $\cos(2x) = 2\cos^2(x)-1$
$2S - m = \sum_{k=1}^m \cos(\frac{4 \pi k}{m}) $
We have a formula when there is a summation of cosines where the angles are in AP
$Scn = \frac{\sin(\frac{md}{2})}{\sin(\frac{d}{2})} \cos(\frac{2a+(m-1)d}{2})$
We can see that $ d = \frac{4\pi}{m}$
Hence $\sin(\frac{md}{2}) = \sin(4\pi) = 0$
$2S - m = 0 $
$S = \frac{m}{2}$