# How do you work out the sum of the series: $\cos{x}+\cos{2x}+\cdots+\cos{(n-1)x}$ by multiplying through by $2\sin(x/2)$?

How do you work out the sum of the series: $\cos{x}+\cos{2x}+\cdots+\cos{(n-1)x}$ by multiplying through by $2\sin(x/2)$? I am supposed to find the sum using only this method and I'm not completely sure what the sum at the end would look like. Can anyone help? Thanks.

-
@Adam: Why not post that as an answer? I'd up-vote it. –  Clive Newstead Jan 8 '13 at 12:15
Adam gave you the correct answer. Another way is to use that $$e^{ix}+e^{2ix}+\cdots+e^{(n-1)ix}=e^{ix}\dfrac{e^{(n-1)ix}-1}{e^{ix}-1}$$ and Euler's identity. –  P.. Jan 8 '13 at 12:20
@Pambos: You didn't need to delete your answer. It's OK to have multiple answers showing different ways of solving a problem. –  Rahul Jan 9 '13 at 18:33

Hint: Use identity $$2\cos(\theta)\sin(\phi) = \sin(\theta + \phi)-\sin(\theta-\phi)$$
Another way is to use that $$e^{ix}+e^{2ix}+\cdots+e^{(n-1)ix}=e^{ix}\dfrac{e^{(n-1)ix}-1}{e^{ix}-1}$$ and Euler's identity.