# How to find sum of n terms in trigonometry

I have searched a lot and I couldn't find answer for the below sum.

$$S_n = \sin x \cos x +\sin 2x \cos 2x + \sin 3x \cos 3x + \ldots + \sin nx \cos nx$$

How can I solve the above problem?

• HINT: $$\sin2A=2\sin A\cos A$$ and use math.stackexchange.com/questions/17966/… – lab bhattacharjee Mar 20 '17 at 17:56
• @labbhattacharjee: can you please post it as an answer. so that I can combine your hint and answer posted in question you mentioned. – confusedDeveloper Mar 20 '17 at 18:02
• If u've understood the method, please feel free to supply the answer & optionally accept it – lab bhattacharjee Mar 20 '17 at 18:04
• BTW I am not good in maths. That was for my son :) He was able to solve the problem by your hint. Thanks a lot. – confusedDeveloper Mar 20 '17 at 18:13

$$S_n = \frac{1}{2}\left(\sin(2x)+\sin(4x)+\ldots+\sin(2nx)\right) \tag{1}$$
$$S_n \sin(x) = \frac{1}{4}\left[\left(\cos(x)-\cos(3x)\right)+\ldots\left(\cos((2n-1)x)-\cos((2n+1)x)\right)\right]\tag{2}$$
$$S_n \sin(x) = \frac{\cos(x)-\cos((2n+1)x)}{4}\tag{3}$$
$$S_n = \color{red}{\frac{\cos(x)-\cos((2n+1)x)}{4\sin x}}=\frac{\sin(nx)\sin((n+1)x)}{2\sin x}\tag{4}$$