Summation using Euler's formula I must verify the following formula:
$$
\sum _{i=1}^n \sin ^2 (2k-1) \theta = -\frac{n}{2} - \frac{\sin 4n \theta}{4 \sin 2 \theta}
$$
I believe that I must do this by using the Euler's formula,
$$
e^{i \theta} = \cos \theta + i \sin \theta
$$
and taking only the imaginary parts of it.
However, I am really stuck. Here is my work so far:
Let $x=e^{i \theta}$. Then, 
$$
e^{i \theta} = \cos \theta + i \sin \theta
$$
$$
e^{2i \theta} = \cos ^2 \theta + i \sin \theta \cos \theta - \sin ^2 \theta
$$
The sum we need to verify then becomes equivalent to the imaginary part of:
$$
-e^{2i \theta} + \cos ^2 \theta-e^{6i \theta} + \cos ^2 3\theta -e^{10i \theta} + \cos ^2 5\theta -... +...-e^{(4k-2)i \theta} + \cos ^2 (2k-1)\theta.
$$
This sum doesn't really seem to help me, especially because the exponent of the $e$ terms do not increase linearly. How should I approach this problem?

\begin{align*}
\sum _{i=1}^n \sin ^2 (2k-1) \theta &= \frac{1}{2}\sum _{k=1}^n (1-\cos 2(2k-1)\theta)\\
&= \frac{n}{2} - \frac{1}{2}\sum _{k=1}^n \cos (4k - 2) \theta\\
&= \frac{n}{2} - {\text {Real part of }}\frac{1}{2}\sum _{k=1}^n e^{(4k - 2)i\theta}\\
&=\frac{n}{2} - {\text {Real part of }}\frac{1}{2}e^{2i\theta}(1+e^{4i\theta} + \cdots + e^{4(n-1)\theta})\\
&=\frac{n}{2} - {\text {Real part of }}\frac{1}{2}e^{2i\theta}\frac{1-e^{4ni\theta}}{1-e^{4i\theta}}\\
\end{align*}
The computation can now be easily done.
