complex variables, finding the identity $$\sin(\theta)+ \sin (2\theta)+\ldots+\sin(n\theta).$$
Find the identity? Set $z=e^{i\theta}$.
Can someone point me in the right direction as to where to start/go from.
So far I have
$$\frac{1-e^{i\theta(n+1)}}{1-e^{i\theta}}.$$
And I am stuck as to where to go from here.
 A: $$\sum_{k=1}^ne^{ki\theta}=e^{i\theta}\frac{e^{ni\theta}-1}{e^{i\theta}-1}=\left(\cos\theta+i\sin\theta\right)\frac{\cos n\theta-1+i\sin n\theta}{\cos\theta-1+i\sin\theta}$$
Find now real and imaginary parts and complete.
A: Here is a start
$$
\begin{align}
\sum_{k=1}^n\sin(k\theta)
&=\frac1{2i}\sum_{k=1}^n\left(e^{ik\theta}-e^{-ik\theta}\right)\tag{1}\\
&=\frac1{2i}\left(\frac{e^{i(n+1)\theta}-e^{i\theta}}{e^{i\theta}-1}
-\frac{e^{-i(n+1)\theta}-e^{-i\theta}}{e^{-i\theta}-1}\right)\tag{2}\\
&=\frac1{2i}\left(\frac{e^{i(n+1/2)\theta}-e^{i\theta/2}}{e^{i\theta/2}-e^{-i\theta/2}}
-\frac{e^{-i(n+1/2)\theta}-e^{-i\theta/2}}{e^{-i\theta/2}-e^{i\theta/2}}\right)\tag{3}
\end{align}
$$
Explanation:
$(1)$: write $\sin(x)=\frac{e^{ix}-e^{-ix}}2$
$(2)$: sum of a geometric series
$(3)$: adjust to make the denominators similar

Here is the rest
$$
\begin{align}
\sum_{k=1}^n\sin(k\theta)
&=\frac1{2i}\left(\frac{e^{i(n+1/2)\theta}-e^{i\theta/2}}{e^{i\theta/2}-e^{-i\theta/2}}
-\frac{e^{-i(n+1/2)\theta}-e^{-i\theta/2}}{e^{-i\theta/2}-e^{i\theta/2}}\right)\\
&=\frac1{2i}\left(\frac{e^{i(n+1/2)\theta}+e^{-i(n+1/2)\theta}}{e^{i\theta/2}-e^{-i\theta/2}}
-\frac{e^{i\theta/2}+e^{-i\theta/2}}{e^{i\theta/2}-e^{-i\theta/2}}\right)\\
&=\frac1{2i}\left(\frac{2\cos((n+1/2)\theta)}{2i\sin(\theta/2)}
-\frac{2\cos(\theta/2)}{2i\sin(\theta/2)}\right)\\
&=\frac{\cos(\theta/2)-\cos((2n+1)\theta/2)}{2\sin(\theta/2)}\\
&=\frac{\sin((n+1)\theta/2)\sin(n\theta/2)}{\sin(\theta/2)}
\end{align}
$$
