Skip to main content
Logo image

Section 11.8 Fourier series

Note: 3–4 lectures
Fourier series
 1 
Named after the French mathematician Jean-Baptiste Joseph Fourier (1768–1830).
is perhaps the most important (and the most difficult) of the series that we cover in this book. We saw a few examples already, but let us start at the beginning.

Subsection 11.8.1 Trigonometric polynomials

A trigonometric polynomial is an expression of the form
a0+n=1N(ancos(nx)+bnsin(nx)),
or equivalently, thanks to Euler’s formula (eiθ=cos(θ)+isin(θ)):
n=NNcneinx.
The second form is usually more convenient. If zC with |z|=1, we write z=eix, and so
n=NNcneinx=n=NNcnzn.
So a trigonometric polynomial is really a rational function of the complex variable z (we are allowing negative powers) evaluated on the unit circle. There is a wonderful connection between power series (actually Laurent series because of the negative powers) and Fourier series because of this observation, but we will not investigate this further.
Another reason why Fourier series is important and comes up in so many applications is that the functions einx are eigenfunctions
 2 
Eigenfunction is like an eigenvector for a matrix, but for a linear operator on a vector space of functions.
of various differential operators. For example,
ddx[einx]=(in)einx,d2dx2[einx]=(n2)einx.
That is, they are the functions whose derivative is a scalar (the eigenvalue) times itself. Just as eigenvalues and eigenvectors are important in studying matrices, eigenvalues and eigenfunctions are important when studying linear differential equations.
The functions cos(nx), sin(nx), and einx are 2π-periodic and hence trigonometric polynomials are also 2π-periodic. We could rescale x to make the period different, but the theory is the same, so we stick with the period 2π. The antiderivative of einx is einxin and so
ππeinxdx={2πif n=0,0otherwise.
Consider
f(x):=n=NNcneinx,
and for m=N,,N compute
12πππf(x)eimxdx=12πππ(n=NNcnei(nm)x)dx=n=NNcn12πππei(nm)xdx=cm.
We just found a way of computing the coefficients cm using an integral of f. If |m|>N, the integral is 0, so we might as well have included enough zero coefficients to make |m|N.

Proof.

If f(x) is real-valued, that is f(x)=f(x), then
cm=12πππf(x)eimxdx=12πππf(x)eimxdx=12πππf(x)eimxdx=cm.
The complex conjugate goes inside the integral because the integral is done on real and imaginary parts separately.
On the other hand, if cm=cm, then
cmeimx+cmeimx=cmeimx+cmeimx=cmeimx+cmeimx,
which is real valued. Also c0=c0, so c0 is real. By pairing up the terms, we obtain that f has to be real-valued.
The functions einx are also linearly independent.

Proof.

The result follows immediately from the integral formula for cn.

Subsection 11.8.2 Fourier series

We now take limits. The series
n=cneinx
is called the Fourier series and the numbers cn the Fourier coefficients. Using Euler’s formula eiθ=cos(θ)+isin(θ), we could also develop everything with sines and cosines, that is, as the series a0+n=1ancos(nx)+bnsin(nx). It is equivalent, but slightly more messy.
Several questions arise. What functions are expressible as Fourier series? Obviously, they have to be 2π-periodic, but not every periodic function is expressible with the series. Furthermore, if we do have a Fourier series, where does it converge (where and if at all)? Does it converge absolutely? Uniformly? Also note that the series has two limits. When talking about Fourier series convergence, we often talk about the following limit:
limNn=NNcneinx.
There are other ways we can sum the series to get convergence in more situations, but we refrain from discussing those. In light of this, define the symmetric partial sums
sN(f;x):=n=NNcneinx.
Conversely, for an integrable function f:[π,π]C, call the numbers
cn:=12πππf(x)einxdx
its Fourier coefficients. To emphasize the function the coefficients belong to, we write f^(n).
 3 
The notation should seem similar to Fourier transform to those readers that have seen it. The similarity is not just coincidental, we are taking a type of Fourier transform here.
We then formally write down a Fourier series:
f(x)n=cneinx.
As you might imagine such a series might not even converge. The doesn’t imply anything about the two sides being equal in any way. It is simply that we created a formal series using the formula for the coefficients. We will see that when the functions are “nice enough,” we do get convergence.

Example 11.8.3.

Consider the step function h(x) so that h(x):=1 on [0,π] and h(x):=1 on (π,0), extended periodically to a 2π-periodic function. With a little bit of calculus, we compute the coefficients:
h^(0)=12πππh(x)dx=0,h^(n)=12πππh(x)einxdx=i((1)n1)πnfor n1.
A little bit of simplification leads to
sN(h;x)=n=NNh^(n)einx=n=1N2(1(1)n)πnsin(nx).
See the left hand graph in Figure 11.11 for a graph of h and several symmetric partial sums.
For a second example, consider the function g(x):=|x| on [π,π] and then extended to a 2π-periodic function. Computing the coefficients, we find
g^(0)=12πππg(x)dx=π2,g^(n)=12πππg(x)einxdx=(1)n1πn2for n1.
A little simplification yields
sN(g;x)=n=NNg^(n)einx=π2+n=1N2((1)n1)πn2cos(nx).
See the right hand graph in Figure 11.11.

Figure 11.11. The functions h and g in bold, with several symmetric partial sums in gray.

Note that for both f and g, the even coefficients (except g^(0)) happen to vanish, but that is not really important. What is important is convergence. First, at the discontinuity at x=0, we find sN(h;0)=0 for all N, so sN(h;0) converges to a different number from h(0) (at a nice enough jump discontinuity, the limit is the average of the two-sided limits, see the exercises). That should not be surprising; the coefficients are computed by an integral, and integration does not notice if the value of a function changes at a single point. We should remark, however, that we are not guaranteed that in general the Fourier series converges to the function even at a point where the function is continuous. We will prove convergence if the function is at least Lipschitz.
What is really important is how fast the coefficients go to zero. For the discontinuous h, the coefficients h^(n) go to zero approximately like 1/n. On the other hand, for the continuous g, the coefficients g^(n) go to zero approximately like 1/n2. The Fourier coefficients “see” the discontinuity in some sense.
Do note that continuity in this setting is the continuity of the periodic extension, that is, we include the endpoints ±π. So the function f(x)=x defined on (π,π] and extended periodically would be discontinuous at the endpoints ±π.
In general, the relationship between regularity of the function and the rate of decay of the coefficients is somewhat more complicated than the example above might make it seem, but there are some quick conclusions we can make. We forget about finding a series for a function for a moment, and we consider simply the limit of some given series. A few sections ago, we proved that the Fourier series
n=1sin(nx)n2
converges uniformly and hence converges to a continuous function. This example and its proof can be extended to a more general criterion.
The proof is to apply the Weierstrass M-test (Theorem 11.2.4) and the p-series test to find that the series converges uniformly and hence to a continuous function (Corollary 11.2.8). We can also take derivatives.
The proof is to note that the series converges to a continuous function by the previous proposition. In particular, it converges at some point. Then differentiate the partial sums
n=NNincneinx
and notice that for all nonzero n
|incn|C|n|α1.
The differentiated series converges uniformly by the M-test again. Since the differentiated series converges uniformly, we find that the original series n=cneinx converges to a continuously differentiable function, whose derivative is the differentiated series (see Theorem 11.2.14).
We can iterate this reasoning. Suppose there is some C and α>k+1 (kN) such that for all nonzero integers n,
|cn|C|n|α.
Then the Fourier series converges to a k-times continuously differentiable function. Therefore, the faster the coefficients go to zero, the more regular the limit is.

Subsection 11.8.3 Orthonormal systems

Let us abstract away the exponentials, and study a more general series for a function. One fundamental property of the exponentials that makes Fourier series work is that the exponentials are a so-called orthonormal system. Fix an interval [a,b]. We define an inner product for the space of functions. We restrict our attention to Riemann integrable functions as we do not have the Lebesgue integral, which would be the natural choice. Let f and g be complex-valued Riemann integrable functions on [a,b] and define the inner product
f,g:=abf(x)g(x)dx.
If you have seen Hermitian inner products in linear algebra, this is precisely such a product. We must include the conjugate as we are working with complex numbers. We then have the “size” of f, that is, the L2 norm f2, by (defining the square)
f22:=f,f=ab|f(x)|2dx.

Remark 11.8.6.

Note the similarity to finite dimensions. For z=(z1,z2,,zd)Cd, one defines
z,w:=n=1dznwn.
Then the norm is (usually denoted simply by z in Cd rather than by z2)
z2=z,z=n=1d|zn|2.
This is just the euclidean distance to the origin in Cd (same as R2d).
In what follows, we will assume all functions are Riemann integrable.

Definition 11.8.7.

Let {φn}n=1 be a sequence of integrable complex-valued functions on [a,b]. We say that this is an orthonormal system if
φn,φm=abφn(x)φm(x)dx={1if n=m,0otherwise.
In particular, φn2=1 for all n. If we only require that φn,φm=0 for mn, then the system would be called an orthogonal system.
We noticed above that
{12πeinx}n=1
is an orthonormal system on [π,π]. The factor out in front is to make the norm be 1.
Having an orthonormal system {φn}n=1 on [a,b] and an integrable function f on [a,b], we can write a Fourier series relative to {φn}n=1. Let
cn:=f,φn=abf(x)φn(x)dx,
and write
f(x)n=1cnφn.
In other words, the series is
n=1f,φnφn(x).
Notice the similarity to the expression for the orthogonal projection of a vector onto a subspace from linear algebra. We are in fact doing just that, but in a space of functions.
In other words, the partial sums of the Fourier series are the best approximation with respect to the L2 norm.

Proof.

Let us write
ab|fpk|2=ab|f|2abfpkabfpk+ab|pk|2.
Now
abfpk=abfn=1kdnφn=n=1kdnabfφn=n=1kdncn,
and
ab|pk|2=abn=1kdnφnm=1kdmφm=n=1km=1kdndmabφnφm=n=1k|dn|2.
ab|fpk|2=ab|f|2n=1kdncnn=1kdncn+n=1k|dn|2=ab|f|2n=1k|cn|2+n=1k|dncn|2.
This is minimized precisely when dn=cn.
When we do plug in dn=cn, then
ab|fsk|2=ab|f|2n=1k|cn|2,
and so for all k,
n=1k|cn|2ab|f|2.
Note that
n=1k|cn|2=sk22
by the calculation above. We take a limit to obtain the so-called Bessel’s inequality.
In particular, ab|f|2< implies the series converges and hence
limkck=0.

Subsection 11.8.4 The Dirichlet kernel and approximate delta functions

We return to the trigonometric Fourier series. The system {einx}n=1 is orthogonal, but not orthonormal if we simply integrate over [π,π]. We can rescale the integral and hence the inner product to make {einx}n=1 orthonormal. That is, if we replace
abwith12πππ,
(we are just rescaling the dx really)
 5 
Mathematicians in this field sometimes simplify matters with a tongue-in-cheek definition that 1=2π.
, then everything works and we obtain that the system {einx}n=1 is orthonormal with respect to the inner product
f,g=12πππf(x)g(x)dx.
Suppose f:RC is 2π-periodic and integrable on [π,π]. Write
f(x)n=cneinx,wherecn:=12πππf(x)einxdx.
Recall the notation for the symmetric partial sums, sN(f;x):=n=NNcneinx. The inequality leading up to Bessel now reads:
12πππ|sN(f;x)|2dx=n=NN|cn|212πππ|f(x)|2dx.
Let the Dirichlet kernel be
DN(x):=n=NNeinx.
We claim that
DN(x)=sin((N+1/2)x)sin(x/2),
for x such that sin(x/2)0. The left-hand side is continuous on R, and hence the right-hand side extends continuously to all of R. To show the claim, we use a familiar trick:
(eix1)DN(x)=ei(N+1)xeiNx.
Multiply by eix/2
(eix/2eix/2)DN(x)=ei(N+1/2)xei(N+1/2)x.
The claim follows.
Expand the definition of sN
sN(f;x)=n=NN12πππf(t)eintdt einx=12πππf(t)n=NNein(xt)dt=12πππf(t)DN(xt)dt.
Convolution strikes again! As DN and f are 2π-periodic, we may also change variables and write
sN(f;x)=12πxπx+πf(xt)DN(t)dt=12πππf(xt)DN(t)dt.
See Figure 11.12 for a plot of DN for N=5 and N=20.

Figure 11.12. Plot of DN(x) for N=5 (gray) and N=20 (black).

The central peak gets taller and taller as N gets larger, and the side peaks stay small. We are convolving (again) with approximate delta functions, although these functions have all these oscillations away from zero. The oscillations on the side do not go away but they are eventually so fast that we expect the integral to just sort of cancel itself out there. Overall, we expect that sN(f) goes to f. Things are not always simple, but under some conditions on f, such a conclusion holds. For this reason people write
2πδ(x)n=einx,
where δ is the “delta function” (not really a function), which is an object that will give something like “ππf(xt)δ(t)dt=f(x).” We can think of DN(x) converging in some sense to 2πδ(x). However, we have not defined (and will not define) what the delta function is, nor what does it mean for it to be a limit of DN or have a Fourier series.

Subsection 11.8.5 Localization

If f satisfies a Lipschitz condition at a point, then the Fourier series converges at that point.
In particular, if f is continuously differentiable at x, then we obtain convergence at x (exercise). A function f:[a,b]C is continuous piecewise smooth if it is continuous and there exist points x0=a<x1<x2<<xk=b such that for every j, f restricted to [xj,xj+1] is continuously differentiable (up to the endpoints).
The proof of the corollary is left as an exercise. Let us prove the theorem.

Proof.

(Proof of Theorem 11.8.10) For all N,
12πππDN=1.
Write
sN(f;x)f(x)=12πππf(xt)DN(t)dtf(x)12πππDN(t)dt=12πππ(f(xt)f(x))DN(t)dt=12πππf(xt)f(x)sin(t/2)sin((N+1/2)t)dt.
By the hypotheses, for small nonzero t,
|f(xt)f(x)sin(t/2)|M|t||sin(t/2)|.
As sin(θ)=θ+h(θ) where h(θ)θ0 as θ0, we notice that M|t||sin(t/2)| is continuous at the origin. Hence, f(xt)f(x)sin(t/2), as a function of t, is bounded near the origin. As t=0 is the only place on [π,π] where the denominator vanishes, it is the only place where there could be a problem. So, the function is bounded near t=0 and clearly Riemann integrable on any interval not including 0, and thus it is Riemann integrable on [π,π]. We use the trigonometric identity
sin((N+1/2)t)=cos(t/2)sin(Nt)+sin(t/2)cos(Nt),
to compute
12πππf(xt)f(x)sin(t/2)sin((N+1/2)t)dt=12πππ(f(xt)f(x)sin(t/2)cos(t/2))sin(Nt)dt+12πππ(f(xt)f(x))cos(Nt)dt.
As functions of t, f(xt)f(x)sin(t/2)cos(t/2) and (f(xt)f(x)) are bounded Riemann integrable functions and so their Fourier coefficients go to zero by Theorem 11.8.9. So the two integrals on the right-hand side, which compute the Fourier coefficients for the real version of the Fourier series go to 0 as N goes to infinity. This is because sin(Nt) and cos(Nt) are also orthonormal systems with respect to the same inner product. Hence sN(f;x)f(x) goes to 0, that is, sN(f;x) goes to f(x).
The theorem also says that convergence depends only on local behavior. That is, to understand convergence of sN(f;x) we only need to know f in some neighborhood of x.
The first claim follows by taking M=0 in the theorem. The “In particular” follows by considering fg, which is zero on J and sN(fg)=sN(f)sN(g). So convergence at x depends only on the values of the function near x. However, we saw that the rate of convergence, that is, how fast does sN(f) converge to f, depends on global behavior of f.
Note a subtle difference between the results above and what Stone–Weierstrass theorem gives. Any continuous function on [π,π] can be uniformly approximated by trigonometric polynomials, but these trigonometric polynomials may not be the partial sums sN.

Subsection 11.8.6 Parseval’s theorem

Finally, convergence always happens in the L2 sense and operations on the (infinite) vectors of Fourier coefficients are the same as the operations using the integral inner product.

Proof.

There exists (exercise) a continuous 2π-periodic function h such that
fh2<ϵ.
Via Stone–Weierstrass, approximate h with a trigonometric polynomial uniformly. That is, there is a trigonometric polynomial P(x) such that |h(x)P(x)|<ϵ for all x. Hence
hP2=12πππ|h(x)P(x)|2dxϵ.
If P is of degree N0, then for all NN0 ,
hsN(h)2hP2ϵ,
as sN(h) is the best approximation for h in L2 (Theorem 11.8.8). By the inequality leading up to Bessel,
sN(h)sN(f)2=sN(hf)2hf2ϵ.
The L2 norm satisfies the triangle inequality (exercise). Thus, for all NN0,
fsN(f)2fh2+hsN(h)2+sN(h)sN(f)23ϵ.
Hence, the first claim follows.
Next,
sN(f),g=12πππsN(f;x)g(x)dx=n=NNcn12πππeinxg(x)dx=n=NNcndn.
We need the Schwarz (or Cauchy–Schwarz or Cauchy–Bunyakovsky–Schwarz) inequality for L2, that is,
|abfg¯|2(ab|f|2)(ab|g|2).
Its proof is left as an exercise; it is not much different from the finite-dimensional version. So
|ππfg¯ππsN(f)g¯|=|ππ(fsN(f))g¯|(ππ|fsN(f)|2)1/2(ππ|g|2)1/2.
The right-hand side goes to 0 as N goes to infinity by the first claim of the theorem. That is, as N goes to infinity, sN(f),g goes to f,g, and the second claim is proved. The last claim in the theorem follows by using g=f.

Exercises 11.8.7 Exercises

11.8.1.

Consider the Fourier series
k=112ksin(2kx).
Show that the series converges uniformly and absolutely to a continuous function. Remark: This is another example of a nowhere differentiable function (you do not have to prove that)
 7 
See G. H. Hardy, Weierstrass’s Non-Differentiable Function, Transactions of the American Mathematical Society, 17, No. 3 (Jul., 1916), pp. 301–325. A thing to notice here is the nth Fourier coefficient is 1/n if n=2k and zero otherwise, so the coefficients go to zero like 1/n.
. See Figure 11.13.

Figure 11.13. Plot of n=112nsin(2nx).

11.8.2.

Suppose that a 2π-periodic function that is Riemann integrable on [π,π], and such that f is continuously differentiable on some open interval (a,b). Prove that for every x(a,b), we have limNsN(f;x)=f(x).

11.8.3.

Prove Corollary 11.8.11, that is, suppose a 2π-periodic function is continuous piecewise smooth near a point x, then limNsN(f;x)=f(x). Hint: See the previous exercise.

11.8.4.

Given a 2π-periodic function f:RC, Riemann integrable on [π,π], and ϵ>0, show that there exists a continuous 2π-periodic function g:RC such that fg2<ϵ.

11.8.5.

Prove the Cauchy–Bunyakovsky–Schwarz inequality for Riemann integrable functions:
|abfg¯|2(ab|f|2)(ab|g|2).

11.8.6.

Prove the L2 triangle inequality for Riemann integrable functions on [π,π]:
f+g2f2+g2.

11.8.7.

Suppose for some C and α>1, we have a real sequence {an}n=1 with |an|Cnα for all n. Let
g(x):=n=1ansin(nx).
  1. Show that g is continuous.
  2. Formally (that is, suppose you can differentiate under the sum) find a solution (formal solution, that is, do not yet worry about convergence) to the differential equation
    y+2y=g(x)
    of the form
    y(x)=n=1bnsin(nx).
  3. Then show that this solution y is twice continuously differentiable, and in fact solves the equation.

11.8.8.

Let f be a 2π-periodic function such that f(x)=x for 0<x<2π. Use Parseval’s theorem to find
n=11n2=π26.

11.8.9.

Suppose that cn=0 for all n<0 and n=0|cn| converges. Let D:=B(0,1)C be the unit disc, and D=C(0,1) be the closed unit disc. Show that there exists a continuous function f:DC that is analytic on D and such that on the boundary of D we have f(eiθ)=n=0cneinθ.
Hint: If z=reiθ, then zn=rneinθ.

11.8.10.

Show that
n=1e1/nsin(nx)
converges to an infinitely differentiable function.

11.8.11.

Let f be a 2π-periodic function such that f(x)=f(0)+0xg for a function g that is Riemann integrable on every interval. Suppose
f(x)n=cneinx.
Show that there exists a C>0 such that |cn|C|n| for all nonzero n.

11.8.12.

  1. Let φ be the 2π-periodic function defined by φ(x):=0 if x(π,0), and φ(x):=1 if x(0,π), letting φ(0) and φ(π) be arbitrary. Show that limNsN(φ;0)=1/2.
  2. Let f be a 2π-periodic function Riemann integrable on [π,π], xR, δ>0, and there are continuously differentiable g:[xδ,x]C and h:[x,x+δ]C where f(t)=g(t) for all t[xδ,x) and where f(t)=h(t) for all t(x,x+δ]. Then limNsN(f;x)=g(x)+h(x)2, or in other words,
    limNsN(f;x)=12(limtxf(t)+limtx+f(t)).

11.8.13.

Let {an}n=1 be such that limnan=0. Show that there is a continuous 2π-periodic function f whose Fourier coefficients cn satisfy that for each N there is a kN where |ck|ak.
Remark: The exercise says that if f is only continuous, there is no “minimum rate of decay” of the coefficients. Compare with Exercise 11.8.11.
Hint: Look at Exercise 11.8.1 for inspiration.
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf