Show that the Fejer kernel $$F_N(x) = \sum_{-N}^{N} \left( 1 - \dfrac{|n|}{N}\right)e_n$$ where $e_n(x) = e^{2\pi i n x}$ is the trigonometric monomial, can be written as $$F_N(x) = \frac{e^{\pi i (N-1)x}\sin (\pi N x)}{\sin (\pi x)}$$ on the interval $(0,1)$.
Until so far I have researched, found and proven that $$F_N(x) = \frac{1}{N} \left|\sum_{i=0}^{N-1}e_n \right|^2$$ which is a gread leap for me, but not really for the whole proof. I also found a hint saying that I should use the geometric sums $$\sum_{i=0}^{N-1}e_n = \frac{e_N - e_0}{e_1 - e_0}$$ However, I do not know how that helps me. Any hints on how I can proceed would be greatly appreciated!