0% found this document useful (0 votes)
38 views

Week 3 Lecture Notes

The document summarizes key aspects of Fourier series: 1) Fourier series represents periodic functions as the sum of sinusoidal waves, providing a decomposition into an orthogonal basis. 2) The basis functions are {1, cos(nx), sin(nx)} which are orthogonal over the interval [-π,π]. 3) Any periodic and piecewise continuous function can be approximated by partial sums of its Fourier series, with the approximation improving as more terms are included.

Uploaded by

Lilach N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Week 3 Lecture Notes

The document summarizes key aspects of Fourier series: 1) Fourier series represents periodic functions as the sum of sinusoidal waves, providing a decomposition into an orthogonal basis. 2) The basis functions are {1, cos(nx), sin(nx)} which are orthogonal over the interval [-π,π]. 3) Any periodic and piecewise continuous function can be approximated by partial sums of its Fourier series, with the approximation improving as more terms are included.

Uploaded by

Lilach N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Class 3: Fourier Series

In this chapter we will learn about the Fourier decomposition of periodic functions.
You will see that this decomposition is nothing but an expansion in an orthogonal
basis in function space. We will use our notions of projection, expansion, orthog-
onality etc. and apply them to spectral decomposition, also known as the Fourier
Series.
Consider V the space of continuous functions on the interval [−π, π], with the
integral inner product. In this space, we look at the set

{1, cos x, sin x}.

It is straightforward to show that this is an orthogonal set:


Z π Z π
1 · cos xdx = 0 1 · sin xdx = 0
−π −π

due to the nature of the trigonometric functions: over a period of size 2π the
positive part of the function is exactly compensated by the negative part. Using
trigonometric identities, we can see that the last pair also has an inner product of
zero
Z π Z π
1
sin x · cos xdx = sin(2x)dx = 0.
−π 2 −π

It is not orthonormal, since the norms of these functions is different from one:
Z π Z π
2
sin xdx = cos2 xdx = π.
−π −π

We now extend this group to include all multiples of the basic frequency.

{1, cos(nx), sin(nx)}∞


n=1 = (1)
{1, cos x, sin x, cos(2x), sin(2x), ... cos(nx), sin(nx)...}

This is an infinite group. Any two functions in it are orthogonal, as can be proven
using trigonometric identities. For example to compute the inner product between
two cosines,
Z π
hcos(nx)| cos(mx)i = cos(nx) cos(mx)dx
−π

1
we use the identity cos α cos β = 12 [cos(α + β) + cos(α − β)]. This gives us

Z π 0, n 6= m
1
hcos(nx)| cos(mx)i = [cos((n + m)x) + cos((n − m)x)] = .
2 −π π, n = m

A similar result is found also for the other combinations, and we can summarize
them as follows:

hsin(nx)| sin(mx)i = hcos(nx)| cos(mx)i = πδnm


hsin(nx)| cos(mx)i = 0.

The constant function |1i is also orthogonal to all other functions, but has a norm
or 2π (rather than π).

Fourier Theorem (v1): The set {1, cos(nx), sin(nx)}∞


n=1 spans the entire space of
continuous functions on [−π, π]. It is an orthogonal basis of the space, and any
function f (x) can be expanded in a linear combination:

a0 X
f (x) = + [an cos(nx) + bn sin(nx)] (2)
2 n=1

Z π Z π Z π
1 1 1
an = f (x) cos(nx)dx bn = f (x) sin(nx)dx a0 = f (x)dx
π −π π −π π −π

Note that the formula for an is just the projection of f on cos,


hcos(nx)|f i
an =
hcos(nx)| cos(nx)i
and similarly for the sin basis element. For the constant a0 , we should have an
element in the expansion that looks like this:

h1|f i f (x)dx 1 1 π
Z  a
−π 0
|1i = = f (x)dx =
h1|1i 2π 2 π −π 2
with a0 defined in the box above. This is just a convention to keep the definitions
of all coefficients uniform, and overcome the fact that |1i has a different norm from
all other basis functions.

Example 1: expand the function f (x) = x2 , x ∈ [−π, π] in a Fourier series.

2
3
Parseval’s equation

For a function f (x), x ∈ [−ππ], with a Fourier series expansion Eq. (4), Parsevals’
equation states that
π ∞
a20 X  2
Z
1
[f (x)]2 dx = an + b2n .

+ (3)
π −π 2 n=1

We show that this is a special case of a more general equation.


