$$D_N(x)=\sum^{N}_{-N}e^{2\pi inx}=e^{-2\pi iNx}\sum^{2N}_{0}e^{2\pi inx}$$ $$=e^{2\pi iNx}\left(\frac{e^{2\pi i(2N+1)x}-1}{e^{2\pi ix}-1}\right)$$ $$=\frac{e^{2\pi i(N+1/2)}-e^{-2\pi i(N+1/2)x}}{e^{\pi ix}-e^{-\pi ix}}$$
So I saw this derivation in my textbook. I'm having trouble following the line of reasoning from each line.
From the 1st line to the 2nd line, is $\sum^{2N}_{0}e^{2\pi inx}$ a geometric series?
I am completely lost from the 2nd line to the 3rd.
Yes, 1st to 2nd you have a geometric sum. From 2nd to 3rd line multiply both numerator and denominator by $e^{-i\pi x}$ and simplify the numerator.