Prove using De Moivre's formula,that $\sum\limits_{k=0}^{n}\sin(kx)=\frac{1}{2}\cot(x/2)-\frac{\cos(nx+(x/2))}{2\sin(x/2)}$ I've been asked to prove that:
$$
\sum\limits_{k=0}^{n}\sin(kx)=\frac{1}{2}\cot(x/2)-\frac{\cos(nx+(x/2))}{2\sin(x/2)}
$$
When $0<x<2\pi$.
I know there are many similar posts on this site, but using $\cos(kx)$ instead, that's why I created this post, I can't get to the $1/2\cot$ in this one.
Thanks!
$$\begin{align}\sum\limits_{k=0}^{n}\sin(kx) &= \Im\left(\frac{e^{i(n+1)x}-1}{e^{ix}-1}\right)\\ &= \Im\left(\frac{e^{\frac{i(n+1)x}2}}{e^{\frac{ix}2}}\frac{\left(e^{\frac{i(n+1)x}2}-e^{-\frac{i(n+1)x}2}\right)}{\left( e^{\frac{ix}2}-e^{-\frac{ix}2}\right)}\right)\\&= \Im\left(e^{\frac{inx}2}\frac{2i\sin\frac{(n+1)x}2}{2i\sin{\frac{x}2}}\right)\end{align}$$ Applying $e^{iy}-e^{-iy}=2i\sin y,$
$$\begin{align}\sum\limits_{k=0}^{n}\sin(kx) &= \Im\left(\left(\cos\frac{nx}2+i\sin\frac{nx}2\right)\frac{\sin\frac{(n+1)x}2}{\sin{\frac{x}2}}\right)\\ &= \sin\frac{nx}2 \frac{\sin\frac{(n+1)x}2}{\sin{\frac{x}2}},\end{align}$$ then I don't know what to do.
 A: You asked to prove this by DeMovire's formula, which states $$e^{ikx} = (\cos x + \sin x)^k = \cos kx + \sin kx.$$
Everything you did until the final line is correct. 
The final move is to do the following, $$\sin \left ( \frac{nx}{2} \right ) \frac{\sin\frac{(n+1)x}2}{\sin{\frac{x}2}} = \frac{\cos(x/2) - \cos(n + 1/2)x}{2\sin \left ( x/2 \right )} = \frac{1}{2}\cot x/2 - \frac{\cos(n + 1/2)x}{2\sin \left ( x/2 \right)}.$$
where we have used the fact that $$\sin u \sin v = \frac{1}{2} \left ( \cos(u - v) - \cos(u + v) \right )$$
A: Hint: $\Im (z*i)=\Re(z)$, and $\frac {1}{i}=-i$.
Also, use $\cos$ of sum formula.
Use that on one of the formulas you already wrote.
A: Here is an elementary way to see it. We know that
$$
\sin[x]\sin[y]=\frac{1}{2}(\cos[x-y]-\cos[x+y])
$$
Therefore the sum $A=\sin[x]+\sin[2x]+\sin[3x]$ be be treated by
$$
2\sin[x/2]A=\cos[x-x/2]-\cos[x+x/2]+\cos[2x-x/2]-\cos[2x+x/2]+\cos[3x-x/2]-\cos[3x+x/2]
$$
After cancel out intermediate terms we get
$$
A=\frac{\cos[0.5x]-\cos[3.5x]}{\sin[x/2]}
$$
And your sum can be treated in obvious similar ways. 
