Calculate the nth Fourier transform of the Fejer kernel, i.e., $N\int\Big(\frac{\sin \pi xN}{\pi xN}\Big)^2 e^{-2\pi ixn}dx$ I want to calculate the Fourier transform of the Fejer kernel $\mathcal{F}_{N}$ on the real line, which is given by
$$
\mathcal{F}_N\left(x\right) =
\begin{cases}
N\left[\,{\frac{\sin\left(\,{\pi xN}\,\right)}{\pi xN}}\,\,\right]^{2},  & \text{if}\ x\neq 0 \\[2ex]
N, & \text{if}\ x = 0 
\end{cases}
$$
I want to find
$$
\hat{\mathcal{F}}_{N}\left(n\right) =
N\int\left[\frac{\sin\left(\pi xN\right)\,\,}
{\pi xN}\right]^{2}
\mathrm{e}^{-2\pi\mathrm{i}xn}\,\,\,\mathrm{d}x\,,
$$
but so far I can't think of any transformations to compute this integral. I would greatly appreciate any help.
 A: Let us use the identity
$$\frac{\sin ax}{a x} = \frac{1}{2a}\int_{-a}^{a} e^{i x\xi}\,\mathrm{d}\xi
$$
with $a=\pi N$. Subsituting in the definition
\begin{align}
\hat{\mathcal{F}}_N(n) 
&= N\int_{-\infty}^{\infty} \left(\frac{\sin \pi x N}{\pi x N}\right)^2 e^{-2\pi i x n} \mathrm{d}x\\
&= N\int_{-\infty}^{\infty} 
\left(\frac{1}{2a}\int_{-a}^{a} e^{i x\xi_1}\,\mathrm{d}\xi_1\right) 
\left(\frac{1}{2a}\int_{-a}^{a} e^{i x\xi_2}\,\mathrm{d}\xi_2\right) 
e^{-2\pi i x n} \mathrm{d}x\\
&= \frac{N}{4a^2}\int_{-\infty}^{\infty}  \mathrm{d}x \int_{-a}^{a}d\xi_1 \int_{-a}^{a}d\xi_2
e^{i x(\xi_1+\xi_2 - 2\pi n)}\,.
\end{align}
Rearranging the order of the integrals we may recognize the $\delta$ function, which may be generally written as
$$
\delta(z-\alpha)=\frac{1}{2\pi} \int_{-\infty}^\infty e^{ik(z-\alpha)}\ dk
=\frac{1}{2\pi} \int_{-\infty}^\infty e^{ik(z-\alpha)}\ dk\,,
$$
with the identification $k\equiv x$ and $z-\alpha \equiv \xi_1+\xi_2-2\pi n$. Since $a=\pi N$, this leads to
$$\hat{\mathcal{F}}_N(n) 
= \frac{1}{2\pi N}  
\int_{-\pi N}^{\pi N}d\xi_1 \int_{-\pi N}^{\pi N}d\xi_2
\,\delta(\xi_1+\xi_2 - 2\pi n)\,.
$$
The integral is proportional to the length of the diagonal where $\xi_2=2\pi n - \xi_1$ within the square with edges at $\pm\pi N$. The result is zero if $|n|>N$ and nonzero otherwise. To make the calculation simpler we may shift the coordinates by changing the integration variable as $\xi_{1,2}=\xi'_{1,2}-N\pi$,
$$\hat{\mathcal{F}}_N(n) 
= \frac{1}{2\pi N}  
\int_{0}^{2\pi N}d\xi'_1 \int_{0}^{2\pi N}d\xi'_2
\,\delta\left(\xi'_1+\xi'_2 - 2\pi \left(n+N\right)\right)\,.
$$
This shows that the length of the side is $2\pi(n+N)$ if $0\leq 2\pi(n+N)\leq 2\pi N$ and decreases otherwise if $2\pi N\leq 2\pi(n+N)\leq 4\pi N$
\begin{equation}
\hat{\mathcal{F}}_N(n) = 
\left\{
\begin{array}{cl}
0 & {\rm if~} |n|>N\\
\frac{n-N}{N} & {\rm if~} -N\leq n \leq 0\\
1-\frac{n-N}{N} & {\rm if~} 0\leq n \leq N
\end{array}
\right.
\end{equation}
This may be simplified as
\begin{equation}
\hat{\mathcal{F}}_N(n) = 
\left\{
\begin{array}{cc}
0 & {\rm if~}  |n| \geq N \\
1-\frac{|n|}{N} & {\rm if~} |n| \leq N
\end{array}
\right.\,.
\end{equation}
We may verify the result for $n=0$ and $n=\pm N$ by direct calculation
\begin{align}
\hat{\mathcal{F}}_N(0) 
&= N\int_{-\infty}^{\infty} \left(\frac{\sin \pi x N}{\pi x N}\right)^2  \mathrm{d}x = 1
\end{align}
and
\begin{align}
\hat{\mathcal{F}}_N(\pm N) 
&= N\int_{-\infty}^{\infty} \left(\frac{\sin \pi x N}{\pi x N}\right)^2 \cos(\pm 2\pi x N) \mathrm{d}x \\
&= \frac{1}{\pi}\int_{-\infty}^{\infty} \frac{\sin^2 \theta}{\theta^2} \cos(\pm 2\theta) \mathrm{d}\theta \\
&= \frac{1}{\pi}\int_{-\infty}^{\infty} \frac{\sin^2\theta}{\theta^2} (1-2\sin^2\theta) \mathrm{d}\theta\\
&= \frac{1}{\pi}\int_{-\infty}^{\infty} \frac{\sin^2\theta}{\theta^2}  \mathrm{d}\theta
-\frac{2}{\pi}\int_{-\infty}^{\infty} \frac{\sin^4\theta}{\theta^2}  \mathrm{d}\theta = 1 - 1 = 0\,,
\end{align}
as required.
