I was doing this question in PDE from Strauss - section 5.5 question 7. Somehow i got stuck at one part and went to read the answer. I realized this is one of the missing link that i do not know how to derive the summation to the answer they gave. Anyone knows how this summation work?
Well the most basic way is try to list out every term but i seem to not see the link: $$\sum_{n=-N}^{N}e^{-inx} = e^{iNx}+e^{i(N-1)x}+...+e^{ix}+1+e^{-ix}+...+e^{-i(N-1)x}+e^{-iNx}$$
This is a geometric progression of common ratio $e^{-ix}$, so all Strauss has done is find the closed form of that series by using the Geometric Progression formula.
$$S_n=\frac{u_1(r^n-1)}{r-1}$$
So $$\sum_{n=-N}^Ne^{-inx}=e^{iNx}+e^{iNx} e^{-ix}+ e^{iNx} \left(e^{-ix}\right)^2+...$$
$u_1=e^{iNx}$, $n=2N+1$ so $$S _n=\frac{e^{iNx}(1-e^{-ix(2N+1)})}{1-e^{-ix}}$$ $$=\frac{e^{iNx}-e^{-ix(N+1)}}{e^{ix}-1}\times e^{ix}$$ $$=\frac{e^{i(N+1)x}-e^{-iNx}}{e^{ix}-1}$$