Summation of $\sum_{r=1}^n \sin(2r-1)\theta$

complex numberssummation-method

In a CIE A Level Further Mathematics question paper, the following question appeared:

By considering $$\sum_{r=1}^n z^{2r-1}$$ where $z=\cos\theta +i\sin\theta$, show that if $\sin ≠ 0$,

$$\sum_{r=1}^n \sin(2r-1)\theta =\frac{\sin^2n\theta}{\sin\theta}$$

My attempt at solving this:
$$\sum_{r=1}^n z^{2r-1}=z+z^3+z^5+…z^{2n-1}=\frac{z((z^2)^n-1)}{z^2-1}$$
Then, expanding the brackets and dividing the numerator and denominator by $z$,
$$\frac{z^{2n}-1}{z-z^{-1}}$$
Applying de Moivre's theorem, we get
$$\frac{\cos(2n\theta)+i\sin(2n\theta)-1}{2i\sin\theta}$$
Since we only need the imaginary part,
$$\operatorname{Im}\left(\sum_{r=1}^n z^{2r-1}\right)=\frac{\cos(2n\theta)-1}{2\sin\theta}$$
Lastly, applying the double angle formula,
$$\frac{-\sin^{2}(n\theta)}{\sin\theta}$$
Maybe I'm being completely oblivious to one single elementary error, but what mistake have I made to get a negative sign?

Best Answer

The evaluation should be

$$ \eqalign{ \Im\left(\frac{\cos\left(2n\theta\right)+i\sin\left(2n\theta\right)-1}{2i\sin\left(\theta\right)}\right) &= \Im\left(\frac{\cos\left(2n\theta\right)}{2i\sin\left(\theta\right)}+\frac{\sin\left(2n\theta\right)}{2\sin\left(\theta\right)}-\frac{1}{2i\sin\left(\theta\right)}\right) \cr &= \Im\left(\frac{\sin\left(2n\theta\right)}{2\sin\left(\theta\right)}+\frac{i}{2\sin\left(\theta\right)}-\frac{i\cos\left(2n\theta\right)}{2\sin\left(\theta\right)}\right) \cr &= \frac{1}{2\sin\left(\theta\right)}-\frac{\cos\left(2n\theta\right)}{2\sin\left(\theta\right)} \cr &= \frac{1-\cos\left(2n\theta\right)}{2\sin\left(\theta\right)} \cr &= \frac{\sin^{2}\left(n\theta\right)}{\sin\left(\theta\right)}. } $$ Maybe there was a missing negative in your attempt.