Sum of complex series 
After stating the sum I wrote z in polar form and then proceeded to calculate the real part of the sum I stated in the first part. However the working got tedious very soon and I was not able to arrive at the given expression. Is there a shorter way around this?
 A: So you have
$$ \sum_{k=1}^n z^k = \frac{z-z^{n+1}}{1-z}, $$
and
$$ \sum_{k=1}^n \cos{k\theta} = \sum_{k=1}^n \Re{e^{ik\theta}} = \Re\left( \frac{e^{i\theta}-e^{i\theta(n+1)}}{1-e^{i\theta}} \right) $$
Now we have to sort out this fraction. But since we have the answer, and it has a $\sin{\frac{1}{2}\theta}$ on the bottom, we expect that we need to multiply top and bottom by $-e^{-i\theta/2}$:
$$ \frac{e^{i\theta}-e^{i\theta(n+1)}}{1-e^{i\theta}} = \frac{e^{i\theta(n+1/2)}-e^{i\theta/2}}{e^{i\theta/2}-e^{-i\theta/2}} = \frac{e^{i\theta(n+1/2)}-e^{i\theta/2}}{2i \sin{\frac{1}{2}\theta}} $$
Okay, now we need to take the real part of $\frac{e^{i\theta(n+1/2)}-e^{i\theta/2}}{2i}$. Given the minus sign, we want to factorise it so that the numerator has $e^{\pm \text{(the same thing)}}$ and get a sine:
$$ \frac{e^{i\theta/2}(e^{in\theta}-1)}{2i} = e^{i\theta(n+1)/2} \frac{e^{in\theta/2}-e^{-in\theta/2}}{2i} = e^{i\theta(n+1)/2} \sin{\tfrac{1}{2}n\theta}, $$
and then taking the real part of this will give the answer.
