# Dirichlet kernel

In mathematical analysis, the Dirichlet kernel is the collection of functions

${\displaystyle D_{n}(x)={\frac {1}{2\pi }}\sum _{k=-n}^{n}e^{ikx}={\frac {1}{2\pi }}\left(1+2\sum _{k=1}^{n}\cos(kx)\right)={\frac {\sin \left(\left(n+1/2\right)x\right)}{2\pi \sin(x/2)}}.}$

It is named after Peter Gustav Lejeune Dirichlet.

Plot of the first few Dirichlet kernels showing its convergence to the Dirac delta distribution.

The importance of the Dirichlet kernel comes from its relation to Fourier series. The convolution of Dn(x) with any function ƒ of period 2π is the nth-degree Fourier series approximation to ƒ, i.e., we have

${\displaystyle (D_{n}*f)(x)=\int _{-\pi }^{\pi }f(y)D_{n}(x-y)\,dy=\sum _{k=-n}^{n}{\hat {f}}(k)e^{ikx},}$

where

${\displaystyle {\widehat {f}}(k)={\frac {1}{2\pi }}\int _{-\pi }^{\pi }f(x)e^{-ikx}\,dx}$

is the kth Fourier coefficient of ƒ. This implies that in order to study convergence of Fourier series it is enough to study properties of the Dirichlet kernel.

Plot of the first few Dirichlet kernels

## L1 norm of the kernel function

Of particular importance is the fact that the L1 norm of Dn on ${\displaystyle [0,2\pi ]}$  diverges to infinity as n → ∞. One can estimate that

${\displaystyle \|D_{n}\|_{L^{1}}=\Omega (\log n).\,}$

By using a Riemann-sum argument to estimate the contribution in the largest neighbourhood of zero in which ${\displaystyle D_{n}}$  is positive, and the Jensen's inequality for the remaining part, it is also possible to show that:

${\displaystyle \|D_{n}\|_{L^{1}}\geq 4\operatorname {Si} (\pi )+{\frac {8}{\pi }}\log n.}$

This lack of uniform integrability is behind many divergence phenomena for the Fourier series. For example, together with the uniform boundedness principle, it can be used to show that the Fourier series of a continuous function may fail to converge pointwise, in rather dramatic fashion. See convergence of Fourier series for further details.

A precise proof of the first result that ${\displaystyle \|D_{n}\|_{L^{1}[0,2\pi ]}=\Omega (\log n)}$  is given by

{\displaystyle {\begin{aligned}\int _{0}^{2\pi }|D_{n}(x)|\,dx&\geq \int _{0}^{\pi }{\frac {|\sin[(2n+1)x]|}{x}}\,dx\\[5pt]&\geq \sum _{k=0}^{2n}\int _{k\pi }^{(k+1)\pi }{\frac {|\sin(s)|}{s}}\,ds\\[5pt]&\geq \left|\sum _{k=0}^{2n}\int _{0}^{\pi }{\frac {\sin(s)}{(k+1)\pi }}\,ds\right|\\[5pt]&={\frac {2}{\pi }}H_{2n+1}\\[5pt]&\geq {\frac {2}{\pi }}\log(2n+1),\end{aligned}}}

where we have used the Taylor series identity that ${\displaystyle 2/x\leq 1/|\sin(x/2)|}$  and where ${\displaystyle H_{n}}$  are the first-order harmonic numbers.

## Relation to the delta function

Take the periodic Dirac delta function,[clarification needed] which is not a function of a real variable, but rather a "generalized function", also called a "distribution", and multiply by 2π. We get the identity element for convolution on functions of period 2π. In other words, we have

${\displaystyle f*(2\pi \delta )=f}$

for every function ƒ of period 2π. The Fourier series representation of this "function" is

${\displaystyle 2\pi \delta (x)\sim \sum _{k=-\infty }^{\infty }e^{ikx}=\left(1+2\sum _{k=1}^{\infty }\cos(kx)\right).}$

Therefore the Dirichlet kernel, which is just the sequence of partial sums of this series, can be thought of as an approximate identity. Abstractly speaking it is not however an approximate identity of positive elements (hence the failures mentioned above).

## Proof of the trigonometric identity

${\displaystyle \sum _{k=-n}^{n}e^{ikx}={\frac {\sin((n+1/2)x)}{\sin(x/2)}}}$

displayed at the top of this article may be established as follows. First recall that the sum of a finite geometric series is

${\displaystyle \sum _{k=0}^{n}ar^{k}=a{\frac {1-r^{n+1}}{1-r}}.}$

In particular, we have

${\displaystyle \sum _{k=-n}^{n}r^{k}=r^{-n}\cdot {\frac {1-r^{2n+1}}{1-r}}.}$

Multiply both the numerator and the denominator by ${\displaystyle r^{-1/2}}$ , getting

${\displaystyle {\frac {r^{-n-1/2}}{r^{-1/2}}}\cdot {\frac {1-r^{2n+1}}{1-r}}={\frac {r^{-n-1/2}-r^{n+1/2}}{r^{-1/2}-r^{1/2}}}.}$

In the case ${\displaystyle r=e^{ix}}$  we have

${\displaystyle \sum _{k=-n}^{n}e^{ikx}={\frac {e^{-(n+1/2)ix}-e^{(n+1/2)ix}}{e^{-ix/2}-e^{ix/2}}}={\frac {-2i\sin((n+1/2)x)}{-2i\sin(x/2)}}={\frac {\sin((n+1/2)x)}{\sin(x/2)}}}$

as required.

### Alternative proof of the trigonometric identity

${\displaystyle f(x)={\frac {1}{2}}+\sum _{k=1}^{n}\cos(kx).}$

Multiply both sides of the above by

${\displaystyle 2\sin(x/2)}$

and use the trigonometric identity

${\displaystyle \cos(a)\sin(b)={\frac {\sin(a+b)-\sin(a-b)}{2}}}$

to reduce the right-hand side to

${\displaystyle \sin((n+1/2)x).}$

## Variant of identity

If the sum is only over non negative integers (which may arise when computing a DFT that is not centered), then using similar techniques we can show the following identity:

${\displaystyle \sum _{k=0}^{N-1}e^{ikx}=e^{i(N-1)x/2}{\frac {\sin(N\,x/2)}{\sin(x/2)}}}$