I need to prove that assuming $N>2$, $$\frac{1}{N}\sum_{k=1}^{N}\sin\left(\frac{2k}{N}\pi\right)\sin\left(\frac{2\pi}{N}(k-x)\right) = \frac{1}{2}\cos\left(\frac{2\pi}{N} x\right).$$
It should be achievable solely by using trigonometric identities but I am stuck and can't find a way to prove it.
$$(\sin \frac{2\pi k}{n})(\sin \frac{2\pi (k-x)}{n})=\frac{1}{2}(\cos\frac{2\pi x}{n}-\cos\frac{2\pi (2k-x)}{n})$$ Using $$\sin A \sin B=\frac{1}{2} . \cos (A-B) - \frac{1}{2}.\cos (A+B)$$
Now, $$\frac{1}{n} \sum^n_{k=1} .\frac{1}{2}\cos\frac{2\pi x}{n}-\frac{1}{2}.\frac{1}{n} \sum^n_{k=1}\cos\frac{2\pi (2k-x)}{n}$$
For the second term's credibility to be $0$, You may follow these methods here: Method 1
This should leave you with: $$\frac{1}{2}\cos \frac{2\pi x}{n}$$
Did this help or should I provide more?