I am trying to calculate the following integral related to fourier series $$4/\pi\int_0^{\pi/2} \sin(x)\cos(2kx) \, dx .$$
I plugged it into an online integral calculator and wanted to see the step by step solution. The first step was using the equation $$\sin(x)\cos(2kx) = \frac{\sin((2k+1)x)-\sin((2k-1)x)}2.$$ Why does it hold?
Hint. From $$ \sin(a+b)=\sin a \cos b+\sin b \cos a $$$$ \sin(a-b)=\sin a \cos b-\sin b \cos a $$ one gets $$ 2\sin a\cos b=\sin(a+b)+\sin(a-b). $$