i need to show this equality: $$ \sum_{k=1}^n \frac{\sin(kx)}{k} = \frac{\pi - x}{2}$$
I should use that $\displaystyle\frac{\sin(kx)}{k} = \int_\pi ^x \cos(kt)\,\mathrm dt$.
I tried many times to solve this, but I just got stuck. Is there a trick or anything I don't see?