How to show that $\sum_{n=1}^{N} \cos(2n-1)x = \frac {\sin(2Nx)}{2\sin(x)} $ I am studying Fourier analysis and have been given the following question:
Show that $$\sum_{n=1}^{N} \cos(2n-1)x = \frac {\sin(2Nx)}{2\sin(x)} $$
I used the formula for a finite geometric sum and Euler's formula to get to the following:
$\sum_{n=1}^{N} \cos(2n-1)x = Re (\sum_{n=1}^{N} e^{i(2n-1)x}) = Re (\sum_{n=0}^{N-1} e^{i(2n+1)x}) = Re (e^{ix} \sum_{n=0}^{N-1} (e^{i2x})^n) = .... = Re(\frac{i}{2 \sin{x}}(1-e^{i2xN}))$
I have been stuck here for a while and am unsure how to get to the required $\frac {\sin(2Nx)}{2\sin(x)}$.
What do I do next?

Since
$2\sin(a)\cos(b)
= \sin(a+b)+\sin(a-b)
$,
$2\sin(x)\cos((2n-1)x)
= \sin(2nx)+\sin(-(2n-2)x)
= \sin(2nx)-\sin((2n-2)x)
$,
so you get a telescoping sum.
