I want to show that $\sum_{k=-N}^{N}e^{ikx}=\frac{\sin((N+\frac{1}{2})x)}{\sin(\frac{x}{2})}$ for $N\in \mathbb{N}$
Any tips on how to proceed?
I tried doing it in two ways:
First using the sum of polynomials formula:
($1+r+r^2+...+r^n=\frac{1-r^{n+1}}{1-r}$) while letting $r=e^{ix}$
but the calculation got too tedious.
Second by replacing $e^{ix}$ with Euler's formula directly, I get:
$\sum_{k=-N}^{N}e^{ikx}=1+2\sum_{k=1}^{N}\cos(kx)$
which isn't anywhere close the required result.