I found the relation $$sumlimits_{k=1}^{leftlfloorfrac n2rightrfloor}sin^2left((2k-1)fracpi nright)=frac n4$$But despite my best efforts, I still have no idea as to how to prove it.

Things I’ve tried:

- Adding $cos^2$ terms. Of course, $sin^2x+cos^2x$ and $cos^2x-sin^2x$ are both simplifiable, so I thought about adding $cos^2$ terms to make the sum into $frac n2$ and hope that the $sin^2$ and $cos^2$ terms sum to equal amounts. They don’t in the $n$ odd case, so I didn’t know what to do with this approach.
- Adding more $sin^2$ terms: Since $sin^2 x=sin^2(pi-x)$, we can add terms to this sum, but honestly, it didn’t make the sum any easier to evaluate.

Any help here?