The Fejer kernel has this $\sin$ closed form. Let $D_N$ be the $N$th Dirichlet kernel, $D_N = \sum_{k = -N}^N w^k$, where $w = e^{ix}$.  Define the Fejer kernel to be $F_N = \frac{1}{N}\sum_{k = 0}^{N-1}D_k$.   Then $$F_N = \frac{1}{N}\frac{\sin^2(N x/2)}{\sin^2(x/2)}$$.
So far I have $D_k = \frac{w^{k+1} - w^{-k}}{w-1}$, and so
$$
\begin{align*}
F_N &= \frac{1}{N}\sum_{k=0}^{N-1} D_k \\
&= \frac{1}{N(w-1)}\sum_{k=0}^{N-1} (w^{k+1} - w^{-k}) \\
&= \frac{1}{N(w-1)}\left ( w\sum_{k=0}^{N-1} w^k - \sum_{k=-N+1}^0 w^k  \right ) \\
&= \frac{1}{N(w-1)}\left ( \frac{w(w^N - 1)}{w-1} - \frac{1-w^{-N + 1}}{w-1} \right ) \\
&= \frac{1}{N(w-1)^2}\left ( w^{N+1} +w^{-N + 1} - (w + 1) \right )
\end{align*}
$$
 A: Remember that $NF_N(x)=D_0(x)+\dots+D_{N-1}(x)$ where $D_n(x)$ is the Dirichlet kernel.
Therefore , if $\omega = e^{ix}$ we have
$$NF_N(x)=\sum_{n=0}^{N-1}\frac{\omega^{-n}-\omega^{n+1}}{1-\omega}$$
Then we have 
$$\sum_{n=0}^{N-1}\omega^{-n}=1+1/\omega+\dots+1/\omega^{N-1}=\frac{1-\omega^{-N}}{1-\omega^{-1}}=\omega\frac{\omega^{-N}-1}{1-\omega}$$
and 
$$\sum_{n=0}^{N-1}\omega^{n+1}=\omega(1+\omega+\dots+\omega^{N-1})=\omega\frac{1-\omega^N}{1-\omega}$$
Thus $$NF_N(x)=\frac{\sum_{n=0}^{N-1}\omega^{-n}-\sum_{n=0}^{N-1}\omega^{n+1}}{1-\omega}
=\omega\frac{\omega^N-2+\omega^{-N}}{(1-\omega)^2}=\frac{(\omega^{N/2}-\omega^{-N/2})^2}{(\omega^{1/2}-\omega^{-1/2})^2}=\frac{\sin^2(Nx/2)}{\sin^2(x/2)}$$
So have get
$$F_N(x)=\frac{1}{N}\frac{\sin^2(Nx/2)}{\sin^2(x/2)}$$
A: We can prove the equality for the Fejér kernel in the following way. Using the formula for the geometric progression and the fact that $e^{i\theta}-e^{-i\theta}=2i\sin\theta$ for each $\theta\in\mathbb R$,
\begin{align*}
 D_k(x)
 &=e^{-ikx}\sum_{s=0}^{2k}e^{isx}\\
 &=e^{-ikx}\frac{1-e^{ix(2k+1)}}{1-e^{ix}}\\
 &=\frac{e^{-ix(k+1/2)}-e^{ix(k+1/2)}}{e^{-ix/2}-e^{ix/2}}\\
 &=\frac{\sin(x(k+1/2))}{\sin(x/2)}.
\end{align*}
Using the product-to-sum identity and the power reduction formula,
\begin{align*}
 F_n(x)
 &=\frac1{n\sin(x/2)}\sum_{k=0}^{n-1}\sin(x(k+1/2))\\
 &=\frac1{2n\sin^2(x/2)}\sum_{k=0}^{n-1}2\sin(x(k+1/2))\sin(x/2)\\
 &=\frac1{2n\sin^2(x/2)}\sum_{k=0}^{n-1}[\cos(kx)-\cos((k+1)x)]\\
 &=\frac{1-\cos (nx)}{2n\sin^2(x/2)}\\
 &=\frac1n\biggl[\frac{\sin(nx/2)}{\sin(x/2)}\biggr]^2.
\end{align*}
The trigonometric identities can be found here.
