I'm reading the proof for the trigonometric identity of the Dirichlet Kernel. There is just one step that I don't understand fully and I would appreciate it if someone could explain it for me.
We know that the sum of a limited geometric series is
\begin{equation} \displaystyle \sum _{n=0} ^N ar^n = a \frac{1 - r^{n+1}}{1-r} \end{equation}
In particular we know that
\begin{equation} \displaystyle \sum _{n = -N} ^N r^n = r^{-N} \frac{1-r^{2N+1}}{1-r} \end{equation}
The rest of the proof is pretty straightforward but it has been a while since I have dealt with series and I don't really understand how the second equation is obtained.
Thanks!