Lectures 15
Lectures 15
When the French mathematician Joseph Fourier (1768–1830) was trying to solve a prob-
lem in heat conduction, he needed to express a function f as an infinite series of sine and
cosine functions:
1 f 共x兲 苷 a 0 兺 共a
n苷1
n cos nx bn sin nx兲
Earlier, Daniel Bernoulli and Leonard Euler had used such series while investigating prob-
lems concerning vibrating strings and astronomy.
The series in Equation 1 is called a trigonometric series or Fourier series and it turns
out that expressing a function as a Fourier series is sometimes more advantageous than
expanding it as a power series. In particular, astronomical phenomena are usually periodic,
as are heartbeats, tides, and vibrating strings, so it makes sense to express them in terms
of periodic functions.
We start by assuming that the trigonometric series converges and has a continuous func-
tion f 共x兲 as its sum on the interval 关, 兴, that is,
2 f 共x兲 苷 a 0 兺 共a
n苷1
n cos nx bn sin nx兲 x
1
a0 苷 y f 共x兲 dx
2
1 1
an 苷 y f 共x兲 cos nx dx bn 苷 y f 共x兲 sin nx dx
Notice in Definition 7 that we are not saying f 共x兲 is equal to its Fourier series. Later we
will discuss conditions under which that is actually true. For now we are just saying that
associated with any piecewise continuous function f on 关, 兴 is a certain series called
a Fourier series.
1
FOURIER SERIES ■ 2
EXAMPLE 1 Find the Fourier coefficients and Fourier series of the square-wave function
f defined by
f 共x兲 苷 再0
1
if x 0
if 0 x
and f 共x 2兲 苷 f 共x兲
_π 0 π 2π x
(a)
_π 0 π 2π x
FIGURE 1
Square-wave function (b)
SOLUTION Using the formulas for the Fourier coefficients in Definition 7, we have
1 1 0 1 1 1
a0 苷 y f 共x兲 dx 苷 y 0 dx 2 y 1 dx 苷 0 共兲 苷
2 2 0 2 2
and, for n 1,
1 1 0 1
an 苷 y f 共x兲 cos nx dx 苷 y 0 dx y cos nx dx
0
册
1 sin nx 1
苷0 苷 共sin n sin 0兲 苷 0
n 0 n
1 1 0 1
bn 苷 y f 共x兲 sin nx dx 苷 y 0 dx y sin x dx
0
册
1 cos nx 1
苷 苷 共cos n cos 0兲
n 0 n
苷
再 0
2
n
if n is even
if n is odd
3 ■ FOURIER SERIES
The Fourier series of f is therefore
1 2 2 2 2
苷 sin x sin 3x sin 5x sin 7x
2 3 5 7
Since odd integers can be written as n 苷 2k 1, where k is an integer, we can write the
Fourier series in sigma notation as
1 2
兺 sin共2k 1兲x
2 k苷1 共2k 1兲
In Example 1 we found the Fourier series of the square-wave function, but we don’t
know yet whether this function is equal to its Fourier series. Let’s investigate this question
graphically. Figure 2 shows the graphs of some of the partial sums
1 2 2 2
Sn共x兲 苷 sin x sin 3x sin nx
2 3 n
y y y
1 1 1
S£ S∞
S¡
_π π x _π π x _π π x
y y y
1 1 1
S¶ S¡¡ S¡∞
_π π x _π π x _π π x
FIGURE 2 Partial sums of the Fourier series for the square-wave function
If a function f has period other than 2, we can find its Fourier series by making a change
of variable. Suppose f 共x兲 has period 2L, that is f 共x 2L兲 苷 f 共x兲 for all x. If we let
t 苷 x兾L and
then, as you can verify, t has period 2 and x 苷 L corresponds to t 苷 . The Fourier
series of t is
a0 兺 共a
n苷1
n cos nt bn sin nt兲
where
1
a0 苷 y t共t兲 dt
2
1 1
an 苷 y t共t兲 cos nt dt bn 苷 y t共t兲 sin nt dt
If we now use the Substitution Rule with x 苷 Lt兾, then t 苷 x兾L, dt 苷 共兾L兲 dx, and
we have the following
a0
n苷1
兺 冋 冉 冊
a n cos
n x
L
bn sin 冉 冊册n x
L
where
■ ■ Notice that when L 苷 these 1 L
formulas are the same as those in (7). a0 苷 y f 共x兲 dx
2L L
and, for n 1,
an 苷
1
L y
L
L
f 共x兲 cos冉 冊 n x
L
dx bn 苷
1
L yL
L
冉 冊
f 共x兲 sin
n x
L
dx
Of course, the Fourier Convergence Theorem (8) is also valid for functions with
period 2L.
EXAMPLE 2 Find the Fourier series of the triangular wave function defined by f 共x兲 苷 x ⱍ ⱍ
for 1 x 1 and f 共x 2兲 苷 f 共x兲 for all x. (The graph of f is shown in Figure 3.)
For which values of x is f 共x兲 equal to the sum of its Fourier series?
y
FIGURE 3 _1 0 1 2 x
The triangular wave function
FOURIER SERIES ■ 5
ⱍ x ⱍ dx 苷 y
1 0 1
a0 苷 2 y 共x兲 dx 2 y x dx
1 1 1
2
1 1 0
■ ■ Notice that a is more easily calculated as
0
an area.
苷 14 x 2 ] 0
1 14 x 2 ] 1
0 苷 12
and for n 1,
ⱍ x ⱍ cos共n x兲 dx 苷 2 y
1 1
an 苷 y x cos共n x兲 dx
1 0
ⱍ ⱍ
because y 苷 x cos共n x兲 is an even function. Here we integrate by parts with u 苷 x
and dv 苷 cos共n x兲 dx. Thus,
an 苷 2 冋 x
n
sin共n x兲 册 1
0
2
n
y
0
1
sin共n x兲 dx
苷0
2
n
冋
cos共n x兲
n
册1
0
苷
2
n2 2
共cos n 1兲
ⱍ ⱍ
Since y 苷 x sin共n x兲 is an odd function, we see that
ⱍ x ⱍ sin共n x兲 dx 苷 0
1
bn 苷 y
1
1
2共cos n 1兲
兺 cos共n x兲
2 n苷1 n2 2
an 苷
2
n2 2
共cos n 1兲 苷
0
4
2 2
n
再 if n is even
if n is odd
1 4 4 4
2 cos共 x兲 cos共3 x兲 cos共5 x兲
2 9 2
25 2
1 4
苷 兺 cos共共2k 1兲 x兲
2 n苷1 共2k 1兲2 2
The triangular wave function is continuous everywhere and so, according to the Fourier
Convergence Theorem, we have
1 4
f 共x兲 苷 兺 cos共共2k 1兲 x兲 for all x
2 n苷1 共2k 1兲2 2
In particular,
1 4
ⱍxⱍ 苷 2 兺 k苷1 共2k 1兲2 2
cos共共2k 1兲 x兲 for 1 x 1
6 ■ FOURIER SERIES
Definition
A function g(x) is even if g(−x) = g(x); h(x) is odd if h(−x) = −h(x). Note
that a function must be defined on a symmetric interval, say −c < x < c
(where c might be ∞), in order to qualify as even or odd.
Theorem 2. If g(x) is even on the interval −a < x < a (g(−x) = g(x)), then
∞
nπ x
g(x) ∼ a0 + an cos , −a < x < a,
n=1
a
where
a a
1 2 nπ x
a0 = g(x) dx, an = g(x) cos dx.
a 0 a 0 a
If h(x) is odd on the interval −a < x < a (h(−x) = −h(x)), then
∞
nπ x
h(x) ∼ bn sin , −a < x < a,
n=1
a
where
a
2 nπ x
bn = h(x) sin dx.
a 0 a
7 ■ FOURIER SERIES
EXAMPLE 4
Suppose f (x) = x in the interval −1 < x < 1. The graph of its periodic exten-
sion (with period 2) is seen in Fig. 3, and the Fourier coefficients are
a0 = 0, an = 0,
1
2 cos(nπ) 2 (−1)n+1
bn = x sin(nπx) dx = − = .
−1 nπ π n
The sine and cosine functions that appear in a Fourier series have some
special symmetry properties that are useful in evaluating the coefficients. The
graph of the cosine function is symmetric about the vertical axis, and that of
the sine is antisymmetric. We formalize these properties with a definition.
FOURIER SERIES ■ 8
EXERCISES
7. f 共x兲 苷
1 ⱍ ⱍ
if x 1
f 共x 4兲 苷 f 共x兲
1–6 A function f is given on the interval 关, 兴 and f is 0 ⱍ ⱍ
if 1 x 2
再
periodic with period 2.
(a) Find the Fourier coefficients of f . 0 if 2 x 0
(b) Find the Fourier series of f . For what values of x is f 共x兲 8. f 共x兲 苷 1 if 0 x 1 f 共x 4兲 苷 f 共x兲
equal to its Fourier series? 0 if 1 x 2
; (c) Graph f and the partial sums S2, S4, and S6 of the Fourier
series.
再 x if 4 x 0
再
9. f 共x兲 苷 f 共x 8兲 苷 f 共x兲
1 if x 0 0 if 0 x 4
1. f 共x兲 苷
1 if 0 x
再
10. f 共x兲 苷 1 x, 1 x 1 f 共x 2兲 苷 f 共x兲
0 if x 0
2. f 共x兲 苷
x if 0 x 11. f 共t兲 苷 sin共3 t兲, 1 t 1
3. f 共x兲 苷 x ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
再
5. f 共x兲 苷
cos x if 0 x
0 if t 0
再
f 共t兲 苷 f 共t 2兾兲 苷 f 共t兲
1 if x 兾2
E sin t if 0 t
6. f 共x兲 苷 1 if 兾2 x 0
0 if 0 x
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
FOURIER SERIES ■ 9
SOLUTIONS
1 π 1 0 π
1. (a) a0 = f (x) dx = dx − 0 dx = 0.
2π −π 2π −π
1 π π 1 0 1 π
an = f(x) cos nx dx = cos nx dx − cos nx dx = 0 [since cos nx is even].
π −π −π π −π π 0
1 π π 1 0 1 π 2 0
bn = f (x) sin nx dx = sin nx dx − sin nx dx = sin nx dx [since sin nx is odd]
π −π −π π −π π 0 π −π
2 0 if n even
= − [1 − cos(−nπ)] =
nπ − 4 if n odd
nπ
∞ 4
(b) f (x) = − sin(2k + 1)x when −π < x < 0 and 0 < x < π.
k=0 (2k + 1)π
(c) y
0.5
0
-2.5 -1.25 0 1.25 2.5
x
-0.5
-1
1 π 1 π
3. (a) a0 = f (x) dx = x dx = 0.
2π −π 2π −π
1 π 1 π
an = f (x) cos nx dx = x cos nx dx = 0 [because x cos nx is odd]
π −π π −π
1 π 1 π 2 π
bn = −π
f (x) sin nx dx = −π
x sin nx dx = x sin nx dx [since x sin nx is odd]
π π π 0
2 −(2/n) if n even
= − cos nπ [using integration by parts] =
n (2/n) if n odd
∞ 2 y
(b) f (x) = (−1)n+1 sin nx (c)
n=1 n
2.5
1.25
0
-2.5 -1.25 0 1.25 2.5
-1.25
-2.5
10 ■ FOURIER SERIES
1 π 1 π
5. (a) a0 = f (x) dx = cos x dx = 0
2π −π 2π 0 1
1 π 1 π 2 if n = 1 π
an = −π
f (x) cos nx dx = 0
cos x cos nx dx = [by symmetry about x = 2
]
π π 0 if n = 1
1 π 1 π
bn = f (x) sin nx dx = cos x sin nx dx
π −π π 0
2n
1
∞ 4k
(b) f (x) = 2
cos x + sin(2k) when −π < x < 0, 0 < x < π.
k=1 π (4k2 − 1)
(c) y 1
0.5
0
-2.5 -1.25 0 1.25 2.5
x
-0.5
-1
0 if − 2 ≤ x ≤ −1
7. Use f (x) = 1 if − 1 < x < 1, L = 2.
0 if 1 ≤ x ≤ 2
1 L 1
1 1
a0 = f (x) dx = 4
dx = 2
2L −L −1
0 if n even
1 L nπx 1 nπx 2 π
1
an = f (x) cos dx = cos dx = sin n = 2/nπ if n = 4n + 1
L −L L 2 −1 2 nπ 2
−2/nπ if n = 4n + 3
1 L nπx 1 nπx
1
bn = f (x) sin dx = 2 sin dx = 0
L −L L −1 2
πx
1 2 2 3πx 2 5πx
Fourier Series: 2
+ cos − cos + cos −···
π 2 3π 2 5π 2
∞ 2 π 2 π
1
2
+ sin (4k + 1) − sin (4k + 3)
k=1 (4k + 1) π 2 (4k + 3) π 2
y
1
0.75
0.5
0.25
0
-5 -2.5 0 2.5 5
x
FOURIER SERIES ■ 11
−x if − 4 ≤ x < 0
9. Use f (x) = , L = 4.
0 if 0 ≤ x ≤ 4
1 L 1
0
a0 = f (x) dx = 8
−x dx = 1
2L −L −4
1 L nπx 0 nπx 4
1
an = f (x) cos dx = −x cos dx = (cos (nπ) − 1) =
L −L L 4 −4 4 (nπ)2
0 if n is even
2
−8/(nπ) if n is odd
1 L nπx 0 nπx 4 4/nπ if n is even
1
bn = f(x) sin dx = 4
−x sin dx = cos (nπ) =
L −L L −4 4 nπ −4/nπ if n is odd
Fourier Series:
∞ 4 π 8 π 4 π
1+ − sin (2k − 1)x − cos (2k − 1) x + sin (2k)x
k=1 (2k − 1)π 4 (2k − 1) π
2 2 4 (2k)π 4
y 4
0
-5 -2.5 0 2.5 5
is an integer multiple of 23 . Therefore f (x) is the same as sin(3πt) for all t, and its Fourier series is therefore
sin(3πt).
1 L 1
1
We can get this result using the standard coefficient formulas: a0 = f (x) dx = 2
sin(3πx) dx = 0
2L −L −1
1 1 nπx 1
an = f (x) cos dx = −1 sin(3πx) cos(nπx) dx
L −1 L
= 0 [applying change of variables to a formula in the section]
1 L nπx 1
bn = −L
f (x) sin dx = −1 sin(3πx) sin(nπx) dx
L L
sin nπ
6 if n = 3 0 if n = 3
= π (−9 + n2)
[using integral table and addition formula =
1 if n = 3
1 if n = 3