← Exercise library← All exercises for this theme
Theme 2 — Hilbert Spaces and Dirac Notation

Fourier basis and Parseval's identity

Keywords: Hilbert basis · Fourier series · Parseval's identity · Bessel's inequality · best approximation · infinite dimension

Exercise 1 : Fourier basis and Parseval's identity

Consider the Hilbert space L2(−π,π)L^2(-\pi,\pi) of square-integrable functions on [−π,π][-\pi,\pi], equipped with the inner product ⟨f,g⟩=∫−ππf(x)∗g(x) dx\langle f,g\rangle=\int_{-\pi}^{\pi}f(x)^*g(x)\,dx, and the family of functions

en(x)=12π einx,n∈Z.e_n(x)=\frac{1}{\sqrt{2\pi}}\,e^{inx},\qquad n\in\Z .

Assume that this family is total, that is, its finite linear combinations are dense in L2(−π,π)L^2(-\pi,\pi).

Question 1
Show that the family (en)n∈Z(e_n)_{n\in\Z} is orthonormal. Deduce that it is a Hilbert basis of L2(−π,π)L^2(-\pi,\pi).

Solution
We calculate

⟨em,en⟩=12π∫−ππe−imxeinx dx=12π∫−ππei(n−m)x dx.\langle e_m,e_n\rangle=\frac{1}{2\pi}\int_{-\pi}^{\pi}e^{-imx}e^{inx}\,dx=\frac{1}{2\pi}\int_{-\pi}^{\pi}e^{i(n-m)x}\,dx .

If n=mn=m, the integrand is 11 and the result is 11. If n≠mn\neq m, an antiderivative of ei(n−m)xe^{i(n-m)x} is ei(n−m)xi(n−m)\frac{e^{i(n-m)x}}{i(n-m)}, which takes the same value at ±π\pm\pi because ei(n−m)π=e−i(n−m)π=(−1)n−me^{i(n-m)\pi}=e^{-i(n-m)\pi}=(-1)^{n-m}; the integral vanishes. The family is therefore orthonormal, and since it is total, it is a Hilbert basis: every f∈L2(−π,π)f\in L^2(-\pi,\pi) can be written f=∑n∈Zcnenf=\sum_{n\in\Z}c_ne_n, with cn=⟨en,f⟩c_n=\langle e_n,f\rangle, where the series converges in the L2L^2 norm.

Question 2
Calculate the coefficients cn=⟨en,f⟩c_n=\langle e_n,f\rangle of the function f(x)=xf(x)=x.

Solution
We have cn=12π∫−ππx e−inx dxc_n=\frac{1}{\sqrt{2\pi}}\int_{-\pi}^{\pi}x\,e^{-inx}\,dx. For n=0n=0, the integrand is odd and c0=0c_0=0. For n≠0n\neq0, integrate by parts, differentiating xx and integrating e−inxe^{-inx}:

∫−ππx e−inx dx=[x e−inx−in]−ππ+1in∫−ππe−inx dx=π(−1)n+π(−1)n−in+0=2πi(−1)nn,\int_{-\pi}^{\pi}x\,e^{-inx}\,dx=\Bigl[\frac{x\,e^{-inx}}{-in}\Bigr]_{-\pi}^{\pi}+\frac{1}{in}\int_{-\pi}^{\pi}e^{-inx}\,dx=\frac{\pi(-1)^n+\pi(-1)^n}{-in}+0=\frac{2\pi i(-1)^n}{n},

where we used e∓inπ=(−1)ne^{\mp in\pi}=(-1)^n and 1−i=i\frac{1}{-i}=i. Thus

cn=2π i(−1)nn,∣cn∣2=2πn2(n≠0).c_n=\sqrt{2\pi}\,\frac{i(-1)^n}{n},\qquad |c_n|^2=\frac{2\pi}{n^2}\quad(n\neq0).

Question 3
Write Parseval's identity for this function. Deduce the value of ∑n≥11n2\sum_{n\geq1}\frac{1}{n^2}.

Solution
Parseval's identity states that ∥f∥2=∑n∈Z∣cn∣2\norm f^2=\sum_{n\in\Z}|c_n|^2. On the one hand, ∥f∥2=∫−ππx2 dx=2π33\norm f^2=\int_{-\pi}^{\pi}x^2\,dx=\frac{2\pi^3}{3}. On the other hand, each integer n≥1n\geq1 appears twice, for nn and −n-n, and

∑n∈Z∣cn∣2=2∑n≥12πn2=4π∑n≥11n2.\sum_{n\in\Z}|c_n|^2=2\sum_{n\geq1}\frac{2\pi}{n^2}=4\pi\sum_{n\geq1}\frac{1}{n^2}.

Equating the two expressions gives

∑n≥11n2=2π33⋅14π=π26.\sum_{n\geq1}\frac{1}{n^2}=\frac{2\pi^3}{3}\cdot\frac{1}{4\pi}=\frac{\pi^2}{6}.

This is the celebrated Basel problem, solved by Euler in 1735, obtained here as a consequence of the Pythagorean theorem in infinite dimensions.

Question 4
Let fN=∑∣n∣≤Ncnenf_N=\sum_{|n|\leq N}c_ne_n be the partial sum of order NN. Show that fNf_N is the best approximation to ff by a linear combination of e−N,...,eNe_{-N},...,e_N, and calculate the error ∥f−fN∥2\norm{f-f_N}^2. How does it behave for large NN?

Solution
The function fNf_N is the orthogonal projection of ff onto the finite-dimensional subspace FNF_N spanned by e−N,...,eNe_{-N},...,e_N, since the projector onto this subspace is ∑∣n∣≤N∣en⟩⟨en∣\sum_{|n|\leq N}\ket{e_n}\bra{e_n}. By the best-approximation result established by the Pythagorean theorem, fNf_N is the element of FNF_N closest to ff. The error is the norm of the orthogonal component, which is again calculated from the remaining coefficients using Parseval's identity:

∥f−fN∥2=∑∣n∣>N∣cn∣2=4π∑n>N1n2.\norm{f-f_N}^2=\sum_{|n|>N}|c_n|^2=4\pi\sum_{n>N}\frac{1}{n^2}.

Comparison with the integral ∫N∞dxx2=1N\int_N^\infty\frac{dx}{x^2}=\frac1N gives ∥f−fN∥2≃4πN\norm{f-f_N}^2\simeq\frac{4\pi}{N} for large NN: the error tends to zero, but slowly. The slow 1/n1/n decay of the coefficients arises because the periodic extension of the function f(x)=xf(x)=x is discontinuous at ±π\pm\pi. As with the Fourier transform on the real line, the smoother a function is, the faster its Fourier coefficients decay.