Uploaded by totodioxide

Fourier-series-tutorial

advertisement
Series
FOURIER SERIES
Graham S McDonald
A self-contained Tutorial Module for learning
the technique of Fourier series analysis
● Table of contents
● Begin Tutorial
c 2004 g.s.mcdonald@salford.ac.uk
Table of contents
1.
2.
3.
4.
5.
6.
7.
Theory
Exercises
Answers
Integrals
Useful trig results
Alternative notation
Tips on using solutions
Full worked solutions
Section 1: Theory
3
1. Theory
● A graph of periodic function f (x) that has period L exhibits the
same pattern every L units along the x-axis, so that f (x + L) = f (x)
for every value of x. If we know what the function looks like over one
complete period, we can thus sketch a graph of the function over a
wider interval of x (that may contain many periods)
f(x )
x
P E R IO D = L
Toc
JJ
II
J
I
Back
Section 1: Theory
4
● This property of repetition defines a fundamental spatial frequency k = 2π
L that can be used to give a first approximation to
the periodic pattern f (x):
f (x) ' c1 sin(kx + α1 ) = a1 cos(kx) + b1 sin(kx),
where symbols with subscript 1 are constants that determine the amplitude and phase of this first approximation
● A much better approximation of the periodic pattern f (x) can
be built up by adding an appropriate combination of harmonics to
this fundamental (sine-wave) pattern. For example, adding
c2 sin(2kx + α2 ) = a2 cos(2kx) + b2 sin(2kx)
c3 sin(3kx + α3 ) = a3 cos(3kx) + b3 sin(3kx)
(the 2nd harmonic)
(the 3rd harmonic)
Here, symbols with subscripts are constants that determine the amplitude and phase of each harmonic contribution
Toc
JJ
II
J
I
Back
Section 1: Theory
5
One can even approximate a square-wave pattern with a suitable sum
that involves a fundamental sine-wave plus a combination of harmonics of this fundamental frequency. This sum is called a Fourier series
F u n d a m e n ta l
F u n d a m e n ta l + 2 h a rm o n ic s
x
F u n d a m e n ta l + 5 h a rm o n ic s
F u n d a m e n ta l + 2 0 h a rm o n ic s
Toc
JJ
II
P E R IO D = L
J
I
Back
Section 1: Theory
6
● In this Tutorial, we consider working out Fourier series for functions f (x) with period L = 2π. Their fundamental frequency is then
k = 2π
L = 1, and their Fourier series representations involve terms like
a1 cos x ,
b1 sin x
a2 cos 2x ,
b2 sin 2x
a3 cos 3x ,
b3 sin 3x
We also include a constant term a0 /2 in the Fourier series. This
allows us to represent functions that are, for example, entirely above
the x−axis. With a sufficient number of harmonics included, our approximate series can exactly represent a given function f (x)
f (x) = a0 /2
Toc
+ a1 cos x + a2 cos 2x + a3 cos 3x + ...
+ b1 sin x + b2 sin 2x + b3 sin 3x + ...
JJ
II
J
I
Back
Section 1: Theory
7
A more compact way of writing the Fourier series of a function f (x),
with period 2π, uses the variable subscript n = 1, 2, 3, . . .
∞
a0 X
f (x) =
+
[an cos nx + bn sin nx]
2
n=1
● We need to work out the Fourier coefficients (a0 , an and bn ) for
given functions f (x). This process is broken down into three steps
STEP ONE
a0
=
1
π
=
1
π
=
1
π
Z
f (x) dx
2π
STEP TWO
an
Z
f (x) cos nx dx
2π
STEP THREE
bn
Z
f (x) sin nx dx
2π
where integrations are over a single interval in x of L = 2π
Toc
JJ
II
J
I
Back
Section 1: Theory
8
● Finally, specifying a particular value of x = x1 in a Fourier series,
gives a series of constants that should equal f (x1 ). However, if f (x)
is discontinuous at this value of x, then the series converges to a value
that is half-way between the two possible function values
" V e rtic a l ju m p " /d is c o n tin u ity
in th e fu n c tio n re p re s e n te d
f(x )
x
F o u rie r s e rie s
c o n v e rg e s to
h a lf-w a y p o in t
Toc
JJ
II
J
I
Back
Section 2: Exercises
9
2. Exercises
Click on Exercise links for full worked solutions (7 exercises in total).
Exercise 1.
Let f (x) be a function of period 2π such that
1, −π < x < 0
f (x) =
0, 0 < x < π .
a) Sketch a graph of f (x) in the interval −2π < x < 2π
b) Show that the Fourier series for f (x) in the interval −π < x < π is
1
2
1
1
−
sin x + sin 3x + sin 5x + ...
2 π
3
5
c) By giving an appropriate value to x, show that
π
1 1 1
= 1 − + − + ...
4
3 5 7
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 2: Exercises
10
Exercise 2.
Let f (x) be a function of period 2π such that
0, −π < x < 0
f (x) =
x, 0 < x < π .
a) Sketch a graph of f (x) in the interval −3π < x < 3π
b) Show that the Fourier series for f (x) in the interval −π < x < π is
π
2
1
1
−
cos x + 2 cos 3x + 2 cos 5x + ...
4
π
3
5
1
1
+ sin x − sin 2x + sin 3x − ...
2
3
c) By giving appropriate values to x, show that
(i) π4 = 1 − 31 + 15 − 17 + . . .
2
and (ii) π8 = 1 + 312 + 512 + 712 + . . .
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 2: Exercises
11
Exercise 3.
Let f (x) be a function of period 2π such that
x, 0 < x < π
f (x) =
π, π < x < 2π .
a) Sketch a graph of f (x) in the interval −2π < x < 2π
b) Show that the Fourier series for f (x) in the interval 0 < x < 2π is
2
1
1
3π
−
cos x + 2 cos 3x + 2 cos 5x + . . .
4
π
3
5
1
1
− sin x + sin 2x + sin 3x + . . .
2
3
c) By giving appropriate values to x, show that
(i)
π
4
= 1−
1
3
+
1
5
−
1
7
+...
and (ii)
π2
8
= 1+
1
32
+
1
52
+
1
72
+...
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 2: Exercises
12
Exercise 4.
Let f (x) be a function of period 2π such that
f (x) =
x
over the interval 0 < x < 2π.
2
a) Sketch a graph of f (x) in the interval 0 < x < 4π
b) Show that the Fourier series for f (x) in the interval 0 < x < 2π is
1
π
1
− sin x + sin 2x + sin 3x + . . .
2
2
3
c) By giving an appropriate value to x, show that
π
1 1 1 1
= 1 − + − + − ...
4
3 5 7 9
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 2: Exercises
13
Exercise 5.
Let f (x) be a function of period 2π such that
π − x, 0 < x < π
f (x) =
0,
π < x < 2π
a) Sketch a graph of f (x) in the interval −2π < x < 2π
b) Show that the Fourier series for f (x) in the interval 0 < x < 2π is
π
1
2
1
+
cos x + 2 cos 3x + 2 cos 5x + . . .
4
π
3
5
1
1
1
+ sin x + sin 2x + sin 3x + sin 4x + . . .
2
3
4
c) By giving an appropriate value to x, show that
π2
1
1
= 1 + 2 + 2 + ...
8
3
5
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 2: Exercises
14
Exercise 6.
Let f (x) be a function of period 2π such that
f (x) = x in the range − π < x < π.
a) Sketch a graph of f (x) in the interval −3π < x < 3π
b) Show that the Fourier series for f (x) in the interval −π < x < π is
1
1
2 sin x − sin 2x + sin 3x − . . .
2
3
c) By giving an appropriate value to x, show that
π
1 1 1
= 1 − + − + ...
4
3 5 7
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 2: Exercises
15
Exercise 7.
Let f (x) be a function of period 2π such that
f (x) = x2 over the interval − π < x < π.
a) Sketch a graph of f (x) in the interval −3π < x < 3π
b) Show that the Fourier series for f (x) in the interval −π < x < π is
1
π2
1
− 4 cos x − 2 cos 2x + 2 cos 3x − . . .
3
2
3
c) By giving an appropriate value to x, show that
π2
1
1
1
= 1 + 2 + 2 + 2 + ...
6
2
3
4
● Theory ● Answers ● Integrals ● Trig ● Notation
Toc
JJ
II
J
I
Back
Section 3: Answers
16
3. Answers
The sketches asked for in part (a) of each exercise are given within
the full worked solutions – click on the Exercise links to see these
solutions
The answers below are suggested values of x to get the series of
constants quoted in part (c) of each exercise
1. x =
π
2,
2. (i) x =
3. (i) x =
4. x =
π
2,
π
2,
(ii) x = 0,
(ii) x = 0,
π
2,
5. x = 0,
6. x =
π
2,
7. x = π.
Toc
JJ
II
J
I
Back
Section 4: Integrals
17
4. Integrals
R b dv
Rb
b
Formula for integration by parts: a u dx
dx = [uv]a − a
R
R
f (x)
f (x)dx
f (x)
f (x)dx
xn
1
x
x
e
sin x
cos x
tan x
cosec x
sec x
sec2 x
cot x
sin2 x
cos2 x
xn+1
n+1
(n 6= −1)
ln |x|
ex
− cos x
sin x
− ln |cos x|
ln tan x2
ln |sec x + tan x|
tan x
ln |sin x|
x
sin 2x
2 −
4
x
sin 2x
2 +
4
Toc
JJ
n
[g (x)] g 0 (x)
0
g (x)
g(x)
x
a
sinh x
cosh x
tanh x
cosech x
sech x
sech2 x
coth x
sinh2 x
cosh2 x
II
J
[g(x)]n+1
n+1
du
dx v dx
(n 6= −1)
ln |g (x)|
ax
(a > 0)
ln a
cosh x
sinh x
ln cosh x
ln tanh x2
2 tan−1 ex
tanh x
ln |sinh x|
sinh 2x
− x2
4
sinh 2x
+ x2
4
I
Back
Section 4: Integrals
f (x)
1
a2 +x2
√ 1
a2 −x2
√
a2 − x2
18
R
f (x) dx
f (x)
R
1
a
tan−1
1
a2 −x2
1
2a
ln
a+x
a−x
(0 < |x| < a)
(a > 0)
1
x2 −a2
1
2a
ln
x−a
x+a
(|x| > a > 0)
sin−1
x
a
√ 1
a2 +x2
ln
√
x+ a2 +x2
a
(a > 0)
(−a < x < a)
√ 1
x2 −a2
ln
√
x+ x2 −a2
a
(x > a > 0)
a2
2
−1
sin
√
+x
Toc
x
a
x
a
a2 −x2
a2
JJ
√
i √
a2 +x2
a2
2
a2
2
x2 −a2
II
f (x) dx
J
h
h
sinh−1
− cosh−1
I
x
a
i
√
x a2 +x2
2
a
i
√
2
2
+ x xa2−a
+
x
a
Back
Section 5: Useful trig results
19
5. Useful trig results
When calculating the Fourier coefficients an and bn , for which n =
1, 2, 3, . . . , the following trig. results are useful. Each of these results,
which are also true for n = 0, −1, −2, −3, . . . , can be deduced from
the graph of sin x or that of cos x
1
● sin nπ = 0
s in (x )
x
−3π
−2π
−π
0
π
2π
3π
π
2π
3π
−1
1
● cos nπ = (−1)n
c o s(x )
x
−3π
−2π
−π
0
−1
Toc
JJ
II
J
I
Back
Section 5: Useful trig results
1
20
s in (x )
1
c o s(x )
x
−3π
−π
−2π
0
π
3π
2π
x
−3π
−2π
−π
−1