Suppose |un i∞
n=1 is an orthogonal basis of a linear space V . Then any vector |vi
in that space can be expanded as
X
|vi = λn |un i,
n

where λn = hv|uni
kun k2
is the magnitude of the projection. Now taking the inner prod-
uct with hv|,
X X X
hv|vi = λn hv|un i = λn (λn kun k2 ) = λ2n kun k2 .
n n n

This is the “generalized Parseval equation” in any linear space. It relates the
norm squared of a vector to the sum of squares of its expansion coefficients in an
orthogonal basis - any orthogonal basis.
In our space of functions on [−π, π] where the inner product is an integral,
Z π X
[f (x)]2 dx = λ2n kun k2
−π n

a0
and specifically for the Fourier basis, we have λ0 = 2
while the projection mag-
nitudes on cos(nx) are an and on the sine basis elemensts sin(nx) they are bn (n =
1, 2, 3...). Therefore

Z π  a 2 ∞
0
X
[f (x)]2 dx = k1k2 + a2n k cos(nx)k2 + b2n k sin(nx)k2 .
 
−π 2 n=1

We computed the norms of the Fourier basis elements: k1k2 = 2π, k cos(nx)k2 =
k sin(nx)k2 = π, so we have
Z π  a 2 ∞
0
2
X  2
an π + b2n π .

[f (x)] dx = 2π +
−π 2 n=1

Dividing this equation by π gives Parseval’s equation.

4
Convergence

The Fourier expansion is a linear expansion in a basis, similar to others we have


seen. However, it is an infinite expansion. What does this infinite sum mean ex-
actly?

• Any finite (partial) sum of the Fourier series can be considered as an approxi-
mation to the function:
N
a0 X
f (x) ≈ fN (x) = + [an cos(nx) + bn sin(nx)].
2 n=1

This is the best approximation that can be made to the function f using the
first N basis elements.

• The infinite sum conerges to f (x) in the sense that the limit of partial sums, as
N → ∞, becomes a better approximation to f (x).

• This means that, as an infinite series, at any x ∈ [−π, π], the Fourier series is a
convergent series. For an infinite series to converge, in particular the elements
need to become smaller and smaller. In our case we have

lim an = 0, lim bn = 0.
n→∞ n→∞

• For continuous functions, the infinite series converges to the function f (x)
everywhere in the interval.

Because our basis elements are periodic functions, we might as well extend the
function periodically over the entire real line. In that case, the Fourier series will
also describe the periodic function throughout the real line. However, extend-
ing a function perodically might entail discontinuities. For example, the function
f (x) = x can be extended periodically but at the edges of the interval it becomes
discontinuous. It turns out that Fourier expansions also work for this case, but we
need to extend the space to include also functions with (at most) a finite number
of discontinuities.

Consider the space of real functions f (x), x ∈ [−ππ], that are continuous on this
except possibly at a finite number of points {xk }; in these points the functions need
not be defined, but its limits from the two sides must exist and be finite limits:

f (x−
k) = lim f (x) , f (x+
k) = lim f (x).
x→xk ,x<xk x→xk ,x>xk

