Chapter 3: Fourier Series
Markos Fisseha
Addis Ababa University
Ethiopia
December 4, 2024
1 / 21
Chapter 3: Fourier Series
Outline
In this chapter, we will study the following topics:
3.1 Periodic Functions
3.2 Trigonometric series
3.3 Fourier series representation; Dirichlet’s Theorem
3.4 Fourier series of even and odd functions
3.5 Half-range expansion
2 / 21
Fourier series
Fourier series are infinite series that represent periodic function in
terms of cos and sin functions.
Definition (Periodic function)
A function f (x) is said to be periodic if there is a positive number
p such that
f (x + p) = f (x), for every value of x.
The smallest such value of p is the period of f .
Note:
If f (x) has period p, it also has the period np, ∀n ∈ N.
Example
cos, sin, tan and cot are examples of periodic function.
3 / 21
Fact 1:
If f and g are both periodic functions with the same period p,
then (af + bg )(x) with any constants a and b also periodic
function with period p:
(af + bg )(x + p) = af (x + p) + bg (x + p)
= af (x) + bg (x),
since f and g are periodic function. Hence, the function af + bg is
periodic function with period p.
Fact 2:
If sin(ωx) and cos(ωx) are both periodic functions with the same
period p = 2πω .
4 / 21
Proof.
Let f (x) = sin(ωx) and g (x) = cos(ωx). Then,
2π 2π
f (x + p) = f (x + ) = sin(ω(x + )) = sin(ωx + 2π)
ω ω
= sin(ωx) = f (x)
and
2π 2π
g (x + p) = g (x + ) = cos(ω(x + )) = cos(ωx + 2π)
ω ω
= cos(ωx) = g (x).
Therefore, both functions cos x and sin x are periodic with period
2π.
5 / 21
Even and Odd functions
Definition
A function f is said to be even if
f (−x) = f (x), for all x.
Example
The functions f (x) = x 2 and g (x) = cos(x) are even.
Definition
A function f is said to be odd if
f (−x) = −f (x), for all x.
Example
The functions f (x) = x 3 and g (x) = sin(x) are odd.
6 / 21
Note:
Sum and product of even functions are even and sum of odd
functions becomes odd, but product of two odd functions becomes
even.
Fact 3:
Let f be a function. Then,
1 If f (x) is even function, then
Z L Z L
f (x)dx = 2 f (x)dx.
−L 0
2 If f (x) is odd function, then
Z L
f (x)dx = 0.
−L
7 / 21
Orthogonal Functions
Definition
1. Two non-zero functions, f (x) and g (x), are said to be
orthogonal on a ≤ x ≤ b if
Z b
f (x)g (x) dx = 0.
a
2. A set of non-zero functions, {fi (x)} is said to be mutually
orthogonal on a ≤ x ≤ b (or just an orthogonal set) if fi (x)
and fj (x) are orthogonal for every i 6= j. In other words,
Z b (
0 : if i 6= j
fi (x)fj (x) dx = .
a c > 0 : if i = j
8 / 21
Before we work some examples these are a nice set of trigonometric
formulas that we will need to help us with some of the integrals:
1
sin α cos β = sin(α − β) + sin(α + β)
2
1
sin α sin β = cos(α − β) − cos(α + β)
2
1
cos α cos β = cos(α − β) + cos(α + β)
2
Example
n nπx o
Show that cos is mutually orthogonal on −L ≤ x ≤ L.
L
9 / 21
Fourier series of functions with period 2π
Definition
If the function f has a period 2π, then its Fourier series is given by
∞ ∞
a0 X X
+ an cos(nx) + bn sin(nx),
2
n=1 n=1
with the Fourier coefficients a0 , an and bn defined by the Euler
formulas,
1 π
Z
a0 = f (x)dx
π −π
1 π
Z
an = f (x) cos(nx)dx, n = 1, 2, ...
π −π
1 π
Z
bn = f (x) sin(nx)dx, n = 1, 2, ...
π −π
10 / 21
Example
Find the Fourier series of the function
f (x) = x, −π ≤ x ≤ π,
such that f (x) = f (x + 2π).
Solution:
Since f (x) = x is odd function, then by Fact 3, we have an = 0
for all n ≥ 0. We turn our attention to the coefficients bn , ∀n ≥ 1.
Since sin(nx) is odd function, then f (x) sin(nx) is even function,
which implies that
1 π 1 π
Z Z
bn = f (x) sin(nx)dx = x sin(nx)dx
π −π π −π
2 π x cos(nx) π
Z Z π
2 cos(nx)
= x sin(nx)dx = − +
π 0 π n 0 0 n
π
2 π 1
= − cos(nπ) + 2 sin(nx)
π n n 0 11 / 21
2 2
bn = − cos(nπ) = (−1)n+1 , ∀n ≥ 1.
n n
Hence,
sin 2x sin 3x
2 sin x − + − ...
2 3
is the Fourier series of the function f .
12 / 21
Fourier series of functions with arbitrary period
Definition
If the function f has a period p = 2L, then its Fourier series is
given by
∞ ∞
a0 X nπ X nπ
+ an cos x + bn sin x ,
2 L L
n=1 n=1
with the Fourier coefficients a0 , an and bn defined by the Euler
formulas,
1 L
Z
a0 = f (x)dx
L −L
1 L
Z nπ
an = f (x) cos x dx, n = 1, 2, ...
L −L L
1 L
Z nπ
bn = f (x) sin x dx, n = 1, 2, ...
π −L L
13 / 21
Example (Periodic Rectangular Wave)
Find the Fourier series of the function
0 : −2 < x < −1
f (x) = k : −1 ≤ x < 1 , p = 2L = 4.
0: 1<x <2
Solution:
First, we need to calculate the Fourier coefficients
1 L 1 2 1 1
Z Z Z
a0 = f (x)dx = f (x)dx = kdx = k (1)
L −L 2 −2 2 −1
1 L 1 2
Z nπ Z nπ
an = f (x) cos x dx = f (x) cos x dx
L −L L 2 −2 2
1 1
Z nπ k 2 nπ 1
= k cos x dx = · sin x
2 −1 2 2 nπ 2 −1
2k nπ
= sin , n = 1, 2, ..., (2)
nπ 2 14 / 21
but,
0 : n is even
nπ
sin = 1 : n = 1, 5, 9, ... .
2
−1 : n = 3, 7, 11, ...
Then,
0 : n is even
2k
an = nπ : n = 1, 5, 9, ... ,
− 2k : n = 3, 7, 11, ...
nπ
15 / 21
and
L
1 2
Z Z
1 nπ nπ
bn = = f (x) sin
x dx = f (x) sin x dx
L−L L 2 −2 2
1 1
Z nπ
= k sin x dx = 0, n = 1, 2, ...,
2 −1 2
since sin function is odd. Hence, the Fourier series of the function
f is
k 2k π 1 3π 1 5π
+ cos x − cos x + cos x − ··· .
2 π 2 3 2 5 2
16 / 21
Fourier series of odd and even functions
Definition
If f is an odd periodic function with period p = 2L, then the
Fourier series of f is given by
∞
X nπ
bn sin x ,
L
n=1
with the Fourier coefficients bn defined by the Euler formulas,
Z L
1 nπ
bn = f (x) sin x dx, n = 1, 2, ...
π −L L
17 / 21
Definition
If f is an even periodic function with period p = 2L, then the
Fourier series of f is given by
∞
a0 X nπ
+ an cos x ,
2 L
n=1
with the Fourier coefficients a0 and an defined by the Euler
formulas,
1 L
Z
a0 = f (x)dx
L −L
1 L
Z nπ
an = f (x) cos x dx
L −L L
2 L
Z nπ
= f (x) cos x dx, n = 1, 2, ...
L 0 L
18 / 21
Remark
Let f be periodic function with period p = 2π. Then,
1. If f is odd function, then the Fourier series is given by
∞
X
bn sin (nx) ,
n=1
with the Fourier coefficients,
2 π
Z
bn = f (x) sin (nx) dx, n = 1, 2, ...
π 0
19 / 21
2. If f is even function, then the Fourier series is given by
∞
a0 X
+ an cos (nx) ,
2
n=1
with the Fourier coefficients,
1 π 2 π
Z Z
a0 = f (x)dx = f (x)dx
π −π π 0
1 π
Z
an = f (x) cos (nx) dx
π −π
2 π
Z
= f (x) cos (nx) dx, n = 1, 2, ...
π 0
Example
Find the Fourier series of f (x) = |x| for x ∈ [−1, 1] and
f (x + 2) = f (x).
20 / 21