π 
● sin n =

2
π
0
3π
2π
−1

0 , n even
0 , n odd
π 
1 , n = 1, 5, 9, ... ● cos n =
1 , n = 0, 4, 8, ...

2
−1 , n = 3, 7, 11, ...
−1 , n = 2, 6, 10, ...
Areas cancel when
when integrating
overR whole periods
●
sin nx dx = 0
2π
R
●
cos nx dx = 0
1
+
−3π
−2π
s in (x )
+
+
−π
0
π
−1
2π
Toc
JJ
II
J
I
Back
2π
x
3π
Section 6: Alternative notation
21
6. Alternative notation
● For a waveform f (x) with period L =
2π
k
∞
f (x)
=
a0 X
+
[an cos nkx + bn sin nkx]
2
n=1
The corresponding Fourier coefficients are
STEP ONE
a0
Z
=
2
L
Z
=
2
L
=
2
L
f (x) dx
L
STEP TWO
an
f (x) cos nkx dx
L
STEP THREE
bn
Z
f (x) sin nkx dx
L
and integrations are over a single interval in x of L
Toc
JJ
II
J
I
Back
Section 6: Alternative notation
22
● For a waveform f (x) with period 2L = 2π
k , we have that
2π
π
k = 2L
=L
and nkx = nπx
L
∞
nπx
a0 X h
nπx i
an cos
f (x) =
+
+ bn sin
2
L
L
n=1
The corresponding Fourier coefficients are
STEP ONE
a0
=
Z
1
L
f (x) dx
2L
STEP TWO
an
=
1
L
=
1
L
Z
f (x) cos
nπx
dx
L
f (x) sin
nπx
dx
L
2L
STEP THREE
bn
Z
2L
and integrations are over a single interval in x of 2L
Toc
JJ
II
J
I
Back
Section 6: Alternative notation
23
● For a waveform f (t) with period T =
2π
ω
∞
f (t)
a0 X
+
[an cos nωt + bn sin nωt]
2
n=1
=
The corresponding Fourier coefficients are
STEP ONE
a0
Z
=
2
T
Z
=
2
T
=
2
T
f (t) dt
T
STEP TWO
an
f (t) cos nωt dt
T
STEP THREE
bn
Z
f (t) sin nωt dt
T
and integrations are over a single interval in t of T
Toc
JJ
II
J
I
Back
Section 7: Tips on using solutions
24
7. Tips on using solutions
● When looking at the THEORY, ANSWERS, INTEGRALS, TRIG
or NOTATION pages, use the Back button (at the bottom of the
page) to return to the exercises
● Use the solutions intelligently. For example, they can help you get
started on an exercise, or they can allow you to check whether your
intermediate results are correct
● Try to make less use of the full solutions as you work your way
through the Tutorial
Toc
JJ
II
J
I
Back
Solutions to exercises
25
Full worked solutions
Exercise 1.
1, −π < x < 0
f (x) =
0, 0 < x < π, and has period 2π
a) Sketch a graph of f (x) in the interval −2π < x < 2π
f(x )
1
−2π
Toc
−π
JJ
0
II
2π
π
J
x
I
Back
Solutions to exercises
26
b) Fourier series representation of f (x)
STEP ONE
1
a0 =
π
Z
1 π
f (x)dx =
f (x)dx +
f (x)dx
π 0
−π
−π
Z
Z
1 0
1 π
=
1 · dx +
0 · dx
π −π
π 0
Z
1 0
=
dx
π −π
1 0
=
[x]
π −π
1
=
(0 − (−π))
π
1
=
· (π)
π
i.e. a0 = 1 .
Z
Toc
π
1
π
JJ
II
Z
0
J
I
Back
Solutions to exercises
27
STEP TWO
an =
1
π
Z
π
f (x) cos nx dx =
−π
=
=
=
=
=
i.e. an
Toc
JJ
=
1
π
1
π
Z
0
f (x) cos nx dx +
−π
Z 0
1 · cos nx dx +
−π
Z 0
1
π
Z
1
π
π
Z
f (x) cos nx dx
0
π
0 · cos nx dx
0
1
cos nx dx
π −π
0
1 sin nx
1
0
=
[sin nx]−π
π
n
nπ
−π
1
(sin 0 − sin(−nπ))
nπ
1
(0 + sin nπ)
nπ
1
(0 + 0) = 0.
nπ
II
J
I
Back
Solutions to exercises
28
STEP THREE
bn
1
π
=
1
π
=
1
π
=
i.e. bn
=
=
=
i.e. bn
=
Z
π
f (x) sin nx dx
−π
Z 0
f (x) sin nx dx +
−π
Z 0
1 · sin nx dx +
−π
1
π
1
π
Z
π
Z
f (x) sin nx dx
0
π
0 · sin nx dx
0
0
1 − cos nx
sin nx dx =
π
n
−π
−π
1
1
− [cos nx]0−π = −
(cos 0 − cos(−nπ))
nπ
nπ
1
1
− (1 − cos nπ) = −
(1 − (−1)n ) , see Trig
nπ
nπ
0
, n even
1 , n even
n
,
since
(−1)
=
2
−1 , n odd
− nπ
, n odd
1
π
Toc
Z
0
JJ
II
J
I
Back
Solutions to exercises
29
We now have that
∞
a0 X
f (x) =
+
[an cos nx + bn sin nx]
2
n=1
with the three steps giving
a0 = 1, an = 0 , and bn =
0
2
− nπ
, n even
, n odd
It may be helpful to construct a table of values of bn
n
bn
1
− π2
2
3 0 − π2 13
4
5 0 − π2 15
Substituting our results now gives the required series
1
1
2
1
f (x) = −
sin x + sin 3x + sin 5x + . . .
2 π
3
5
Toc
JJ
II
J
I
Back
Solutions to exercises
30
c) Pick an appropriate value of x, to show that
π
4
=1−
1
3
+
1
5
−
1
7
+ ...
Comparing this series with
1
2
1
1
f (x) = −
sin x + sin 3x + sin 5x + . . . ,
2 π
3
5
we need to introduce a minus sign in front of the constants 13 , 17 ,. . .
So we need sin x = 1, sin 3x = −1, sin 5x = 1, sin 7x = −1, etc
The first condition of sin x = 1 suggests trying x =
This choice gives
i.e.
sin π2
1
+
−
1
3
sin 3 π2
1
3
+
+
1
5
π
2.
sin 5 π2
1
5
+
−
Looking at the graph of f (x), we also have that f ( π2 ) = 0.
Toc
JJ
II
J
I
Back
1
7
sin 7 π2
1
7
Solutions to exercises
Picking x =
31
π
2
thus gives
h
0 = 21 − π2 sin π2 +
i.e. 0 =
1
2
−
2
π
h
1
−
1
3
sin 3π
2 +
1
5
sin 5π
2
+
1
7
sin 7π
2 + ...
1
3
+
1
5
−
1
7
+ ...
i
i
A little manipulation then gives a series representation of π4
2
1 1 1
1
1 − + − + ... =
π
3 5 7
2
1 1 1
π
1 − + − + ... = .
3 5 7
4
Return to Exercise 1
Toc
JJ
II
J
I
Back
Solutions to exercises
Exercise 2.
0,
f (x) =
x,
32
−π < x < 0
0 < x < π, and has period 2π
a) Sketch a graph of f (x) in the interval −3π < x < 3π
f(x )
π
−3π
Toc
−2π
JJ
π
−π
II
J
2π
3π
I
Back
x
Solutions to exercises
33
b) Fourier series representation of f (x)
STEP ONE
a0 =
1
π
Z
π
f (x)dx =
−π
=
=
=
Toc
i.e. a0
=
JJ
II
1
π
Z
1
π
Z
0
f (x)dx +
−π
0
0 · dx +
−π
1
π
1
π
Z
Z
π
f (x)dx
0
π
x dx
0
π
1 x2
π 2 0
1 π2
−0
π 2
π
.
2
J
I
Back
Solutions to exercises
34
STEP TWO
an =
1
π
Z
π
f (x) cos nx dx =
−π
1
π
1
π
Z
0
f (x) cos nx dx +
−π
Z 0
1
π
Z
Z
π
f (x) cos nx dx
0
π
1
0 · cos nx dx +
x cos nx dx
π
−π
0
π Z π
Z π
1
sin nx
sin nx
1
x cos nx dx =
x
−
dx
i.e. an =
π 0
π
n
n
0
0
=
(using integration by parts)
1
sin nπ
1 h cos nx iπ
π
−0 −
−
π
n
n
n
0
1
1
(
0 − 0) + 2 [cos nx]π0
π
n
1
1
{cos nπ − cos 0} =
{(−1)n − 1}
2
2
πn
πn
0
, n even
, see Trig.
− πn2 2 , n odd
i.e. an
=
=
=
i.e. an
Toc
=
JJ
II
J
I
Back
Solutions to exercises
35
STEP THREE
bn =
1
π
Z
π
f (x) sin nx dx =
−π
=
i.e. bn =
1
π
Z
π
x sin nx dx =
0
=
=
=
=
Toc
JJ
Z
1 π
f (x) sin nx dx
π 0
−π
Z
Z
1 π
1 0
0 · sin nx dx +
x sin nx dx
π −π
π 0
Z π
1 h cos nx iπ
cos nx x −
−
−
dx
π
n
n
0
0
(using integration by parts)
Z
1
1 π
1
π
− [x cos nx]0 +
cos nx dx
π
n
n 0
π 1
1 sin nx
1
− (π cos nπ − 0) +
π
n
n
n
0
1
1
− (−1)n +
(0 − 0), see Trig
n
πn2
1
− (−1)n
n
1
π
II
Z
0
f (x) sin nx dx +
J
I
Back
Solutions to exercises
(
i.e.
bn =
36
− n1
, n even
+ n1
, n odd
We now have
∞
f (x)
a0 X
+
[an cos nx + bn sin nx]
2
n=1
=
(
π
where a0 = ,
2
an =
0
(
, n even
− πn2 2
,
, n odd
bn =
− n1
1
n
Constructing a table of values gives
Toc
n
1
an
− π2
0
bn
1
− 12
JJ
2
3
− π2
II
·
4
1
32
1
3
0
5
− π2
− 14
J
·
1
52
1
5
I
Back
, n even
, n odd
Solutions to exercises
37
This table of coefficients gives
f (x) =
1 π
2 2
i.e. f (x) =
π
4
2
π
2
+ −
π
2
+ −
π
cos x + 0 · cos 2x
1
· 2 cos 3x + 0 · cos 4x
3
1
· 2 cos 5x + ...
5
1
1
+ sin x − sin 2x + sin 3x − ...
2
3
2
1
1
−
cos x + 2 cos 3x + 2 cos 5x + ...
π
3
5
1
1
+ sin x − sin 2x + sin 3x − ...
2
3
+
−
and we have found the required series!
Toc
JJ
II
J
I
Back
Solutions to exercises
38
c) Pick an appropriate value of x, to show that
(i)
π
4
=1−
1
3
+
1
5
−
1
7
+ ...
Comparing this series with
π
2
1
1
f (x) =
−
cos x + 2 cos 3x + 2 cos 5x + ...
4
π
3
5
1
1
+ sin x − sin 2x + sin 3x − ... ,
2
3
the required series of constants does not involve terms like 312 , 512 , 712 , ....
So we need to pick a value of x that sets the cos nx terms to zero.
The Trig section shows that cos n π2 = 0 when n is odd, and note also
that cos nx terms in the Fourier series all have odd n
i.e.
cos x = cos 3x = cos 5x = ... = 0
i.e.
cos π2 = cos 3 π2 = cos 5 π2 = ... = 0
Toc
JJ
II
J
when x =
I
π
2,
Back
Solutions to exercises
39
Setting x = π2 in the series for f (x) gives
π
π
2
π
1
1
3π
5π
f
=
−
cos + 2 cos
+ 2 cos
+ ...
2
4
π
2
3
2
5
2
2π 1
3π 1
4π 1
5π
π 1
+ sin
− sin
+ sin
− ...
+ sin − sin
2
2
2
3
2
4
2
5
2
π
2
=
− [0 + 0 + 0 + ...]
4 π

1
1
1
1
π + · (−1) − sin
2π + · (1) − ...
+ 1 − sin
2 | {z } 3
4 | {z } 5
=0
=0
The graph of f (x) shows that f
π
2
π
i.e.
4
Toc
JJ
=
=
π
2
=
π
2,
so that
π
1 1 1
+ 1 − + − + ...
4
3 5 7
1 1 1
1 − + − + ...
3 5 7
II
J
I
Back
Solutions to exercises
40
Pick an appropriate value of x, to show that
(ii)
π2
8
=1+
1
32
+
1
52
+
1
72
+ ...
Compare this series with
f (x) =
π
4
2
1
1
cos x + 2 cos 3x + 2 cos 5x + ...
π
3
5
1
1
+ sin x − sin 2x + sin 3x − ... .
2
3
−
This time, we want to use the coefficients of the cos nx terms, and
the same choice of x needs to set the sin nx terms to zero
Picking x = 0 gives
sin x = sin 2x = sin 3x = 0
and
cos x = cos 3x = cos 5x = 1
Note also that the graph of f (x) gives f (x) = 0 when x = 0
Toc
JJ
II
J
I
Back
Solutions to exercises
41
So, picking x = 0 gives
0
i.e. 0
π
2
1
1
1
−
cos 0 + 2 cos 0 + 2 cos 0 + 2 cos 0 + ...
4
π
3
5
7
sin 0 sin 0
+ sin 0 −
+
− ...
3
2
π
2
1
1
1
=
−
1 + 2 + 2 + 2 + ... + 0 − 0 + 0 − ...
4
π
3
5
7
=
We then find that
2
1
1
1
1 + 2 + 2 + 2 + ...
=
π
3
5
7
1
1
1
and
1 + 2 + 2 + 2 + ... =
3
5
7
π
4
π2
.
8
Return to Exercise 2
Toc
JJ
II
J
I
Back
Solutions to exercises
42
Exercise 3.
x, 0 < x < π
f (x) =
π, π < x < 2π,
and has period 2π
a) Sketch a graph of f (x) in the interval −2π < x < 2π
f(x )
π
−2π
Toc
−π
JJ
0
II
π
J
I
2π
x
Back
Solutions to exercises
43
b) Fourier series representation of f (x)
STEP ONE
a0 =
1
π
Z
2π
f (x)dx =
0
=
=
=
Toc
Z
1 2π
f (x)dx
π π
0
Z
Z
1 π
1 2π
xdx +
π · dx
π 0
π π
π
2π
1 x2
π
+
x
π 2 0 π
π
2
1 π
− 0 + 2π − π
π 2
1
π
Z
π
f (x)dx +
=
π
+π
2
i.e. a0
=
3π
.
2
JJ
II
J
I
Back
Solutions to exercises
44
STEP TWO
an
=
=
=
Z
1
π
Z
1
π
"
f (x) cos nx dx
0
π
0
1
x cos nx dx +
π
sin nx
x
n
|
=
2π
1
π
π
Z
−
0
0
{z
π
Z
2π
π · cos nx dx
π
#
2π
sin nx
π sin nx
dx +
n
π
n
π
}
using integration by parts
" π #
− cos nx
1 1
π sin nπ − 0 · sin n0 −
π n
n2
0
+
Toc
JJ
II
J
1
(sin n2π − sin nπ)
n
I
Back
Solutions to exercises
i.e. an
45
=
" #
1 1
cos nπ cos 0
1
0−0 +
0−0
− 2
+
π n
n2
n
n
=
1
(cos nπ − 1), see Trig
n2 π
=
1
(−1)n − 1 ,
2
n π
(
− n22 π
, n odd
0
, n even.
i.e. an =
Toc
JJ
II
J
I
Back
Solutions to exercises
46
STEP THREE
bn
=
=
=
1
π
Z
1
π
Z
1
π
"
2π
f (x) sin nx dx
0
π
x sin nx dx +
0
1
π
Z
2π
π · sin nx dx
π
#
2π
h cos nx iπ Z π − cos nx π − cos nx
x −
−
dx +
n
n
π
n
0
0
π
|
{z
}
using integration by parts
=
=
=
π #
−π cos nπ
sin nx
1
+0 +
− (cos 2nπ − cos nπ)
n
n2 0
n
"
#
1 −π(−1)n
sin nπ − sin 0
1
+
−
1 − (−1)n
2
π
n
n
n
1
1
− (−1)n +
0
−
1 − (−1)n
n
n
1
π
"
Toc
JJ
II
J
I
Back
Solutions to exercises
47
i.e. bn
i.e. bn
1
1
1
= − (−1)n − + (−1)n
n
n n
1
=
− .
n
We now have
∞
f (x) =
where a0 =
3π
2 ,
a0 X
+
[an cos nx + bn sin nx]
2
n=1
(
0
, n even
an =
,
bn = − n1
− n22 π , n odd
Constructing a table of values gives
n
an
bn
Toc
1
− π2
−1
JJ
2
0
− 21
3 − π2 312
− 13
II
J
4
0
− 14
5 − π2 512
− 15
I
Back
Solutions to exercises
48
This table of coefficients gives
f (x) =
1
2
i.e. f (x) =
3π
2
3π
4
+
−
+
h
−1
sin x +
−
−
2
π
2
π
h
cos x + 0 · cos 2x +
1
32
cos 3x + . . .
i
1
2
sin 2x +
1
3
sin 3x + . . .
i
h
cos x +
1
32
cos 3x +
1
52
cos 5x + . . .
i
h
sin x +
1
2
sin 2x +
1
3
sin 3x + . . .
i
and we have found the required series.
Toc
JJ
II
J
I
Back
Solutions to exercises
49
c) Pick an appropriate value of x, to show that
(i)
π
4
=1−
1
3
+
1
5
−
1
7
+ ...
Compare this series with
3π
2
1
1
f (x) =
−
cos x + 2 cos 3x + 2 cos 5x + . . .
4
π
3
5
1
1
− sin x + sin 2x + sin 3x + . . .
2
3
Here, we want to set the cos nx terms to zero (since their coefficients
are 1, 312 , 512 , . . .). Since cos n π2 = 0 when n is odd, we will try setting
x = π2 in the series. Note also that f ( π2 ) = π2
This gives
π
2
=
3π
4
−
−
2
π
cos π2 +
1
32
sin π2 +
1
2
Toc
JJ
cos 3 π2 +
sin 2 π2 +
II
1
3
1
52
cos 5 π2 + . . .
sin 3 π2 +
J
1
4
sin 4 π2 +
I
1
5
sin 5 π2 + . . .
Back
Solutions to exercises
50
and
π
2
=
3π
4
2
π
−
[0 + 0 + 0 + . . .]
(1) +
−
1
2
· (0) +
1
3
· (−1) +
1
4
· (0) +
1
5
· (1) + . . .
then
π
2
=
3π
4
− 1−
1
3
+
1
5
−
1
7
1−
1
3
+
1
5
−
1
7
+ ... =
3π
4
1−
1
3
+
1
5
−
1
7
+ ... =
π
4,
(ii)
π2
8
+ ...
−
π
2
as required.
To show that
=1+
1
32
+
1
52
+
1
72
+ ... ,
We want zero sin nx terms and to use the coefficients of cos nx
Toc
JJ
II
J
I
Back
Solutions to exercises
51
Setting x = 0 eliminates the sin nx terms from the series, and also
gives
1
1
1
1
1
1
cos x + 2 cos 3x + 2 cos 5x + 2 cos 7x + . . . = 1 + 2 + 2 + 2 + . . .
3
5
7
3
5
7
(i.e. the desired series).
The graph of f (x) shows a discontinuity (a “vertical jump”) at x = 0
The Fourier series converges to a value that is half-way between the
two values of f (x) around this discontinuity. That is the series will
converge to π2 at x = 0
π
i.e.
2
=
π
2
=
and
Toc
3π
2
1
1
1
−
cos 0 + 2 cos 0 + 2 cos 0 + 2 cos 0 + . . .
4
π
3
5
7
1
1
− sin 0 + sin 0 + sin 0 + . . .
2
3
3π
2
1
1
1
−
1 + 2 + 2 + 2 + . . . − [0 + 0 + 0 + . . .]
4
π
3
5
7
JJ
II
J
I
Back
Solutions to exercises
52
Finally, this gives
π
4
π2
8
−
and
=
1
1
1
+
+
+
.
.
.
32
52
72
1
1
1
1 + 2 + 2 + 2 + ...
3
5
7
= −
2
π
1+
Return to Exercise 3
Toc
JJ
II
J
I
Back
Solutions to exercises
53
Exercise 4.
f (x) = x2 , over the interval 0 < x < 2π and has period 2π
a) Sketch a graph of f (x) in the interval 0 < x < 4π
π
f(x )
0
Toc
JJ
3π
2π
π
II
J
I
4π
Back
x
Solutions to exercises
54
b) Fourier series representation of f (x)
STEP ONE
a0
i.e. a0
Toc
JJ
1
π
Z
Z
=
1
π
=
1
π
=
1
π
=
2π
f (x) dx
0
2π
x
dx
2
0
2 2π
x
4 0
(2π)2
−0
4
= π.
II
J
I
Back
Solutions to exercises
55
STEP TWO
an
=
=
=
1
π
Z
1
π
Z
2π
f (x) cos nx dx
0
2π
x
cos nx dx
2
0
(
1
2π
sin nx
x
n
|
=
=
i.e. an
Toc
=
2π
0
1
−
n
{z
Z
)
2π
sin nx dx
0
using integration by parts
}
)
sin n2π
sin n · 0
1
2π
−0·
− ·0
n
n
n
(
)
1
1
(0 − 0) − · 0
, see Trig
2π
n
1
2π
(
0.
JJ
II
J
I
Back
Solutions to exercises
56
STEP THREE
bn
=
=
=
1
π
Z
2π
f (x) sin nx dx =
0
1
π
Z
0
2π
x
2
sin nx dx
2π
1
2π
Z
1
2π
( 2π Z 2π )
− cos nx
− cos nx
x
−
dx
n
n
0
0
|
{z
}
1
2π
(
x sin nx dx
0
using integration by parts
=
−2π
cos(n2π)
2πn
1
= − cos(2nπ)
n
1
= −
, since 2n is even (see Trig)
n
Toc
JJ
II
J
I
Back
=
i.e. bn
)
1
1
(−2π cos n2π + 0) + · 0 , see Trig
n
n
Solutions to exercises
57
We now have
∞
a0 X
f (x) =
+
[an cos nx + bn sin nx]
2
n=1
where a0 = π, an = 0, bn = − n1
These Fourier coefficients give
f (x)
=
i.e. f (x)
=
Toc
∞ π X
1
+
0 − sin nx
2 n=1
n
π
1
1
− sin x + sin 2x + sin 3x + . . . .
2
2
3
JJ
II
J
I
Back
Solutions to exercises
58
c) Pick an appropriate value of x, to show that
π
4
Setting x =
π
2
=1−
gives f (x) =
1
3
π
4
+
1
5
JJ
1
7
+
1
9
− ...
and
π
=
4
π
=
4
1 1 1 1
1 − + − + − ...
=
3 5 7 9
1 1 1 1
i.e. 1 − + − + − . . . =
3 5 7 9
Toc
−
II
π
1
1
− 1 + 0 − + 0 + + 0 − ...
2
3
5
π
1 1 1 1
− 1 − + − + − ...
2
3 5 7 9
π
4
π
.
4
Return to Exercise 4
J
I
Back
Solutions to exercises
59
Exercise 5.
π−x , 0<x<π
f (x) =
0
, π < x < 2π, and has period 2π
a) Sketch a graph of f (x) in the interval −2π < x < 2π
f(x )
π
−2π
Toc
−π
JJ
0
II
π
J
I
2π
x
Back
Solutions to exercises
60
b) Fourier series representation of f (x)
STEP ONE
a0
=
=
i.e. a0
Toc
1
π
Z
1
π
Z
f (x) dx
0
π
1
(π − x) dx +
π
0
π
1
πx − x2 + 0
2
0
2
π
π2 −
−0
2
=
1
π
=
1
π
=
π
.
2
JJ
2π
II
J
Z
2π
0 · dx
π
I
Back
Solutions to exercises
61
STEP TWO
an
=
=
i.e. an
=
1
π
Z
2π
f (x) cos nx dx
0
Z
Z
1 π
1 2π
(π − x) cos nx dx +
0 · dx
π 0
π π
π Z π
sin nx
sin nx
1
(π − x)
−
(−1) ·
dx +0
π
n
n
0
0
|
{z
}
using integration by parts
=
=
=
i.e. an
=
Toc
Z π
1
sin nx
(0 − 0) +
dx
, see Trig
π
n
0
π
1 − cos nx
πn
n
0
1
− 2 (cos nπ − cos 0)
πn
1
− 2 ((−1)n − 1) , see Trig
πn
JJ
II
J
I
Back
Solutions to exercises
i.e. an
62
=


