Chapter 6
FOURIER SERIES
Focus of Attention
Definition of Fourier Series
How to find the coefficients of
the terms in a Fourier Series?
What are odd and even
functions?
What is a Fourier Sine series?
What is a Fourier Cosine series?
Recall:
Infinite Sequences a list of an
infinitely many numbers written in a
specific order using the notation {uk }
with k 1, 2,3,...n, n 1,... . Thus, u1
is the first term, u2 is the second term,
Fourier series
un is the nth term and
un 1 is the
(n+1)th term.
Infinite Series the summation of the
terms in a sequence, i.e.
u
k 1
u1 u2 u3 ... un un 1 ...
6.1Basic concepts
Why are Fourier Series important?
Fourier Series are important as it can
approximate discontinuous functions
and periodic functions.
Fourier series
Definition of Fourier series
A Fourier Series is an infinite series of
sine and cosine terms of the form
a0
a1 cos x a2 cos 2 x a3 cos 3 x ... an cos nx ... b1 sin x b2 sin 2 x b3 sin 3 x ...
2
bn sin nx ...
f ( x)
Terminology
a0
2
- constant term
a1 cos x b1 sin x. - fundamental components or
first harmonic
Remaining terms are called harmonics:
a2 cos 2 x b2 sin 2 x is called the
second harmonic
a3 cos 3 x b3 sin 3x is called the third
harmonic, etc..
Fourier series
A function f (x) is said to have period P if
f (x + P) = f (x) for all x.
The period of the function f (x) is the interval
between two successive repetitions.
Examples of Periodic Functions
1.
f(t)=sin t
For f(t)=sin t , we have: f(t)=f(t+2) . The
period is 2.
2. Saw tooth waveform, period =2.
Fourier series
For this function, we have:
f(t)=3t
(for 1 t < 1)
f(t)=f(t+2) [This expression indicates it is
periodic with period 2 .]
3.
Parabolic, period =2 .
For this function, we have:
f(t)=t 2 (for 0t<2 )
f(t)=f(t+2) [Indicating it is periodic with
period 2.]
Fourier series
4. Square wave, period = 4.
For this function, we have:
f(t)= 3 for 1t<1
3 for 1t<3
f(t)=f(t+4) [The period is 4.]
NOTE: In this example, the period p=4 . We
can write this as 2L=4.
A periodic waveform f (x) of period p=2L has
a Fourier Series given by:
With
Fourier series
a0
1
f ( x)dx
L L
Example 6.1a: Approximating a
sawtooth waveform
A sawtooth waveform is periodic and
the graph is given below, Figue 6.1a(i):
3
x
Fourier series
The sawtooth waveform can be
approximated by the series
2
1
y 2 sin t sin 2t sin 3t sin 4t .
3
4
See Figure 6.1a(ii).
Fourier series
3
2
1
-10
-5
5
x
10
-1
-2
-3
Figure 6.1a(ii)
However, if we take more terms then
the graph of the series will look more
and more like the sawtooth waveform,
see Figure 6.1a(iii).
2
1
2
1
2
1
y 2sin t sin 2t sin 3t sin 4t sin 5t sin 6t sin 7t sin8t
3
2
5
3
7
4
2
1
2
1
sin 9t sin10t sin11t sin12t ...
9
5
11
6
Fourier series
3
2
1
-10
-5
5
x
10
-1
-2
-3
Figure 6.1a(iii)
Example6.1b: Approximating a
discontinuous function
y cos x is a discontinuous function. It
can be approximated by the Fourier Series
2
2
2
y 1 cos 2 x cos 4 x .
3
15
Fourier series
10
However,
2
2
2
cos
2
x
cos
4
x
3
15
is a
continuous function and can be analysed
easily.
Figure 6.1b(i) is the graph of y cos x ,
meanwhile Figure 6.1b(ii) is the graph of
y
2
2
2
1 cos 2 x cos 4 x
3
15
1
0.8
0.6
0.4
y cos x
0.2
-4
-2
Figure 6.1b(i)
Fourier series
11
2
2
2
1 cos 2 x cos 4 x
3
15
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
-4
-2
Figure 6.1b(ii)
We can superimpose the two graphs and
see how the two graphs fit closely
Fourier series
12
0.8
0.6
0.4
0.2
-3
-2
-1
-0.2
Figure 6.1b(iii)
Thus we can now conclude that for a
specific number of terms,
y
2
2
2
cos
2
x
cos
4
x
can
3
15
approximate the behaviour of
Fourier series
y cos x
13
However, to begin with, we will be
focusing on finding the Fourier Series of
periodic functions of period
Fourier series
only.
14
6.2 Definition of Periodic Function
f ( x) is
periodic if
f ( x p ) f ( x)
for all real
numbers x. The smallest positive
number p is called the period of f.
So, if f ( x 2 ) f ( x) then the
function has a period of
Periods of Fourier series
If the terms a1 cos x b1 sin x has a
period
, this means that
The whole series repeat every
radians
Fourier series
15
Thus, we can study only one cycle:
(0, 2 ) or ( , ) as a
representative of the whole series.
Note: The Fourier Series is an infinite
series but we usually use only a few
terms for computation.
Fourier series
16
A periodic waveform f (x) of period
p=2L has a Fourier Series given by:
with
L
1
a0 f ( x)dx
L L
1
nx
a n f x cos
dx,
L L
L
L
1
nx
bn f x sin
dx,
L L
L
L
( n 1,2,3, ),
( n 1,2,3, ),
a0, an and bn are called the coefficients of f(x).
The interval L <x< L is the fundamental
interval.
Do example 6.1
Fourier series
17
6.3 Finding the coefficients of
Fourier Series:
Fourier series
18
A periodic function f ( x) defined on the
interval x , can be replaced
with the Fourier series
a
f ( x) 0 a1 cos x b1 sin x a2 cos 2 x b2 sin 2 x a3 cos3x ... an cos nx ...
2
b3 sin 3x ... an cos nx bn sin nx ...
Another way of representing the Fourier
Series is by using the notation for
summation:
a0
f ( x) an cos nx bn sin nx
2 n 1
where
f ( x)
is a periodic function
defined on the interval x and
n 1, 2,3,...
where
Fourier series
a0
f ( x)dx
(1)
19
an
bn
Fourier series
f ( x) cos nxdx
f ( x) sin nxdx
(2)
(3)
20
Example 2
Given the function,
f ( x ) x,
(a) If f ( x 2 ) f ( x) , sketch the
graph of the function for
3 x 3 .
(b) Find the first four terms of the
Fourier series expansion.
Solution:
(a) Sketch the basic graph
f ( x) x, x . Since f ( x) is
periodic, the basic graph is repeated
every 2 radians. So
Fourier series
21
f ( x) x, 3 x 3 looks like the
following:
3
x
(b) Find
a0
f ( x ) dx
a0 , an , bn
x dx
a0
1 x2
1 2
1 2
0
2
2
2
1
an f ( x) cos nx dx
Fourier series
22
an
x cos nxdx
Solve using integration by parts:
u dv uv v du
ux
du dx
sin nx
v
n
dv cos nx dx
ao
1
=
1
1
an x cos nxdx
x sin nx
n
sin nx
1 cos nx
dx
2
n
n
1
bn f ( x ) sin nx dx
Using integration by parts:
Fourier series
23
1
1 x cos nx
bn x sin nxdx
n
cos nx
1 x cos nx
sin
nx
dx
2
n
n
n
2 cos n 2(1) n
bn
n
n
Note:
sin( x) sin x; sin n 0
cos( x) cos x; cos n (1) n
Thus the first four terms of the Fourier
Series are:
2
1
f ( x) 2sin x sin 2 x sin 3 x sin 4 x ...
3
2
Fourier series
24
Fourier series
25
Example 3:
Given the function,
,1 x 0
f ( x)
x, 0 x
(a) If f ( x 2 ) f ( x) , sketch the
graph of the function for
3 x 3
(b) Find the first four terms of the
Fourier series expansion..
Solution:
(a) Sketch the graph for the period
x . Since it is periodic,
the basic shape is repeated for
Fourier series
26
every phase 2 . Note that it is a
piecewise function as it made up of
two different functions defined in
its respective domains.
y
3 2
(b) Find
2 3
a0 , an , bn
Since two equations describe f(x), we
will need two separate integrals to find a
or b:
Fourier series
27
a0
an
an
f ( x)dx (1))dx ( x)dx
f ( x) cos nxdx
(1) cos nxdx
bn
bn
( x) cos nxdx
0
f ( x) sin nxdx
(1) sin nxdx
Fourier series
( x) sin nxdx
28
6.4 Fourier Series of Even and Odd
functions
6.4.1 Characteristics of Even functions
Functions that are symmetric about the
yaxis
f ( x) f ( x)
( x, y )
is on the graph if and only if
( x, y )
is
also on the graph.
Examples:
(1)
y x2
(2)
y x4
Fourier series
29
y
250
200
150
100
50
-4
(3)
-2
y cos x
0.5
-4
-2
-0.5
-1
Fourier series
30
6.4.2 Characteristics of Odd
Functions
Functions that are symmetric to the
origin
f ( x) f ( x)
( x, y )
is on the graph if and only if
x, y is also on the graph.
Examples:
(1)
y mx
Fourier series
31
(2)
y x3
0
x
(3)
y sin x
Fourier series
32
Mathematical facts
l
Even function: l
Odd function:
f ( x)dx 2
l
l
l
0
f ( x)dx
f ( x)dx 0
Theorem 6.4
Basic characteristics of Combination
Even and Odd functions
Even Even Even
Even Odd Neither even or odd
Odd Odd Odd
Even Even Even
Even Odd Odd
Odd Odd Even
Fourier series
33
6.2.2 Fourier series of even and odd
functions
Theorem 6.6: Fourier series for even
functions
If f(x) is an even function in the interval
x , then the Fourier Series has only
cosine terms with possibly a constant term, given
by:
2
a0 f ( x )dx
0
2
an f ( x)cos nx dx n = 1,2,3,
0
bn 0
Fourier series
n = 1,2,3,
34
Thus, the Fourier series for an even
function is
a0
f ( x) an cos nx
2 n 1
Fourier series
35
Theorem 6.7: Fourier series for odd
functions
If f(x) is an odd function in the interval
x , then the Fourier Series has
only sine terms and no constant term,
given by:
a0 0 and an 0 for n = 1,2,3,
2
bn f ( x ) sin nx dx
0
n = 1,2,3,
Thus, the Fourier Series for an odd
function is
f ( x ) bn sin nx
n 1
Fourier series
36
Exercises 6.1
For each the following questions 1- 6,
(a) If
f ( x 2 ) f ( x)
3 x 3
, sketch the graph of
f (x)
for
(b) State whether the function is odd, even or
neither even nor odd.
(c) Find the first four terms of the Fourier
Series.
1)
f ( x ) 1 x,
2)
f ( x)
x2 ,
4
x 0
0 x
3) f (x) 2
4)
f ( x) x
0 x 0
5) f (x)
cos x 0 x
6)
f ( x) 2 x
Fourier series
37
6.5 Fourier Series with a period of L (over any
range)
A periodic function f ( x) has a period L if
f ( x L) f ( x ) for all real numbers x.
To find a Fourier Series for a function in the range
of
L
L
x ,
2
2
we introduce a new variable, u, such
that f (u ) has a period of 2.
If u
2 x
L
then when x ,
2
L
And if
L
x ,
2
Lu
F (u )
2
Then If f ( x) f
The Fourier Series for
F (u )
is given by:
F (u ) a0 an cos nu bn sin nu
n 1
where
Fourier series
38
1
a0
2
1
an
F (u ) du
F (u ) cos nu du
1
and bn
F (u )sin nu du
But, we can change the formula in terms of x since
u
2 x
2
then du dx and the limits are from
L
L
L
L
x instead of
2
2
x .
Hence the Fourier Series can be expressed in terms
of x and is given by:
2 nx
2 nx
f ( x) a0 an cos
bn sin
L
L
n 1
where
a0
Fourier series
1
L
L
2
L
2
f ( x ) dx ;
39
an
2
L
2
bn
L
L
2
L
2
L
2
L
2
2 nx
dx
L
f ( x ) cos
and
2 nx
f ( x) sin
dx
L
The limits of integration may be replaced by
any interval of length L, such as from
0 to L .
Example 4: The voltage from a square wave
generator is of the form:
0,
10,
v(t )
4 t 0
0t 4
and has a period 8
ms.
Find the Fourier series for this periodic
function.
Solution:
Fourier series
40
The graph of the square wave is
10
0
8
Period L is 8 ms
The Fourier Series of the square wave is:
2 nt
2 nt
v(t ) a0 an cos
b
sin
n
L
L
n 1
1
a0
L
L
2
L
2
L
2
1
1
1
1
1
4
f ( x) dx v (t ) dt v(t ) dt then a0 0 dt 10 dt 10t 0 5
L L
8 4
8 4
80
8
Fourier series
41
L
2
2
2 nt
2 nt
v
(
t
)
cos
dt
v
(
t
)
cos
dt
L
8 4
8
L
2
an
L
1
1
2 nt
2 nt
an 0 cos
dt 10 cos
dt
4 4
8
4
8
0
0
nt
10sin
4
n
1
4
10
sin n sin 0 0; n 1, 2, 3,...
n
L
2
2
2 nt
2 nt
L v(t ) sin L dt 8 4 v(t ) sin 8 dt
2
bn
L
1
1
2 nt
2 nt
bn 0sin
dt
10sin
dt
4 4
40
8
8
nt
10
cos
1
10
4
cos n cos 0 ; n 1, 2,3,...
4
n
n
4
0
When n is even, bn 0
10
20
1 1
10
20
b3 1 1
3
3
10
20
b5 1 1
5
5
When n is odd, b1
And so on.
Fourier series
42
v(t ) 5
20
1 3
1
t
t
5 t
sin
sin
sin
...
3
5
4
4
4
Exercises 6.2: Fourier Series over any range L
Fourier series
43
0;
5;
1) The voltage from a square wave generator is of the form v (t )
10 x 0
.
0 x 10
It has a period os 20. Sketch the function. Show that the Fourier Series is given by:
v(t )
5 10
1 3
1
t
t
5 t
sin sin
sin
...
2
3 10
5
10
10
2) Determine the first four terms of the Fourier Series for the function f (t ) t in the range
t 0 to t 3. Sketch the function.
3
2 t
[Ans: f (t ) sin
sin
2
2
3
3
4 t
1
6 t
sin
... ]
3
3
3
3) Obtain the first four terms of the Fourier Series for the function defined by:
0;
f ( x) 5;
0;
2 x 1
1 x 1
1 x 2
Sketch the function and determine whether it is even, odd or neither.
5 10
1 3 x
1
x
5 x
cos
cos
cos
...
2
3
2
5
2
2
[Ans: f ( x)
Fourier series
44