5
The inner product is defined as an integral over [[a, b]. An example of such a func-
tion is given by:



 x −π < x < 0

f (x) = 0 0 ≤ x < π/2



1 π/2 < x < π.

Can you draw this function? how many discontinuities does it have? It belongs to
the space defined above. It is a closed space under addition, since the sum of two
functions has the union of their discontinuities which is a finite number. We note
also that at the discontinuities, the functions need not be defined, and this does not
affect their inner product with another function or their own norm. This is because
an integral is never affected by a finite number of isolated points.
A counter example is the function f (x) = 1/x in the interval [0, 1] since this
function does not have a finite limit at x = 0. In our space all functions are ”square-
Rb
integrable”, meaning that their norm hf |f i = a f 2 (x)dx is finite.

Fourier Theorem (v2): If f (x) is a single-valued function on the real line, except
possibly in a finite number of points; and is piece-wise continuous function, peri-
odic with period 2π, then the Fourier expansion Eq. (4) converges to f (x) at points
f (x− +
k )+f (xk )
of continuity, and converges to 2
at points of discontinuity.

Example 2: (A) expand the ”sign” function in a Fourier series:



−1 −π < x < 0
f (x) = sgn(x) =
1 0 < x < π.

(B) now expand this function:





 −1 −π < x < 0

f (x) = sgn(x) = 17 x = 0



1 0 < x < π.

6
7
Rate of convergence and the meaning of Fourier expansion

In an infinite Fourier series that converges to a finite number f (x) at each poinI x,
the coefficients an , bn decrease to zero as n → ∞. In general, series with faster-
decreasing elements are also faster-converging (can you explain why?). How fast
they decrease depends on the specific function, and for each function on the spe-
cific x. We have seen in the two examples above, two different behaviors:

2 π3 X (−1)n
x = +4 2
cos(nx)
3 n=1
n
X 4
sgn(x) = sin(nx)
πn
n odd

which one of them converges faster? The coefficients of x2 decrease as 1/n2 whereas
those of sgn(x) decrease as 1/n, a slower rate of convergence. This is not a coin-
cidence and reflects the smoothness of the functions, as periodic functions on R:
x2 is continuous, with only a ”cusp” (discontinuous first derivative) appearing at
the edge of the interval when we extended it from [−π] to R. On the other hand,
the sgn function has in it a discontinuity of the function itself. In general, discon-
tinuous functions have Fourier coefficients that decrease as 1/n, while continuous
functions with discontinuous first derivatives have 1/n2 . If the discontinuity ap-
pears in the second derivative, the decrease will be 1/n3 etc.
The discontinuiuty is the weakest point in the smoothness of the function, and
this point dictates the order of decrease of the series elements. However, conver-
gence still varies across the interval, and is usually worst near the problematic
point, with some discontinuity.
These observations suggest the following intuitive interpretation of the Fourier
Series: higher Fourier coefficients represent higher frequency functions; they are
responsible for describing finer, rapidly-varying aspects of the function we are ex-
panding. In other words, smoother functions can do with less frequencies, whereas
rapidly varying ones (in particular discontinuities), require more high frequencies
to approximate them.

8
Scaling: general periodic functions

Suppose we have a periodic function with a period 2L instead of 2π. For example,
define a function on the interval [−L, L] and extend it periodically to the entire real
line. A Fourier series for this type of function would involve basis functions that
are periodic over this interval. We may scale the trigonometric functions so that
they have this property: dividing their argument by a scale factor of 2π/2L, will
make sure they have the required periodicity:
! ! !
nx 2πn πn
cos = cos x = cos x .
2π/2L 2L L

This scaling transfers the point −π to −L and π to L. You may check that adding 2L
to the argument of this function, leaves it unchanged; this means it has periodicity
of 2L.
The generalized Fourier series is then,

a0 X h  πn   πn i
f (x) = + an cos x + bn sin x (4)
2 n=1
L L

L
1 L 1 L
Z Z Z
1  πn   πn 
an = f (x) cos x dx an = f (x) sin x dx a0 = f (x)dx .
L −L L L −L L L −L

Summation of infinite series

Fourier series expansions may be applied to the calculation of infinite sums of


numbers. We will show two ways of carrying out this application:

• Computing the function and the Fourier series at a particular point x,

• Using Parseval’s equation.



X 1 π2
Examples : S= =
n=1
n2 6

X (−1)n −π 2
S= =
n=1
n2 12

X 1 −π 2
S= =
n=1
n4 90

9
10
11
Complex Fourier Series

A different representation of the Fourier series can be made in terms of complex


exponentials instead of real trigonometric functions. Using the relations

eiϕ + e−iϕ eiϕ − e−iϕ


cos ϕ = , sin ϕ = ,
2 2i
we may write the Fourier series for a periodic function with period 2π as
∞ ∞ 
einx + e−inx einx − e−inx

a0 X a0 X
f (x) = + (an cos nx + bn sin nx) = + an + bn
2 n=1 2 n=1 2 2i

finally bringing it to the complex form


∞ Z π
X 1
f (x) = inx
cn e cn = f (x)e−inx dx
n=−∞
2π −π

. For a real function f (x), the coefficients of the series must obey c−n = c∗n . More
generally, this series can be used to expand also for complex functions. In this case,
the coefficients are not constrained in this way.

Example: For the sign function we expanded in a real Fourier series, we compute
for the coefficients of the complex representation
Z 0 Z π 
1 −inx −inx 1 1
cn = (−1)e dx + e dx = [1 − cos nπ] = [1 − (−1)n ]
2π −π 0 iπn iπn
Therefore we find the complex series

2 X 1
f (x) = sgn x = ei(2k−1)x
iπ k=−∞ 2k − 1

12

You might also like