Professional Documents
Culture Documents
Fourier Series Tutorial PDF
Fourier Series Tutorial PDF
FOURIER SERIES
Graham S McDonald
● Table of contents
● Begin Tutorial
c 2004 g.s.mcdonald@salford.ac.uk
Table of contents
1. Theory
2. Exercises
3. Answers
4. Integrals
5. Useful trig results
6. Alternative notation
7. Tips on using solutions
Full worked solutions
Section 1: Theory 3
1. Theory
f(x )
P E R IO D = L
Toc JJ II J I Back
Section 1: Theory 4
where symbols with subscript 1 are constants that determine the am-
plitude and phase of this first approximation
Here, symbols with subscripts are constants that determine the am-
plitude and phase of each harmonic contribution
Toc JJ II J I Back
Section 1: Theory 5
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
F u n d a m e n ta l + 5 h a rm o n ic s P E R IO D = L
F u n d a m e n ta l + 2 0 h a rm o n ic s
Toc JJ II J I Back
Section 1: Theory 6
a1 cos x , b1 sin x
a2 cos 2x , b2 sin 2x
a3 cos 3x , b3 sin 3x
Toc JJ II J I Back
Section 1: Theory 7
Toc JJ II J I Back
Section 1: Theory 8
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 < π .
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
Exercise 2.
Let f (x) be a function of period 2π such that
0, −π < x < 0
f (x) =
x, 0 < x < π .
Exercise 3.
Let f (x) be a function of period 2π such that
x, 0 < x < π
f (x) =
π, π < x < 2π .
b) Show that the Fourier series for f (x) in the interval 0 < x < 2π is
3π 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
π 1 1 1 π2 1 1 1
(i) 4 = 1− 3 + 5 − 7 +... and (ii) 8 = 1+ 32 + 52 + 72 +...
Exercise 4.
Let f (x) be a function of period 2π such that
x
f (x) = over the interval 0 < x < 2π.
2
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
Exercise 5.
Let f (x) be a function of period 2π such that
π − x, 0 < x < π
f (x) =
0, π < x < 2π
b) Show that the Fourier series for f (x) in the interval 0 < x < 2π is
π 2 1 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
Exercise 6.
Let f (x) be a function of period 2π such that
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
Exercise 7.
Let f (x) be a function of period 2π such that
b) Show that the Fourier series for f (x) in the interval −π < x < π is
π2
1 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
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
Toc JJ II J I Back
Section 4: Integrals 17
4. Integrals
R b dv b Rb du
Formula for integration by parts: a u dx dx = [uv]a − a dx v dx
R R
f (x) f (x)dx f (x) f (x)dx
xn+1 n [g(x)]n+1
xn n+1 (n 6= −1) [g (x)] g 0 (x) n+1 (n 6= −1)
0
1 g (x)
x ln |x| g(x) ln |g (x)|
x ax
e ex ax
ln a (a > 0)
sin x − cos x sinh x cosh x
cos x sin x cosh x sinh x
tan x − ln
|cos x| tanh x ln cosh x
cosec x ln tan x2 cosech x ln tanh x2
sec x ln |sec x + tan x| sech x 2 tan−1 ex
sec2 x tan x sech2 x tanh x
cot x ln |sin x| coth x ln |sinh x|
sin2 x x
2 −
sin 2x
4 sinh2 x sinh 2x
4 − x2
cos2 x x
2 +
sin 2x
4 cosh2 x sinh 2x
4 + x2
Toc JJ II J I Back
Section 4: Integrals 18
R R
f (x) f (x) dx f (x) f (x) dx
1 1
tan−1 x 1 1 a+x
a2 +x2 a a a2 −x2 2a ln a−x (0 < |x| < a)
1 1 x−a
(a > 0) x2 −a2 2a ln x+a (|x| > a > 0)
√
2 2
√ 1 sin−1 x √ 1 ln x+ aa +x (a > 0)
a2 −x2 a a2 +x2
√
2 2
(−a < x < a) √ 1 ln x+ xa −a (x > a > 0)
x2 −a2
√ a2
√ a2
h √ i
sinh−1 x a2 +x2
−1 x
x
a2 − x2 2 sin a a2 +x2 2 a + a2
√ i √ h √ i
a2
a2 −x2
− cosh−1
2 2
+x x
+ x xa2−a
a2 x2 −a2 2 a
Toc JJ II J I Back
Section 5: Useful trig results 19
● sin nπ = 0 x
−3π −2π −π 0 π 2π 3π
−1
c o s(x )
1
● cos nπ = (−1)n x
−3π −2π −π 0 π 2π 3π
−1
Toc JJ II J I Back
Section 5: Useful trig results 20
s in (x ) c o s(x )
1 1
x x
−3π −2π −π 0 π 2π 3π −3π −2π −π 0 π 2π 3π
−1 −1
0 , n even 0 , n odd
π π
● sin n = 1 , n = 1, 5, 9, ... ● cos n = 1 , n = 0, 4, 8, ...
2 2
−1 , n = 3, 7, 11, ... −1 , n = 2, 6, 10, ...
Toc JJ II J I Back
Section 6: Alternative notation 21
6. Alternative notation
2π
● For a waveform f (x) with period L = k
∞
a0 X
f (x) = + [an cos nkx + bn sin nkx]
2 n=1
The corresponding Fourier coefficients are
Z
STEP ONE 2
a0 = f (x) dx
L
L
Z
STEP TWO 2
an = f (x) cos nkx dx
L
L
Z
STEP THREE 2
bn = f (x) sin nkx dx
L
L
and integrations are over a single interval in x of L
Toc JJ II J I Back
Section 6: Alternative notation 22
Toc JJ II J I Back
Section 6: Alternative notation 23
2π
● For a waveform f (t) with period T = ω
∞
a0 X
f (t) = + [an cos nωt + bn sin nωt]
2 n=1
The corresponding Fourier coefficients are
Z
STEP ONE 2
a0 = f (t) dt
T
T
Z
STEP TWO 2
an = f (t) cos nωt dt
T
T
Z
STEP THREE 2
bn = f (t) sin nωt dt
T
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
● 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
f(x )
1
−2π −π 0 π 2π
x
Toc JJ II J I Back
Solutions to exercises 26
STEP ONE
π 0
1 π
Z Z Z
1 1
a0 = f (x)dx = f (x)dx + f (x)dx
π −π π −π π 0
1 0 1 π
Z Z
= 1 · dx + 0 · dx
π −π π 0
1 0
Z
= dx
π −π
1 0
= [x]
π −π
1
= (0 − (−π))
π
1
= · (π)
π
i.e. a0 = 1 .
Toc JJ II J I Back
Solutions to exercises 27
STEP TWO
Z π Z 0 Z π
1 1 1
an = f (x) cos nx dx = f (x) cos nx dx + f (x) cos nx dx
π −π π −π π 0
Z 0 Z π
1 1
= 1 · cos nx dx + 0 · cos nx dx
π −π π 0
Z 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
i.e. an = (0 + 0) = 0.
nπ
Toc JJ II J I Back
Solutions to exercises 28
STEP THREE
Z π
1
bn = f (x) sin nx dx
π −π
Z 0 Z π
1 1
= f (x) sin nx dx + f (x) sin nx dx
π −π π 0
Z 0 Z π
1 1
= 1 · sin nx dx + 0 · sin nx dx
π −π π 0
0 0
1 − cos nx
Z
1
i.e. bn = 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 n 1 , n even
i.e. bn = 2 , since (−1) =
− nπ , n odd −1 , n odd
Toc JJ II J I Back
Solutions to exercises 29
n 1 2 3 4 5
bn − π2 0 − π2 13 0 − π2 15
Toc JJ II J I Back
Solutions to exercises 30
π 1 1 1
4 =1− 3 + 5 − 7 + ...
π
The first condition of sin x = 1 suggests trying x = 2.
Toc JJ II J I Back
Solutions to exercises 31
π
Picking x = 2 thus gives
h
0 = 21 − π2 sin π2 + 1
3 sin 3π
2 +
1
5 sin 5π
2 i
1
+ 7 sin 7π
2 + ...
h
1 2 1 1
i.e. 0 = 2 − π 1 − 3 + 5 i
1
− 7 + ...
Toc JJ II J I Back
Solutions to exercises 32
Exercise 2.
0, −π < x < 0
f (x) =
x, 0 < x < π, and has period 2π
f(x )
π
−3π −2π −π π 2π 3π
x
Toc JJ II J I Back
Solutions to exercises 33
STEP ONE
Z π Z 0 Z π
1 1 1
a0 = f (x)dx = f (x)dx + f (x)dx
π −π π −π π 0
Z 0 Z π
1 1
= 0 · dx + x dx
π −π π 0
π
1 x2
=
π 2 0
1 π2
= −0
π 2
π
i.e. a0 = .
2
Toc JJ II J I Back
Solutions to exercises 34
STEP TWO
Z π Z 0 Z π
1 1 1
an = f (x) cos nx dx = f (x) cos nx dx + f (x) cos nx dx
π −π π −π π 0
Z 0 Z π
1 1
=0 · cos nx dx + x cos nx dx
−π π π 0
Z π π Z π
1 1 sin nx sin nx
i.e. an = x cos nx dx = x − dx
π 0 π n 0 0 n
(using integration by parts)
1 sin nπ 1 h cos nx iπ
i.e. an = π −0 − −
π n n n 0
1 1
= ( 0 − 0) + 2 [cos nx]π0
π n
1 1
= 2
{cos nπ − cos 0} = 2
{(−1)n − 1}
πn
πn
0 , n even
i.e. an = , see Trig.
− πn2 2 , n odd
Toc JJ II J I Back
Solutions to exercises 35
STEP THREE
π 0
1 π
Z Z Z
1 1
bn = f (x) sin nx dx = f (x) sin nx dx + f (x) sin nx dx
π −π π −π π 0
1 0 1 π
Z Z
= 0 · sin nx dx + x sin nx dx
π −π π 0
Z π Z π
1 1 h cos nx iπ cos nx
i.e. bn = x sin nx dx = x − − − dx
π 0 π n 0 0 n
(using integration by parts)
1 π
Z
1 1 π
= − [x cos nx]0 + cos nx dx
π n n 0
π
1 1 1 sin nx
= − (π cos nπ − 0) +
π n n n 0
1 1
= − (−1)n + (0 − 0), see Trig
n πn2
1
= − (−1)n
n
Toc JJ II J I Back
Solutions to exercises 36
− n1
(
, n even
i.e. bn =
+ n1 , n odd
We now have
∞
a0 X
f (x) = + [an cos nx + bn sin nx]
2 n=1
− n1
( (
π 0 , n even , n even
where a0 = , an = , bn =
2 − πn2 2 , n odd 1
, n odd
n
n 1 2 3 4 5
an − π2 0 − π2 · 1
32 0 − π2 · 1
52
bn 1 − 12 1
3 − 14 1
5
Toc JJ II J I Back
Solutions to exercises 37
Toc JJ II J I Back
Solutions to exercises 38
π 1 1 1
(i) 4 =1− 3 + 5 − 7 + ...
Toc JJ II J I Back
Solutions to exercises 39
π π
The graph of f (x) shows that f 2 = 2, so that
π π 1 1 1
= + 1 − + − + ...
2 4 3 5 7
π 1 1 1
i.e. = 1 − + − + ...
4 3 5 7
Toc JJ II J I Back
Solutions to exercises 40
π2 1 1 1
(ii) 8 =1+ 32 + 52 + 72 + ...
Picking x = 0 gives
sin x = sin 2x = sin 3x = 0 and cos x = cos 3x = cos 5x = 1
Toc JJ II J I Back
Solutions to exercises 41
2 1 1 1 π
1 + 2 + 2 + 2 + ... =
π 3 5 7 4
1 1 1 π2
and 1 + 2 + 2 + 2 + ... = .
3 5 7 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π
f(x )
π
−2π −π 0 π 2π
x
Toc JJ II J I Back
Solutions to exercises 43
STEP ONE
2π π
1 2π
Z Z Z
1 1
a0 = f (x)dx = f (x)dx + f (x)dx
π 0 π 0 π π
1 π 1 2π
Z Z
= xdx + π · dx
π 0 π π
π 2π
1 x2 π
= + x
π 2 0 π π
2
1 π
= − 0 + 2π − π
π 2
π
= +π
2
3π
i.e. a0 = .
2
Toc JJ II J I Back
Solutions to exercises 44
STEP TWO
Z 2π
1
an = f (x) cos nx dx
π 0
Z π Z 2π
1 1
= x cos nx dx + π · cos nx dx
π 0 π π
" π # 2π
Z π
1 sin nx sin nx π sin nx
= x − dx +
π n 0 0 n π n π
| {z }
using integration by parts
" π #
1 1 − cos nx
= π sin nπ − 0 · sin n0 −
π n n2 0
1
+ (sin n2π − sin nπ)
n
Toc JJ II J I Back
Solutions to exercises 45
" #
1 1 cos nπ cos 0 1
i.e. an = 0−0 + − 2 + 0−0
π n n2 n n
1
= (cos nπ − 1), see Trig
n2 π
1
(−1)n − 1 ,
= 2
n π
− n22 π , n odd
(
i.e. an =
0 , n even.
Toc JJ II J I Back
Solutions to exercises 46
STEP THREE
Z 2π
1
bn = f (x) sin nx dx
π 0
Z π Z 2π
1 1
= x sin nx dx + π · sin nx dx
π 0 π π
" # 2π
1 h cos nx iπ Z π − cos nx
π − cos nx
= x − − dx +
π n 0 0 n π n π
| {z }
using integration by parts
" π #
1 −π 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 + 1 − (−1)n
= 0 −
n n
Toc JJ II J I Back
Solutions to exercises 47
1 1 1
i.e. bn = − (−1)n − + (−1)n
n n n
1
i.e. bn = − .
n
We now have
∞
a0 X
f (x) = + [an cos nx + bn sin nx]
2 n=1
(
3π 0 , n even
where a0 = 2 , an = , bn = − n1
− n22 π , n odd
n 1 2 3 4 5
an − π2 0 − π2 312 0 − π2 512
bn −1 − 21 − 13 − 14 − 15
Toc JJ II J I Back
Solutions to exercises 48
h i
1 3π 2 1
f (x) = 2 2 + − π cos x + 0 · cos 2x + 32 cos 3x + . . .
h i
1 1
+ −1 sin x + 2 sin 2x + 3 sin 3x + . . .
h i
3π 2 1 1
i.e. f (x) = 4 − π cos x + 32 cos 3x + 52 cos 5x + . . .
h i
1 1
− sin x + 2 sin 2x + 3 sin 3x + . . .
Toc JJ II J I Back
Solutions to exercises 49
π 1 1 1
(i) 4 =1− 3 + 5 − 7 + ...
This gives
π 3π 2
cos π2 + 1
cos 3 π2 + 1
cos 5 π2 + . . .
2 = 4 − π 32 52
sin π2 + 1
sin 2 π2 + 1
sin 3 π2 + 1
sin 4 π2 + 1
sin 5 π2 + . . .
− 2 3 4 5
Toc JJ II J I Back
Solutions to exercises 50
and
π 3π 2
2 = 4 − π [0 + 0 + 0 + . . .]
1 1 1 1
− (1) + 2 · (0) + 3 · (−1) + 4 · (0) + 5 · (1) + . . .
then
π 3π 1 1 1
2 = 4 − 1− 3 + 5 − 7 + ...
1 1 1 3π π
1− 3 + 5 − 7 + ... = 4 − 2
1 1 1 π
1− 3 + 5 − 7 + ... = 4, as required.
To show that
π2 1 1 1
(ii) 8 =1+ 32 + 52 + 72 + ... ,
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
Return to Exercise 3
Toc JJ II J I Back
Solutions to exercises 53
Exercise 4.
f(x )
π
0 π 2π 3π 4π
x
Toc JJ II J I Back
Solutions to exercises 54
STEP ONE
Z 2π
1
a0 = f (x) dx
π 0
Z 2π
1 x
= dx
π 0 2
2 2π
1 x
=
π 4 0
(2π)2
1
= −0
π 4
i.e. a0 = π.
Toc JJ II J I Back
Solutions to exercises 55
STEP TWO
Z 2π
1
an = f (x) cos nx dx
π 0
Z 2π
1 x
= cos nx dx
π 0 2
( 2π )
Z 2π
1 sin nx 1
= x − sin nx dx
2π n 0 n 0
| {z }
using integration by parts
( )
1 sin n2π sin n · 0 1
= 2π −0· − ·0
2π n n n
( )
1 1
= (0 − 0) − · 0 , see Trig
2π n
i.e. an = 0.
Toc JJ II J I Back
Solutions to exercises 56
STEP THREE
Z 2π Z 2π
1 1 x
bn = f (x) sin nx dx = sin nx dx
π 0 π 0 2
Z 2π
1
= x sin nx dx
2π 0
( 2π Z 2π )
1 − cos nx − cos nx
= x − dx
2π n 0 0 n
| {z }
using integration by parts
( )
1 1 1
= (−2π cos n2π + 0) + · 0 , see Trig
2π n n
−2π
= cos(n2π)
2πn
1
= − cos(2nπ)
n
1
i.e. bn = − , since 2n is even (see Trig)
n
Toc JJ II J I Back
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
∞
π X 1
f (x) = + 0 − sin nx
2 n=1 n
π 1 1
i.e. f (x) = − sin x + sin 2x + sin 3x + . . . .
2 2 3
Toc JJ II J I Back
Solutions to exercises 58
π 1 1 1 1
4 =1− 3 + 5 − 7 + 9 − ...
π π
Setting x = 2 gives f (x) = 4 and
π π 1 1
= − 1 + 0 − + 0 + + 0 − ...
4 2 3 5
π π 1 1 1 1
= − 1 − + − + − ...
4 2 3 5 7 9
1 1 1 1 π
1 − + − + − ... =
3 5 7 9 4
1 1 1 1 π
i.e. 1 − + − + − . . . = .
3 5 7 9 4
Return to Exercise 4
Toc JJ II J I Back
Solutions to exercises 59
Exercise 5.
π−x , 0<x<π
f (x) =
0 , π < x < 2π, and has period 2π
f(x )
π
−2π −π 0 π 2π
x
Toc JJ II J I Back
Solutions to exercises 60
STEP ONE
Z 2π
1
a0 = f (x) dx
π 0
Z π Z 2π
1 1
= (π − x) dx + 0 · dx
π 0 π π
π
1 1
= πx − x2 + 0
π 2 0
2
1 π
= π2 − −0
π 2
π
i.e. a0 = .
2
Toc JJ II J I Back
Solutions to exercises 61
STEP TWO
Z 2π
1
an = f (x) cos nx dx
π 0
1 π 1 2π
Z Z
= (π − x) cos nx dx + 0 · dx
π 0 π π
π Z π
1 sin nx sin nx
i.e. an = (π − x) − (−1) · dx +0
π n 0 0 n
| {z }
using integration by parts
Z π
1 sin nx
= (0 − 0) + dx , see Trig
π 0 n
π
1 − cos nx
=
πn n 0
1
= − 2 (cos nπ − cos 0)
πn
1
i.e. an = − 2 ((−1)n − 1) , see Trig
πn
Toc JJ II J I Back
Solutions to exercises 62
0 , n even
i.e. an =
2
, n odd
πn2
STEP THREE
Z 2π
1
bn = f (x) sin nx dx
π 0
Z π Z 2π
1
= (π − x) sin nx dx + 0 · dx
π 0 π
1
h cos nx iπ Z π cos nx
= (π − x) − − (−1) · − dx + 0
π n 0 0 n
π 1
1
= 0− − − · 0 , see Trig
π n n
1
i.e. bn = .
n
Toc JJ II J I Back
Solutions to exercises 63
π
In summary, a0 = 2 and a table of other Fourier cofficients is
n 1 2 3 4 5
2 2 2 1 2 1
an = πn2 (when n is odd) π 0 π 32 0 π 52
1 1 1 1 1
bn = n 1 2 3 4 5
∞
a0 X
∴ f (x) = + [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 1 1
c) To show that 8 =1+ 32 + 52 + ... ,
π
note that, as x → 0 , the series converges to the half-way value of 2,
π π 2 1 1
and then = + cos 0 + cos 0 + cos 0 + . . .
2 4 π 32 52
1 1
+ sin 0 + sin 0 + sin 0 + . . .
2 3
π π 2 1 1
= + 1 + 2 + 2 + ... + 0
2 4 π 3 5
π 2 1 1
= 1 + 2 + 2 + ...
4 π 3 5
π2 1 1
giving = 1 + 2 + 2 + ...
8 3 5
Return to Exercise 5
Toc JJ II J I Back
Solutions to exercises 65
Exercise 6.
f(x )
π
x
−3π −2π −π 0 π 2π 3π
−π
Toc JJ II J I Back
Solutions to exercises 66
STEP ONE
Z π
1
a0 = f (x) dx
π −π
Z π
1
= x dx
π −π
π
1 x2
=
π 2 −π
1 π2 π2
= −
π 2 2
i.e. a0 = 0.
Toc JJ II J I Back
Solutions to exercises 67
STEP TWO
1 π
Z
an = 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
1 π
Z
1 1
i.e. an = (π 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,
2π
i.e. an = 0.
Toc JJ II J I Back
Solutions to exercises 68
STEP THREE
1 π
Z
bn = f (x) sin nx dx
π −π
Z π
1
= x sin nx dx
π −π
( π Z π )
1 −x cos nx − cos nx
= − dx
π n −π −π n
1 π
Z
1 1 π
= − [x cos nx]−π + cos nx dx
π n n −π
1 1 1
= − (π cos nπ − (−π) cos(−nπ)) + · 0
π n n
π
= − (cos nπ + cos nπ)
nπ
1
= − (2 cos nπ)
n
2
i.e. bn = − (−1)n .
n
Toc JJ II J I Back
Solutions to exercises 69
We thus have
∞
a0 X h i
f (x) = + an cos nx + bn sin nx
2 n=1
with a0 = 0, an = 0, bn = − n2 (−1)n
and
n 1 2 3
2
bn 2 −1 3
Therefore
f (x) = b1 sin x + b2 sin 2x + b3 sin 3x + . . .
1 1
i.e. f (x) = 2 sin x − sin 2x + sin 3x − . . .
2 3
Toc JJ II J I Back
Solutions to exercises 70
π 1 1 1
4 =1− 3 + 5 − 7 + ...
This gives
π 1 1 1
= 2 1 + 0 + · (−1) − 0 + · (1) − 0 + · (−1) + . . .
2 3 5 7
π 1 1 1
= 2 1 − + − + ...
2 3 5 7
π 1 1 1
i.e. = 1 − + − + ...
4 3 5 7
Return to Exercise 6
Toc JJ II J I Back
Solutions to exercises 71
Exercise 7.
f(x )
π
2
−3π −2π −π 0 π 2π 3π
x
Toc JJ II J I Back
Solutions to exercises 72
STEP ONE
Z π Z π
1 1
a0 = f (x)dx = x2 dx
π −π π −π
π
1 x3
=
π 3 −π
1 π3 π3
= − −
π 3 3
1 2π 3
=
π 3
2π 2
i.e. a0 = .
3
Toc JJ II J I Back
Solutions to exercises 73
STEP TWO
1 π
Z
an = f (x) cos nx dx
π −π
Z π
1
= x2 cos nx dx
π −π
( π Z π )
1 sin nx sin nx
= x2 − 2x dx
π n −π −π n
| {z }
using integration by parts
( )
2 π
Z
1 1 2 2
= π sin nπ − π sin(−nπ) − x sin nx dx
π n n −π
( )
2 π
Z
1 1
= (0 − 0) − x sin nx dx , see Trig
π n n −π
Z π
−2
= x sin nx dx
nπ −π
Toc JJ II J I Back
Solutions to exercises 74
( π Z π )
−2 − cos nx − cos nx
i.e. an = x − dx
nπ n −π −π n
| {z }
using integration by parts again
( )
−2 1 π
Z
1 π
= − [x cos nx]−π + cos nx dx
nπ n n −π
( )
−2 1 1
= − π cos nπ − (−π) cos(−nπ) + · 0
nπ n n
( )
−2 1
= − π(−1)n + π(−1)n
nπ n
( )
−2 −2π
= (−1)n
nπ n
Toc JJ II J I Back
Solutions to exercises 75
( )
−2 2π
i.e. an = − (−1)n
nπ n
+4π
= (−1)n
πn2
4
= (−1)n
n2
4
, n even
(
n2
i.e. an =
−4
n2 , n odd.
Toc JJ II J I Back
Solutions to exercises 76
STEP THREE
π
1 π 2
Z Z
1
bn = f (x) sin nx dx = x sin nx dx
π −π π −π
( π Z π )
1 − cos nx − cos nx
= x2 − 2x · dx
π n −π −π n
| {z }
using integration by parts
( )
Z π
1 1 2 π 2
= − x cos nx −π + x cos nx dx
π n n −π
( Z π )
1 1 2 2
π cos nπ − π 2 cos(−nπ) +
= − x cos nx dx
π n n −π
( )
2 π
Z
1 1 2 2
= − π cos nπ − π cos(nπ) + x cos nx dx
π n| {z } n −π
=0
Z π
2
= x cos nx dx
πn −π
Toc JJ II J I Back
Solutions to exercises 77
( π )
Z π
2 sin nx sin nx
i.e. bn = x − dx
πn n −π −π n
| {z }
using integration by parts
( )
Z π
2 1 1
= (π sin nπ − (−π) sin(−nπ)) − sin nx dx
πn n n −π
( )
1 π
Z
2 1
= (0 + 0) − sin nx dx
πn n n −π
−2 π
Z
= sin nx dx
πn2 −π
i.e. bn = 0.
Toc JJ II J I Back
Solutions to exercises 78
∞
a0 X
∴ f (x) = + [an cos nx + bn sin nx]
2 n=1
(
4
2π 2 n2 , n even
where a0 = 3 , an = −4 , bn = 0
n2 , n odd
n 1 2 3 4
1 1 1
an −4(1) 4 22 −4 32 4 42
2π 2
1 1 1 1
i.e. f (x) = − 4 cos x − 2 cos 2x + 2 cos 3x − 2 cos 4x . . .
2 3 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
c) To show that = 1 + 212 + 312 + 412 + . . . ,
6
(
1 , n even
use the fact that cos nπ =
−1 , n odd
1 1 1
i.e. cos x − 22 cos 2x + 32 cos 3x − 42 cos 4x + . . . with x = π
1 1 1
gives cos π − 22 cos 2π + 32 cos 3π − 42 cos 4π + . . .
1 1 1
i.e. (−1) − 22 · (1) + 32 · (−1) − 42 · (1) + . . .
1 1 1
i.e. −1 − 22 − 32 − 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.
Toc JJ II J I Back