Lecture 4
Lecture 4
page 1/44
Outline
page 1/44
1. Fourier series for 2π-periodic functions
page 2/44
1. Fourier series for 2π-periodic functions
Orthogonality of Sine and Cosine functions:
Z π Z π
cos(nt)dt = sin(nt)dt = 0, ∀ n = 1, 2, . . .
−π −π
Z π
cos(nt) sin(mt)dt = 0, ∀ n, m = 0, 1, 2, . . .
−π
(
Z π 0 if n 6= m,
cos(nt) cos(mt)dt =
−π π if n = m ≥ 1,
(
Z π 0 if n 6= m,
sin(nt) sin(mt)dt =
−π π if n = m ≥ 1,
page 3/44
1. Fourier series for 2π-periodic functions
Trigonometric identities:
page 4/44
1. Fourier series for 2π-periodic functions
Proof of orthogonality: If n 6= m then
Z π
cos(nt) sin(mt)dt
−π
Z π
1
= sin((n + m)t) − sin((n − m)t) dt
−π 2
π
1 1 1
= − cos((n + m)t) + cos((n − m)t)
2 n+m n−m −π
1
=− cos((n + m)π) − cos(−(n + m)π)
2(n + m)
1
+ cos((n − m)π) − cos(−(n − m)π)
2(n − m)
=0
page 7/44
1. Fourier series for 2π-periodic functions
∞
a0 X
If f (t) = + an cos(nt) + bn sin(nt) ,
2
n=1
then integrating the equation yields
Z π Z π
a0
f (t)dt = dt
−π −π 2
X∞ Z π
+ an cos(nt)dt
n=1 −π
X∞ Z π
+ bn sin(nt)dt
n=1 −π
= a0 π.
This gives us a formula:
Z π
1
a0 = f (t)dt.
π −π
page 8/44
1. Fourier series for 2π-periodic functions
∞
a0 X
If f (t) = + an cos(nt) + bn sin(nt) ,
2
n=1
then integrating the equation against cos(mt) yields
Z π Z π
a0
f (t) cos(mt)dt = cos(mt)dt
−π −π 2
X∞ Z π
+ an cos(nt) cos(mt)dt
n=1 −π
X∞ Z π
+ bn sin(nt) cos(mt)dt
n=1 −π
= am π, m ≥ 0.
This gives us a formula:
Z π
1
am = f (t) cos(mt)dt.
π −π
page 9/44
1. Fourier series for 2π-periodic functions
∞
a0 X
Similarly, if f (t) = + an cos(nt) + bn sin(nt) ,
2
n=1
then integrating the equation against sin(mt) yields
Z π Z π
a0
f (t) cos(mt)dt = sin(mt)dt
−π −π 2
X∞ Z π
+ an cos(nt) sin(mt)dt
n=1 −π
X∞ Z π
+ bn sin(nt) sin(mt)dt
n=1 −π
= bm π, m ≥ 1.
This gives us a formula:
Z π
1
bm = f (t) sin(mt)dt.
π −π
page 10/44
1. Fourier series for 2π-periodic functions
To summarize, if
∞
a0 X
f (t) = + an cos(nt) + bn sin(nt)
2
n=1
then
Z π
1
a0 = f (t)dt
π −π
Z π
1
an = f (t) cos(nt)dt n ≥ 1,
π −π
Z π
1
bn = f (t) sin(nt)dt n ≥ 1.
π −π
page 11/44
1. Fourier series for 2π-periodic functions
Example
(
− 1 if t ∈ [−π, 0),
Find the Fourier series of the function f (t) =
1 if t ∈ [0, π),
Solution:
Z π Z 0 Z π
1 1 1
an = f (t) cos(nt)dt = (−1) · cos(nt)dt + 1 · cos(nt)dt = 0
π −π π −π π 0
1 π 1 0 1 π
Z Z Z
bn = f (t) sin(nt)dt = (−1) · sin(nt)dt + 1 · sin(nt)dt
π −π π −π π 0
2(1 − (−1)n )
=
nπ
Therefore,
∞ ∞
a0 X X 2(1 − (−1)n )
f (t) = + an cos(nt) + bn sin(nt) = sin(nt).
2 n=1 n=1
nπ
page 12/44
1. Fourier series for 2π-periodic functions
Example
(
1 if t ∈ [−π, 0),
Find the Fourier series of the function f (t) =
3 if t ∈ [0, π),
Since
∞
X 2(1 − (−1)n )
g(t) = sin(nt)
n=1
nπ
it follows that
∞
X 2(1 − (−1)n )
f (t) = 2 + sin(nt)
n=1
nπ
page 13/44
1. Fourier series for 2π-periodic functions
Example
Find the Fourier series of the function f (t) = |t| for t ∈ [−π, π]
Solution:
1 π 1 0 1 π
Z Z Z
a0 = f (t)dt = (−t)dt + tdt = π,
π −π π −π π 0
1 π 1 0 1 π
Z Z Z
an = |t| cos(nt)dt = (−t) · cos(nt)dt + t · cos(nt)dt
π −π π −π π 0
Z π
2(1 − (−1)n )
=− computation of t · cos(nt)dt is in next page
n2 π 0
Z π Z 0
1 π
Z
1 1
bn = f (t) sin(nt)dt = (−t) · sin(nt)dt + t · sin(nt)dt = 0
π −π π −π π 0
Therefore,
∞ ∞
π X 2(1 − (−1)n ) π X 4
|t| = − 2
cos(nt) = − cos((2n − 1)t)
2 n=1 n π 2 n=1 (2n − 1)2 π
page 14/44
1. Fourier series for 2π-periodic functions
Z π Z π
t
t cos(nt)dt = d sin(nt)
0 0 n
π Z π
t sin(nt)
= sin(nt) − dt
n 0 0 n
cos(nt) π
=0+
n2 0
cos(nπ) − cos(0)
=
n2
n
(−1) − 1
=
n2
page 15/44
1. Fourier series for 2π-periodic functions
Example
Find the Fourier series of the function f (t) = t2 for t ∈ [−π, π]
Solution:
π
2π 2
Z
1
a0 = t2 dt = ,
π −π 3
π
(−1)n 4
Z
1
an = t2 cos(nt)dt = (shown on next page)
π −π n2
Z π
1
bn = t2 sin(nt)dt = 0
π −π
Therefore,
∞ ∞
a0 X π2 X (−1)n 4
t2 = + an cos(nt) + bn sin(nt) = + cos(nt)
2 n=1
3 n=1
n2
page 16/44
1. Fourier series for 2π-periodic functions
π π π Z π
t2 t2
Z Z
sin(nt) 2
t2 cos(nt)dt = d sin(nt) = sin(nt) − dt
−π −π n n 0 −π n
Z π
2t sin(nt)
=− dt
−π n
Z π
2t
= 2
d cos(nt)
−π n
π Z π
2t cos(nt) 2 cos(nt)
= − dt
n2 −π −π n2
π π
2t cos(nt) 2 sin(nt)
= −
n2 −π n3 −π
2π cos(nπ) − (−π) cos(−nπ))
=
n2
n
4π(−1)
=
n2
page 17/44
2. Fourier series for odd and even functions
If f (t) is an odd function, i.e., f (−t) = −f (t), then
Consequently,
1 π
Z
an = f (t) cos(nt)dt = 0, n = 0, 1, 2, . . . ,
π −π
1 π 2 π
Z Z
bn = f (t) sin(nt)dt = f (t) sin(nt)dt, n = 1, 2, . . .
π −π π 0
page 18/44
2. Fourier series for odd and even functions
If f (t) is an even function, i.e., f (−t) = f (t), then
Consequently,
1 π 2 π
Z Z
an = f (t) cos(nt)dt = f (t) cos(nt)dt, n = 0, 1, 2, . . . ,
π −π π 0
1 π
Z
bn = f (t) sin(nt)dt = 0, n = 1, 2, . . .
π −π
page 19/44
2. Fourier series for 2π-periodic functions
Example
Find the Fourier series of the function f (t) = |t| for t ∈ [−π, π]
1 π 2 π
Z Z
a0 = |t|dt = tdt = π,
π −π π 0
1 π 2 π 2(1 − (−1)n )
Z Z
an = |t| cos(nt)dt = t cos(nt)dt =
π −π π 0 n2 π
1 π
Z
bn = |t| sin(nt)dt = 0
π −π
Therefore,
∞
π X 2(1 − (−1)n )
|t| = − cos(nt)
2 n=1 n2 π
page 20/44
2. Fourier series for 2π-periodic functions
page 21/44
2. Fourier series for 2π-periodic functions
page 22/44
2. Fourier series for 2π-periodic functions
Example
Express the function f (t) = 1 as sine series on [0, π].
Solution: The function f (t) = 1 does not satisfy f (0) = f (π) = 0. We need to
first modify the definition at t = 0, π and consider the modified function
(
0 for t = 0, π
fe(t) =
1 for t ∈ (0, π)
This function has odd extension to [−π, π]. Therefore, fe(t) has Fourier sine series
with
2 π e 2 π 2(1 − (−1)n )
Z Z
bn = f (t) sin(nt)dt = sin(nt)dt =
π 0 π 0 nπ
∞
X 2(1 − (−1)n )
Therefore, fe(t) = sin(nt) for t ∈ [0, π].
n=1
nπ
∞
X 2(1 − (−1)n )
1= sin(nt) for t ∈ (0, π).
n=1
nπ
page 23/44
2. Fourier series for 2π-periodic functions
Example
Express the function f (t) = t as sine series on [0, π].
Example
π
0 if t ∈ [0, ),
Express the function f (t) = 2 as sine series on [0, π].
1 if t ∈ [ π , π],
2
Solution: The function satisfies f (0) = 0 but f (π) 6= 0. We first modify
the function by redefining f (π) = 0.
Then the function has odd extension to [−π, π]. Therefore, f (t) has
Fourier sine series with
2 π 2 π 2(cos( πn n
2 ) − (−1) )
Z Z
bn = f (t) sin(nt)dt = sin(nt)dt =
π 0 π π nπ
2
π
∞
2(cos( πn ) − (−1)n ) 0 if t ∈ [0, ),
2 .
X
2
Therefore, sin(nt) =
nπ 1 if t ∈ ( π , π),
n=1
2
page 25/44
2. Fourier series for 2π-periodic functions
Example
Express the function f (t) = 1 as cosine series on [0, π].
∞
a0 X
Solution: We want to have 1 = + an cos(nt)
2
n=1
1 = 1.
page 26/44
2. Fourier series for 2π-periodic functions
Example
Express the function f (t) = t as cosine series on [0, π].
Solution:
Z π
2
a0 = tdt = π,
π 0
π
2(1 − (−1)n )
Z
2
an = t cos(nt)dt = −
π 0 n2 π
Therefore,
∞
π X 2(1 − (−1)n )
t= − cos(nt)
2 n2 π
n=1
page 27/44
2. Fourier series for 2π-periodic functions
Example
(
0 if t ∈ [0, π/2),
Express the function f (t) = as cosine series on [0, π].
1 if t ∈ [π/2, π],
Solution:
Z π Z π
2 2
a0 = f (t)dt = 1dt = 1,
π 0 π π
2
Z π Z π
2 2 2 nπ
an = f (t) cos(nt)dt = cos(nt)dt = − sin
π 0 π π
2
nπ 2
Therefore,
∞
1 X 2 nπ
f (t) = − sin cos(nt)
2 n=1 nπ 2
∞
1 X 2(−1)n
= + cos((2n − 1)t)
2 n=1 (2n − 1)π
page 28/44
2. Fourier series for 2π-periodic functions
Example
(
0 if t ∈ [0, π/2),
Express the function f (t) = as cosine series on [0, π].
t if t ∈ [π/2, π],
Solution:
Z π Z π
2 2 3π
a0 = f (t)dt = tdt = ,
π 0 π π
2
4
Z π Z π
2 2
an = f (t) cos(nt)dt = t cos(nt)dt
π 0 π π
2
nπ nπ
−nπ sin 2 + 2(−1)n − 2 cos 2
=
n2 π
Therefore,
nπ nπ
3 X −nπ sin
∞
2 + 2(−1)n − 2 cos 2
f (t) = + cos(nt)
8 n=1 n2 π
page 29/44
2. Fourier series for 2π-periodic functions
Example
(
0 if t ∈ [0, π/2),
Express the function f (t) = as cosine series on [0, π].
t−1 if t ∈ [π/2, π],
Solution: In the previous two examples, we have considered the two functions
( (
0 if t ∈ [0, π/2), 0 if t ∈ [0, π/2),
g(t) = and h(t) =
1 if t ∈ [π/2, π], t if t ∈ [π/2, π],
∞
with 1 X 2 nπ
g(t) = − sin cos(nt)
2 n=1 nπ 2
∞ −nπ sin nπ + 2(−1)n − 2 cos nπ
3 X 2 2
h(t) = + cos(nt).
8 n=1 n2 π
∞
1 X n(2 − π) sin nπ + 2(−1)n − 2 cos nπ
2 2
f (t) = h(t) − g(t) = − + cos(nt)
8 n=1 n2 π
page 30/44
3. Convergence of Fourier series
∞
a0 X
If f (t) has Fourier series + an cos(nt) + bn sin(nt) ,
2 n=1
then
f (t) if f is continuous at t,
∞
f (t− ) + f (t+ )
a0 X if f is discontinuous at t,
+ an cos(nt) + bn sin(nt) = 2
2 n=1
f (−π) + f (π)
if t = ±π,
2
where f (t− ) and f (t+ ) denote the left-side and right-side value of f at t.
page 31/44
3. Convergence of Fourier series
Example
∞
π X 4
|t| = − cos((2n − 1)t).
2 n=1 (2n − 1)2 π
f (t) = |t| is continuous at every point of t ∈ [−π, π], and f (π) = f (−π).
∞
Therefore, π X 4
|t| = − cos((2n − 1)t) ∀ t ∈ [−π, π]
2 n=1 (2n − 1)2 π
f (t) = |t| is continuous at every point of t ∈ [−π, π], and f (π) = f (−π).
Therefore, the series is convergent to t2 for all t ∈ [−π, π].
∞
π 2 X (−1)n−1 4
Substituting t = 0 into the series yields 0 = − ,
3 n=1
n2
which implies ∞
X (−1)n−1 π2
2
=
n=1
n 12
This gives us an identity:
1 1 1 1 1 π2
1− 2
+ 2 − 2 + 2 − 2 + ··· =
2 3 4 5 6 12
page 33/44
3. Convergence of Fourier series
Example
In the previous two examples, we obtained two identities:
1 1 1 1 π2
1+ + + + + · · · =
32 52 72 92 8
1 1 1 1 1 1 π2
1− 2
+ 2 − 2 + 2 − 2 + 2 − ··· =
2 3 4 5 6 7 12
Subtracting the second identity from the first identity, we obtain
1 1 1 1 π2 π2 π2
+ + + + · · · = − =
22 42 62 82 8 12 24
1 1 1 1 1 π2
=⇒ 2
+ 2 2
+ 2 2
+ 2 2
+ 2 2
+ ··· =
2 2 ×2 2 ×3 2 ×4 2 ×5 24
1 1 1 1 π2
This implies 1 + 2
+ 2 + 2 + 2 + ··· =
2 3 4 5 6
page 34/44
4. Fourier series for T -periodic functions
If a function f (t) is T -periodic, i.e. f (t + T ) = f (t), then through the change of
variable
T
t= s,
2π
T T T
the function f s becomes 2π-periodic in s, i.e., f (s + 2π) = f s
2π 2π 2π
T
Therefore, f s has Fourier series expansion in s:
2π
∞
T a0 X
f s = + an cos(ns) + bn sin(ns)
2π 2 n=1
Correspondingly,
∞
T a0 X
f (t) = f s = + an cos(ns) + bn sin(ns)
2π 2 n=1
∞ 2π
a0 X 2π
= + an cos nt + bn sin nt
2 n=1
T T
page 35/44
4. Fourier series for T -periodic functions
π
1 2π
Z
Z
1 T T
an = f s cos(ns)ds = f s cos(ns)ds
π −π 2π π 0 2π
2 T
Z 2π
= f (t) cos nt dt
T 0 T
T
here we have used t= s
2π
π
1 2π
Z Z
1 T T
bn = f s sin(ns)ds = f s sin(ns)ds
π −π 2π π 0 2π
Z T
2 2π
= f (t) sin nt dt
T 0 T
page 36/44
4. Fourier series for T -periodic functions
Example
Let f (t) = e−t for t ∈ [0, 1] and periodically extended to all t ∈ R. Find the
Fourier series expansion of f (t):
Solution:
Z 1
a0 = 2 e−t dt = 2(1 − 1/e),
0
1
2(1 − 1/e)
Z
e−t cos 2πnt dt =
an = 2 ,
0 4n2 π 2 + 1
1
4nπ(1 − 1/e)
Z
e−t sin 2πnt dt =
bn = 2 .
0 4n2 π 2 + 1
Consequently, we have
∞
X 2(1 − 1/e) 4nπ(1 − 1/e)
f (t) = 1 − 1/e + cos 2πnt + sin 2πnt .
n=1
4n2 π 2 + 1 4n2 π 2 + 1
page 37/44
Outcome of this lecture
page 38/44
Exercises
1 f (t) = t − 1.
∞
X (−1)n−1 2
Solution: −1 + sin(nt)
n
n=1
(
0 if t ∈ [−π, 0),
2 f (t) =
t if t ∈ [0, π),
∞
(−1)n − 1 (−1)n−1
π X
Solution: + cos(nt) + sin(nt)
4 n2 π n
n=1
page 39/44
Exercises
Calculate the Fourier series of the following 2π-periodic functions on
[−π, π].
(
t/2 if t ∈ [−π, 0),
3 f (t) =
t if t ∈ [0, π),
∞
(−1)n − 1 (−1)n−1 3
π X
Solution: + cos(nt) + sin(nt)
8 2n2 π 2n
n=1
(
0 if t ∈ [−π, 0),
4 f (t) = t
e if t ∈ [0, π),
Solution:
∞
eπ − 1 X (−1)n eπ − 1 n − (−1)n neπ
+ cos(nt) + sin(nt)
2π (n2 + 1)π (n2 + 1)π
n=1
page 40/44
Exercises
5 f (t) = t − 1.
∞
π − 2 X 2((−1)n − 1)
Solution: + cos((2n − 1)t)
2 n2 π
n=1
6 f (t) = t2 .
∞
π 2 X 4(−1)n
Solution: + cos(nt)
3 n2
n=1
page 41/44
Exercises
7 f (t) = sin(t).
∞
2 X 4
Solution: − 2
cos(2nt).
π (4n − 1)π
n=1
8 f (t) = et .
∞
eπ − 1 X 2(eπ (−1)n − 1)
Solution: + cos(nt).
π (n2 + 1)π
n=1
page 42/44
Exercises
By using the Fourier cosine series of the function f (t) = sin(t), calculate
the value of the following series:
∞
X (−1)n−1
9
n2 − 1/4
n=1
∞
X (−1)n−1
Solution: =π−2
n2 − 1/4
n=1
page 43/44
Exercises
By using the Fourier cosine series of the function f (t) = et , calculate the
value of the following series:
∞
X 1 1 1 1 1
10
2
= + + + + ···
(2n − 1) + 1 2 10 26 50
n=1
∞
X 1 eπ − 1 − π
Solution: =
(2n − 1)2 + 1 2(eπ + 1)
n=1
page 44/44