What has happened in this step in the computation of DFT Consider the following derivation of DFT involving heavy complex exponentials computations :
\begin{aligned}
a_{k} &=\frac{1}{N} \sum_{n=-N_{1}}^{N_{1}} e^{-j k(2 \pi / N) n} \\ \\
&=\frac{1}{N} e^{j k(2 \pi / N) N_{1}}\left(\frac{1-e^{-j k 2 \pi\left(2 N_{1}+1\right) / N}}{1-e^{-j k(2 \pi / N)}}\right)\qquad(\text{From Here})\\ \\
&=\frac{1}{N} \frac{e^{-j k(2 \pi / 2 N)}\left[e^{j k 2 \pi\left(2 N_{1}+1\right) / 2 N}-e^{-j k 2 \pi\left(2 N_{1}+1\right) / 2 N}\right]}{e^{-j k(2 \pi / 2 N)\left[e^{j k(2 \pi / 2 N)}-e^{-j k(2 \pi / 2 N)}\right]}}\qquad(\text{To Here})\\ \\
&=\frac{1}{N} \frac{\sin \left(2 \pi k\left(N_{1}+1 / 2\right) / N\right)}{\sin (\pi k / N)}, \quad k \neq 0, \pm N, \pm 2 N, \ldots \\ \\
a_{k} &=\frac{2 N_{1}+1}{N}, \quad k=0, \pm N, \pm 2 N, \ldots
\end{aligned}
I did not fully understand how they transitioned from where I have indicated, any help is much appreciated. Note: $j^{2}=-1$.
 A: \begin{align}&\frac{1}{N} e^{j k(2 \pi / N) N_{1}}\left(\frac{1-e^{-j k 2 \pi\left(2 N_{1}+1\right) / N}}{1-e^{-j k(2 \pi / N)}}\right)\qquad(\text{From Here})\\ 
&=\frac{1}{N} e^{j k(2 \pi / N) N_{1}}\left( \frac{e^{-jk2\pi(2N_1+1)/2N}}{e^{-jk(2\pi/2N)}}\right)\left(\frac{e^{j k 2 \pi\left(2 N_{1}+1\right) / 2N}-e^{-j k 2 \pi\left(2 N_{1}+1\right) / 2N}}{e^{j k(2 \pi / 2N)}-e^{-j k(2 \pi / 2N)}}\right)\\ 
&=\frac{1}{N} e^{j k(2 \pi / N) N_{1}}\left( \frac{e^{-jk2\pi(N_1+1/2)/N}}{e^{-jk(2\pi/2N)}}\right)\left(\frac{e^{j k 2 \pi\left(2 N_{1}+1\right) / 2N}-e^{-j k 2 \pi\left(2 N_{1}+1\right) / 2N}}{e^{j k(2 \pi / 2N)}-e^{-j k(2 \pi / 2N)}}\right)\\ 
&=\frac{1}{N} \left( \frac{e^{-jk2\pi(1/2)/N}}{e^{-jk(2\pi/2N)}}\right)\left(\frac{e^{j k 2 \pi\left(2 N_{1}+1\right) / 2N}-e^{-j k 2 \pi\left(2 N_{1}+1\right) / 2N}}{e^{j k(2 \pi / 2N)}-e^{-j k(2 \pi / 2N)}}\right)\\ 
&=\frac{1}{N} \frac{e^{-j k(2 \pi / 2 N)}\left[e^{j k 2 \pi\left(2 N_{1}+1\right) / 2 N}-e^{-j k 2 \pi\left(2 N_{1}+1\right) / 2 N}\right]}{e^{-j k(2 \pi / 2 N)\left[e^{j k(2 \pi / 2 N)}-e^{-j k(2 \pi / 2 N)}\right]}}\qquad(\text{To Here})\\ \end{align}
We just pull out the common factor of $e^{-jk(2\pi/2N)}$ from the denominator and  $e^{-jk2\pi(2N_1+1)/2N}$ from the numerator.  We then multiply the numerator part  with $e^{j k(2 \pi / N) N_{1}}$ to further simplify it. The motivation of factoring it this way is to express it in terms of difference of conjugate, which would give us sine terms.