0
, n even

2
πn2
, n odd
STEP THREE
bn
=
=
Z
1
π
Z
2π
f (x) sin nx dx
0
π
Z
2π
(π − x) sin nx dx +
0
0 · dx
π
cos nx iπ Z π
cos nx (π − x) −
−
(−1) · −
dx + 0
n
n
0
0
π 1 1 =
0− −
− · 0 , see Trig
π
n
n
1
=
.
n
Toc
JJ
II
J
I
Back
=
i.e. bn
1
π
1
π
h
Solutions to exercises
In summary, a0 =
π
2
63
and a table of other Fourier cofficients is
n
an =
2
πn2
bn =
1
n
∴ f (x) =
(when n is odd)
1
2
3
4
5
2
π
0
2 1
π 32
0
2 1
π 52
1
1
2
1
3
1
4
1
5
∞
X
a0
+
[an cos nx + bn sin nx]
2
n=1
π
2
2 1
2 1
+ cos x +
cos 3x +
cos 5x + . . .
4
π
π 32
π 52
1
1
1
+ sin x + sin 2x + sin 3x + sin 4x + . . .
2
3
4
π
2
1
1
i.e. f (x) =
+
cos x + 2 cos 3x + 2 cos 5x + . . .
4
π
3
5
1
1
1
+ sin x + sin 2x + sin 3x + sin 4x + . . .
2
3
4
Toc
JJ
II
J
I
Back
=
Solutions to exercises
64
π2
8
c) To show that
=1+
1
32
+
1
52
+ ... ,
note that, as x → 0 , the series converges to the half-way value of
and then
π
π
=
2
4
+
+
giving
Toc
π
2
π
4
π2
8
JJ
=
=
=
π
2,
1
1
cos
0
+
cos
0
+
.
.
.
32
52
1
1
sin 0 + sin 0 + sin 0 + . . .
2
3
π
2
1
1
+
1 + 2 + 2 + ... + 0
4
π
3
5
2
1
1
1 + 2 + 2 + ...
π
3
5
1
1
1 + 2 + 2 + ...
3
5
Return to Exercise 5
2
π
II
cos 0 +
J
I
Back
Solutions to exercises
65
Exercise 6.
f (x) = x, over the interval −π < x < π and has period 2π
a) Sketch a graph of f (x) in the interval −3π < x < 3π
π
−3π
−2π
−π
f(x )
x
π
0
2π
3π
−π
Toc
JJ
II
J
I
Back
Solutions to exercises
66
b) Fourier series representation of f (x)
STEP ONE
a0
=
=
=
=
i.e. a0
Toc
JJ
=
II
1
π
Z
1
π
Z
π
f (x) dx
−π
π
x dx
−π
π
1 x2
π 2 −π
1 π2
π2
−
π 2
2
0.
J
I
Back
Solutions to exercises
67
STEP TWO
an
=
=
=
Z
1 π
f (x) cos nx dx
π −π
Z π
1
x cos nx dx
π −π
(
π
)
Z π 1
sin nx
sin nx
x
−
dx
π
n
n
−π
−π
|
{z
}
using integration by parts
Z
1 1
1 π
(π sin nπ − (−π) sin(−nπ)) −
sin nx dx
π n
n −π
1 1
1
(0 − 0) − · 0 ,
π n
n
Z
since sin nπ = 0 and
sin nx dx = 0,
i.e. an
=
=
2π
i.e. an
=
0.
Toc
JJ
II
J
I
Back
Solutions to exercises
STEP THREE
bn
=
=
=
=
=
=
=
i.e. bn
=
Toc
Z
1 π
f (x) sin nx dx
π −π
Z π
1
x sin nx dx
π −π
(
π
)
Z π 1
−x cos nx
− cos nx
−
dx
π
n
n
−π
−π
Z
1
1
1 π
π
cos nx dx
− [x cos nx]−π +
π
n
n −π
1
1
1
− (π cos nπ − (−π) cos(−nπ)) + · 0
π
n
n
π
−
(cos nπ + cos nπ)
nπ
1
− (2 cos nπ)
n
2
− (−1)n .
n
JJ
II
J
I
Back
68
Solutions to exercises
69
We thus have
f (x)
=
∞
i
a0 X h
an cos nx + bn sin nx
+
2
n=1
with a0 = 0, an = 0, bn = − n2 (−1)n
and
n
1
2
bn
2 −1
3
2
3
Therefore
f (x)
i.e. f (x)
= b1 sin x + b2 sin 2x + b3 sin 3x + . . .
1
1
= 2 sin x − sin 2x + sin 3x − . . .
2
3
and we have found the required Fourier series.
Toc
JJ
II
J
I
Back
Solutions to exercises
70
c) Pick an appropriate value of x, to show that
π
4
=1−
1
3
+
1
5
−
1
7
+ ...
Setting x = π2 gives f (x) = π2 and
π
π 1
2π 1
3π 1
4π 1
5π
= 2 sin − sin
+ sin
− sin
+ sin
− ...
2
2
2
2
3
2
4
2
5
2
This gives
π
=
2
π
=
2
π
i.e.
=
4
1
1
1
2 1 + 0 + · (−1) − 0 + · (1) − 0 + · (−1) + . . .
3
5
7
1 1 1
2 1 − + − + ...
3 5 7
1 1 1
1 − + − + ...
3 5 7
Return to Exercise 6
Toc
JJ
II
J
I
Back
Solutions to exercises
71
Exercise 7.
f (x) = x2 , over the interval −π < x < π and has period 2π
a) Sketch a graph of f (x) in the interval −3π < x < 3π
f(x )
π
2
−3π
Toc
−2π
JJ
−π
II
π
0
J
2π
I
3π
x
Back
Solutions to exercises
72
b) Fourier series representation of f (x)
STEP ONE
1
a0 =
π
Z
π
f (x)dx =
−π
=
=
=
i.e. a0
Toc
JJ
II
=
1
π
Z
π
x2 dx
−π
π
1 x3
π 3 −π
1 π3
π3
− −
π 3
3
1 2π 3
π
3
2π 2
.
3
J
I
Back
Solutions to exercises
73
STEP TWO
an
=
=
=
Z
1 π
f (x) cos nx dx
π −π
Z π
1
x2 cos nx dx
π −π
(
π
)
Z π
1
sin
nx
sin
nx
2x
x2
−
dx
π
n
n
−π
−π
|
{z
}
using integration by parts
=
=
=
)
Z
2 π
1 2
2
x sin nx dx
π sin nπ − π sin(−nπ) −
n
n −π
)
(
Z
1 1
2 π
x sin nx dx , see Trig
(0 − 0) −
π n
n −π
Z π
−2
x sin nx dx
nπ −π
1
π
(
Toc
JJ
II
J
I
Back
Solutions to exercises
i.e. an
74
−2
nπ
( π
)
Z π − cos nx
− cos nx
x
−
dx
n
n
−π
−π
|
{z
}
=
−2
nπ
(
=
−2
nπ
=
−2
nπ
=
−2
nπ
=
using integration by parts again
Toc
)
Z
1
1 π
π
− [x cos nx]−π +
cos nx dx
n
n −π
)
(
1
1
−
π cos nπ − (−π) cos(−nπ) + · 0
n
n
(
)
1
−
π(−1)n + π(−1)n
n
(
)
−2π
(−1)n
n
JJ
II
J
I
Back
Solutions to exercises
i.e. an
75
(
=
−2
nπ
=
+4π
(−1)n
πn2
=
4
(−1)n
n2
(
i.e. an =
2π
−
(−1)n
n
4
n2
, n even
−4
n2
, n odd.
Toc
JJ
)
II
J
I
Back
Solutions to exercises
76
STEP THREE
bn
=
=
π
Z
1 π 2
f (x) sin nx dx =
x sin nx dx
π −π
−π
( π
)
Z π
1
−
cos
nx
−
cos
nx
x2
−
2x ·
dx
π
n
n
−π
−π
|
{z
}
1
π
Z
1
π
(
using integration by parts
=
=
=
π
2
1 2
x cos nx −π +
−
n
n
Z
)
π
x cos nx dx
−π
)
Z π
1 2
2
−
π cos nπ − π 2 cos(−nπ) +
x cos nx dx
n
n −π
)
(
Z
2 π
1
1 2
2
−
π cos nπ − π cos(nπ) +
x cos nx dx
π
n|
{z
} n −π
1
π
(
=0
=
2
πn
Z
Toc
π
x cos nx dx
−π
JJ
II
J
I
Back
Solutions to exercises
i.e. bn
=
2
πn
77
(
sin nx
x
n
|
=
=
=
i.e. bn
=
2
πn
π
Z
π
−
−π
−π
{z
)
sin nx
dx
n
}
using integration by parts
(
1
1
(π sin nπ − (−π) sin(−nπ)) −
n
n
(
)
Z
2 1
1 π
sin nx dx
(0 + 0) −
πn n
n −π
Z
−2 π
sin nx dx
πn2 −π
Z
)
π
sin nx dx
−π
0.
Toc
JJ
II
J
I
Back
Solutions to exercises
78
∞
a0 X
+
[an cos nx + bn sin nx]
2
n=1
(
4
, n even
2π 2
n2
a0 = 3 ,
an =
,
−4
, n odd
n2
∴ f (x) =
where
n
an
1
i.e. f (x) =
2
2π 2
3
1
2
−4(1) 4
1
22
3
−4
bn = 0
4
1
32
4
1
42
1
1
1
− 4 cos x − 2 cos 2x + 2 cos 3x − 2 cos 4x . . .
2
3
4
+ [0 + 0 + 0 + . . .]
π2
1
1
1
i.e. f (x) =
− 4 cos x − 2 cos 2x + 2 cos 3x − 2 cos 4x + . . . .
3
2
3
4
Toc
JJ
II
J
I
Back
Solutions to exercises
79
π2
6
= 1 + 212 + 312 + 412 + . . . ,
(
1 , n even
use the fact that cos nπ =
−1 , n odd
c) To show that
cos x −
1
22
cos 2x +
1
32
cos 3x −
1
42
cos 4x + . . . with x = π
gives cos π −
1
22
cos 2π +
1
32
cos 3π −
1
42
cos 4π + . . .
1
32
· (−1) −
i.e.
i.e.
(−1) −
i.e.
−1 −
1
22
· (1) +
1
22
1
32
−
−
1
42
· (1) + . . .
1
42
+...
1
1
1
= −1 · 1 + 2 + 2 + 2 + . . .
2
3
4
|
{z
}
(the desired series)
Toc
JJ
II
J
I
Back
Solutions to exercises
80
The graph of f (x) gives that f (π) = π 2 and the series converges to
this value.
Setting x = π in the Fourier series thus gives
π2
1
1
1
2
π =
− 4 cos π − 2 cos 2π + 2 cos 3π − 2 cos 4π + . . .
3
2
3
4
2
π
1
1
1
π2 =
− 4 −1 − 2 − 2 − 2 − . . .
3
2
3
4
π2
1
1
1
2
+ 4 1 + 2 + 2 + 2 + ...
π =
3
2
3
4
2
2π
1
1
1
= 4 1 + 2 + 2 + 2 + ...
3
2
3
4
π2
1
1
1
i.e.
= 1 + 2 + 2 + 2 + ...
6
2
3
4
Return to Exercise 7
Toc
JJ
II
J
I
Back
Download