# Sum of a complex, finite geometric series and its identity

I have the formula for summing a finite geometric series as $$1+z+z^2\cdots +z^n = \frac{1-z^{n+1}}{1-z},$$ where $z\in\mathbb{C}$ and $n=0,1,...$. I am asked to infer the identity $$1+\cos\theta+\cos 2\theta+\cdots+\cos n\theta = \frac{1}{2}+\frac{\sin(n+1/2)\theta}{2\sin\theta /2}.$$ Now, I understand that on the left hand side I'm going to get $$1+\cos\theta +\cdots + \cos n\theta + i[\sin\theta + \sin 2\theta +\cdots + \sin n\theta]$$ using $z=e^{i\theta}$ for any complex $z$. However, when I make that substitution on the right hand side, a monstrous expression occurs and I cannot simplify it down to the desired result. For instance, I get $$\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}$$ and using identities I get $$\frac{1-\cos [(n+1)\theta]+i(\sin[(n+1)\theta])}{1-\cos n\theta -i\sin n\theta}.$$ From here I did a whole lot of manipulating, but never getting any closer to the identity asked.

If anyone could shed some light it would be greatly appreciated! ~Dom

-

Hint: factor out $e^{i (n+1) \theta/2}$ from the numerator and $e^{i \theta/2}$ from the denominator, then take the real part of the complex expression.
So by factoring out the terms and substituting with corresponding trig. identities I obtained $$\frac{\sin[(n+1)\theta /2]}{\sin\theta /2}e^{in\theta /2},$$ which is somewhat closer, but after I substitute $e^{in\theta /2} = \cos(n\theta /2) +i\sin(n\theta /2)$, I still have some trouble seeing how to reach my goal. –  Domonic Mei Feb 12 '13 at 1:32
Nevermind, I can make my answer by using the product identity of $\sin(s)\cos(t)$. Thanks! –  Domonic Mei Feb 12 '13 at 5:03