Sum of Trigonometric series
$\sin (x)-\sin(2x)+\sin(3x)-\sin(4x)+\cdots n$ terms
Try: I have take $2$ cases
$\bullet$ If $n$ is even natural number, Then
$S=\sin(x)-\sin(2x)+\sin(3x)+\cdots -\sin(nx)$
$\displaystyle 2S\cos\frac{x}{2}=\bigg(\sin \frac{3x}{2}+\sin \frac{x}{2}\bigg)-\bigg(\sin\frac{5x}{2}+\sin\frac{3x}{2}\bigg)+\bigg(\sin\frac{7x}{2}+\sin\frac{5x}{2}\bigg)+\cdots -\bigg(\sin (nx+\frac{x}{2})+\sin(nx-\frac{x}{2})\bigg)$
So $\displaystyle S=\frac{1}{2\cos \frac{x}{2}}\bigg(\sin \frac{x}{2}-\sin\bigg(nx\frac{x}{2}\bigg)\bigg)$
same way for $\bullet $ for $n$ is odd natural number
Could some help me? How can I solve it some less complex way, Thanks
You want $$ S = \sum_{k=1}^n (-1)^{k+1} \sin(kx) =\\ \Im (\sum_{k=1}^n (-1)^{k+1} e^{ikx}) $$ Using the finite geometric series (which is applicable for any $x$) we get $$ S = - \Im \frac{e^{ix(n+1)}+1}{e^{ix}+1} =\\ - \Im \frac{e^{ix(n+1/2)}+e^{-ix/2}}{e^{ix/2}+e^{-ix/2}} =\\ - \frac12 \Im \frac{e^{ix(n+1/2)}+e^{-ix/2}}{\cos(x/2)} =\\ \frac{1}{2\cos(x/2)}\left[-\sin(x(n+1/2)) + \sin(x/2) \right] $$