Complex number trigonometry problem Use $cos (n\theta)$ = $\frac{z^n +z^{-n}}{2}$ to express 
$\cos \theta + \cos 3\theta + \cos5\theta + ... + \cos(2n-1)\theta$ as a geometric series in terms of z. Hence find this sum in terms of $\theta$.
I've tried everything in the world and still can't match that of the final answer. Could I pleas have a slight hint on the right path to follow.
Thanks
 A: $ cosθ+cos3θ+cos5θ+\cdot \cdot \cdot+cos(2n−1)θ$
=$ \dfrac{z+z^{-1}}{2} + \dfrac{z^3+z^{-3}}{2} + \dfrac{z^5+z^{-5}}{2} + \cdot \cdot \cdot + \dfrac{z^{(2n+1)}+z^{-(2n-1)}}{2} $ $$\\$$ = $ 2^{-1}(z+z^3+z^5+z^7+\cdot \cdot \cdot + z^{2n-1}) + 2^{-1}( z^{-1}+z^{-3}+z^{-5} +\cdot \cdot \cdot + z^{-(2n-1)}) $
Then apply the formula of geometric series . 
A: $$\cos x = \frac{e^{ix}+e^{-ix}}{2}$$
$$\cos x = \mathrm{Re} \;e^{ix}$$
Thus
$$\cos \theta  + \cos 3\theta + ... +\cos (2n-1)\theta=\sum_{k=0}^{n-1} \cos (2k+1)\theta$$
$$=\mathrm{Re} \; \sum_{k=0}^{n-1} e^{i(2k+1)\theta}
=\mathrm{Re} \; \left(e^{i\theta}\sum_{k=0}^{n-1} e^{2ik\theta}\right)
=\mathrm{Re}  \; \left(e^{i\theta}\frac{e^{2in\theta}-1}{e^{2i\theta}-1}\right)$$
(by the way, the geometric series you're looking for is the middle sum above, with $z=e^{i\theta}$)
And
$$\frac{e^{2in\theta}-1}{e^{2i\theta}-1}=\frac{e^{in\theta}}{e^{i\theta}} \frac{e^{in\theta}-e^{-in\theta}}{e^{i\theta}-e^{-i\theta}}$$
$$=e^{i(n-1)\theta} \frac{\sin n\theta}{\sin \theta}$$
Thus
$$\mathrm{Re}  \; \left(e^{i\theta}\frac{e^{2in\theta}-1}{e^{2i\theta}-1}\right)=
\mathrm{Re}  \; \left(e^{i\theta}e^{i(n-1)\theta} \frac{\sin n\theta}{\sin \theta}\right)
= \frac{\sin {n\theta}\cos {n\theta}}{\sin {\theta}}=\frac{\sin 2n\theta}{2 \sin {\theta}}$$
Finally,
$$\cos \theta  + \cos 3\theta + ... +\cos (2n-1)\theta=\frac{\sin 2n\theta}{2 \sin {\theta}}$$
