Sum of $\sum_{k=1}^n\sin{k\theta}$ [duplicate]

I have to calculate the sum of this series $$ \sum_{k=1}^n\sin{k\theta} $$ I tried solving it like this $$ \sum_{k=1}^n\sin{k\theta} = \operatorname{Im}\sum_{k=1}^ne^{(i\theta)k} $$ I recognized it as a geometric sum, but to get the sum I first had to check $$ \left|e^{i\theta}\right| = 1 $$ which means that the geometric sum is divergent. Apparently that is not the right answer, but I can't find the spot where I made the mistake. Could you help me finding it?


Solution 1:

I tried solving it like this $$ \sum_{k=1}^n\sin{k\theta} = \operatorname{Im}\sum_{k=1}^ne^{(i\theta)k} $$

Let $\displaystyle S = e^{i\theta}+e^{i2\theta}+............+e^{ik\theta}............(1)$

Multiply both side by $e^{i\theta}$

Then $\displaystyle S = e^{2i\theta}+e^{i2\theta}+............+e^{i(k+1)\theta}......(2)$

So we get $\displaystyle S = \frac{e^{i\theta}-e^{i(k+1)\theta}}{1-e^{i\theta}}$

Now Using $e^{i\phi} = \cos \phi+i\sin \phi$ and $e^{-i\phi} = \cos \phi-i\sin \phi$

So we gave to Calculate $\displaystyle \operatorname{Im}(S) = \operatorname{Im}\left\{\frac{e^{i\theta}\left[1-e^{ik\theta}\right]}{1-e^{i\theta}}\right\}$

So $\displaystyle \frac{e^{i\theta}\left[1-e^{ik\theta}\right]}{1-e^{i\theta}} = \frac{e^{i\theta}\cdot e^{i\frac{k\theta}{2}}}{e^{\frac{i\theta}{2}}}\left(\frac{e^{\frac{-ik\theta}{2}}-e^{\frac{ik\theta}{2}}}{e^{\frac{-i\theta}{2}}-e^{\frac{i\theta}{2}}}\right) = e^{\frac{i(k+1)\theta}{2}}\cdot \frac{\sin \frac{k\theta}{2}}{\sin \frac{\theta}{2}}$

$$\displaystyle = \left[\cos \left(\frac{(k+1)\theta}{2}\right)+i\sin \left(\frac{(k+1)\theta}{2}\right)\right]\cdot \frac{\sin \frac{k\theta}{2}}{\sin \frac{\theta}{2}}$$