I was solving a diophantine equation when I reached this point and I got stuck finding the value of
$$ \sum_{k=1}^n \cos^2\left(\frac{360^{\circ}}n k\right).$$
I noticed that this sum resembles the sum of the real parts squared of the roots of unity.
After graphing the function and/or plugging in some values you can quickly realize that
$$\sum_{k=1}^n \cos^2\left(\frac{360^{\circ}}n k\right) = \frac n2$$
for all natural numbers greater than $2.$
- How can we prove this?