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?