Dirichlet, Fejér and more

The Dirichlet kernel DN(x)=n=NNe(nx) has a pivotal importance when studying Fourier series. In some sense it is an approximation of the 1-periodic Dirac delta when N. The slow decay is an issue when one enters into convergence problems.

A more regular version is the Fejér kernel, which is the Cesàro sum of the Dirichlet kernel except for shifting N into N1, FN(x)=n=NN(1|n|N)exp(2πinx) The quickest decay of this function at the cost of having thicker peaks (this also appears in digital windows) allows to prove a nice theorem (Fejér's theorem): If f is 1-periodic and continuous having {am}mZ as Fourier coefficients, then f(x)=limNm=NN(1|m|N)amexp(2πimx)uniformly in x.

One may consider smoother versions, so to speak, of the Dirichlet kernel taking higher Cesàro sums. The natural object for k a nonnegative integer is CN,k(x)=n=(Nk)Nk(Nk|n|)(N|n|)1exp(2πinx). Note that DN(x)=CN,0(x)andFN(x)=CN,1(x).

The following plots drawn with the code below show the cases k=0,1,2 for some small values of N.

cesarok_4_0 cesarok_4_1 cesarok_4_2
N=4,   k=0 N=4,   k=1 N=4,   k=2


cesarok_8_0 cesarok_8_1 cesarok_8_2
N=8,   k=0 N=8,   k=1 N=8,   k=2


cesarok_16_0 cesarok_16_1 cesarok_16_2
N=16,   k=0 N=16,   k=1 N=16,   k=2


cesarok_32_0 cesarok_32_1 cesarok_32_2
N=32,   k=0 N=32,   k=1 N=32,   k=2


It is interesting to observe the vertical scale. When k grows the peaks are shorter and wider. Note that 1/21/2CN,k=1 as it must be if we want to mimic a Dirac delta.





The code

This is the SAGE code that produces all the images:
  
def cesarok(N, al):
  f = 1
  thi = 3
  if N>8: thi = 2
  if N>16: thi = 1
  for j in srange(1, N-al+1):
    f += 2*binomial(N-al,j)/binomial(N,j)*cos(2*pi*j*x)
  P = plot(f, x,-1.5,1.5, thickness=thi,tick_formatter="latex")
  P.fontsize(16)
  return P
  

# DIRICHLET-FEJER-CESARO
fs = 4
for al in srange(3):
  for N in [4, 8, 16, 32]:
    P = cesarok(N, al)
    P.save('../images/cesarok_'+str(N)+'_'+str(al)+'.png', figsize = fs)