How to prove that $\sum_{k=1}^{n} \sin{kx} = \frac{\cos{\frac{x}{2} - \cos{(n+\frac{1}{2})x}}}{2\sin{\frac{x}{2}}}$ for every positive integer $n$ where $x$ is a real number such that $\sin{\frac{x}{2}}\neq 0$?
My idea I am thinking of considering the sum $\sum_{k=1}^{n} 2\sin{kx} \sin{\frac{x}{2}}$ as an approach to this proof, but I am not sure how to proceed. Is my approach correct? Any tips or hints given? Thanks.