You are on page 1of 43

Chapter 6

Fourier Series

Dr Faye - Jan 2014

I. Definitions

Learning
Learning Objective
Objective
At the end of this chapter, you should be able to
find the Fourier series of a periodic function.

What is periodic function?

A function f
is said periodic if there
exists a smallest positive
such
T number
that

f ( x T ) f ( x)

period of f

Illustration
period =2

Dr Faye - Jan 2014

Introduction
Let f be a periodic function of period T
It can be proved that f can be expressed as the sum of
an infinite number of sine and/or cosine functions.
a0
2nt
2nt
Sf (t ) an cos
bn sin

2 n 1
T
T

Dr Faye - Jan 2014

Introduction
The coefficients a0 ,an ,bn , n 1,2 ,...
are known as Fourier coefficients.
They can be obtained by
2 T
a0 f (t )dt
T 0
2 T
2nt
an f (t ) cos
dt
T 0
T
2 T
2nt
bn f (t ) sin
dt
T 0
T
Dr Faye - Jan 2014

Introduction
If we write out the first few terms of the infinite series
explicitly, we find:
a0
2t
2t
4t
4t
Sf (t ) a1 cos
b1 sin
a2 cos
b2 sin
....
2
T
T
T
T

Dr Faye - Jan 2014

Introduction
an are the amplitudes of the cosine terms in the
series,
bn are the amplitudes of the sine terms in the
series.

Dr Faye - Jan 2014

Example1
0
f (t )
1

5 t 0
0t 5

period T 10,

2 T
Evaluate a0 f (t )dt
T 0
2 T
2nt
a n f ( t ) cos(
)dt
T 0
T
2 T
2nt
b n f ( t ) sin(
)dt
0
T
T
Dr Faye - Jan 2014

Solution 1
0
f (t )
1

2 10
a0 f (t )dt
10 0
1
a0
5

1
a0
5

1
dt

0
dt
0 5

f (t )dt f (t )dt
10

10

5 t 0
0t 5

T 10,

Solution 1
2 T
2nt
an f (t ) cos(
)dt
T 0
T

0
f (t )
1

1 5
nt
an cos(
)dt
5 0
5
5

1 5
nt
sin( n )
an
sin(
)
0
5 n
5 0
n

Dr Faye - Jan 2014

5 t 0
0t 5

T 10,

Solution 1
2 T
2nt
bn f (t ) sin(
)dt
T 0
T

0
f (t )
1

5 t 0
0t 5

1 5
nt
bn sin(
)dt
5 0
5
5

1 5
nt
1 cos(n ) 1 (1) n
bn cos(
)

5 n
5 0
n
n

T 10,

Fourier Series when T=2L

Let f(x) be defined in the interval (c, c+2L).
It can be represented in the given interval by
the following Fourier Series:

a0
n
n

f ( x)
an cos( x ) bn sin( x )
2
L
L
1

1
a0
L
1
an
L

C 2 L

C 2L

f ( x)dx

n
f ( x) cos(
x)dx
L

1
bn
L

C 2 L

n
f ( x) sin(
x)dx
L

Exercise 2:

Find the Fourier Series of the function of

period 2 :
f(x) = x, -1<x<1.

Dr Faye - Jan 2014

Solution 2
Here C = -1 and L = 1.
Thus the Fourier Series is

a0
Sf ( x) (an cos nx bn sin nx)
2 n 1

Solution 2

a0

f ( x)dx xdx

x2

1 1
0
2 2
1

Dr Faye - Jan 2014

Solution 2
1

1
a n x cos( nx )dx x sin( nx )
n

1
1

1
sin( nx )dx
n
1
1

1
1
1
cos(nx ) 1
0 sin( nx )dx
2
n
(n)
1
cos(n) cos(n)

0
2
(n)

Dr Faye - Jan 2014

Solution 2
1

cos(nx )
b n x sin( nx )dx x
n

cos(nx )
n

1
cos(nx )dx
n
1
1

sin( nx )
2
(n)

cos(n) cos(n)
2 cos(n) 2(1) n

(n)
(n)
(n)
2(1) n 1

(n)
Dr Faye - Jan 2014

Solution 2
2
Thus, a 0 0, a n 0, b n
(1) n 1
n

n 1
x
( 1)
sin( nx )

n 1 n
( 1) n 1

sin( nx )

n 1
n

sin 2x
sin 3x

sin x
2
3

Dr Faye - Jan 2014

Exercise 3:
Represent the following function by a Fourier Series:
f(x) = x2,
x T 2

Solution 3:

C , L

a0
Sf ( x) (an cos nx bn sin nx )
2 n 1

Solution 3:

1
1
2
a 0 x dx

2
1 3
2

3
[ ( )]
3
3

Dr Faye - Jan 2014

Solution 3:

1
an x 2 cos (nx) dx

1

2

n
2

x sin (nx) dx

x(1 / n) cos (nx)

Dr Faye - Jan 2014

(1 / n) cos (nx) dx

Solution 3:
2

2 2
1 1

cos n sin nx
n n
n n

4
2 cos n
n

4
(1) 2
n
n

Dr Faye - Jan 2014

(1 / n) cos (nx) dx

Solution 3:

1
b n x 2 sin nx dx

1

x (1/ n) cos nx

2 x (1 / n ) cos nx dx

cos nx dx ....... 0

Solution 3:
2 2
n 4
a 0 , a n ( 1)
and b n 0
2
3
n

Thus when - <x< , the Fourier Series for x2 , is

1
2

2
2
n 4
x
(1)
cos nx
2
2 3
n

n 1

n cos nx

4 (1)

2
3
n

n 1

2
cos 2 x cos 3x

4( cos x

)
3
4
9
Dr Faye - Jan 2014

Convergence and Sum of a Fourier Series

Not all periodic functions , defined over any type of
interval, can be represented by Fourier series.
For a function, defined over an interval, to be
represented by Fourier Series, it must satisfy
certain conditions, known as Dirichlet Conditions.

Dr Faye - Jan 2014

Dirichlet Conditions
1. f must be well-defined at every x in the
interval.
2. f must be continuous or have a finite
number of finite discontinuities within the
interval.
3. f must be continuous or piecewise
continuous within the interval
Dr Faye - Jan 2014

Examples:
1. Both the functions
f(x) = x, -1<x<1 and
f(x) = x2, -2<x<2
satisfy Dirichlets conditions.
2.

1
f (x) , x
x

infinite discontinuity at x = 0.
Dirichlet conditions not satisfied

1
3. f ( x )
, x
x 5

Although the function has an infinite

discontinuity at x = 5, this point is not in
the given interval. Conditions are satisfied.

4. f ( x ) tan x, x

Infinite discontinuities at x = - and x =

2
2
Conditions not satisfied.
Dr Faye - Jan 2014

Value of the FS at a point of continuity

If f satisfies Dirichlet conditions and let S be the
Fourier series of f at x = a.
If f is continuous at a then

Sf (a ) f (a)

Value of the FS at a point of discontinuity

If f is discontinuous at a:
Let f(a-) and f(a+) be the left and right limits respectively.
Then the value of the Fourier Series at x = a is:

f (a ) f (a )
Sf (a )
2
Dr Faye - Jan 2014

Exercise 4:
Find the Fourier Series for the following 2-periodic
function in the given interval:

0
,
if

f ( x ) 4, if x
2
2

0, if 2 x

Dr Faye - Jan 2014

Solution 4:
C = - and L =

a0
Sf ( x) (an cos nx bn sin nx)
2 n 1

1
a0
f ( x )dx

1
an
f ( x ) cos nxdx

1
bn
f ( x ) sin nxdx

Dr Faye - Jan 2014

Since the function is defined in three pieces over the

interval (-Pi, Pi), each integral has to be evaluated
separately over the three pieces and the results
summed up
a0

f ( x )dx

0dx

4dx

(0 4 0) 4

Dr Faye - Jan 2014

0dx

1
a n f ( x ) cos nx dx

0 cos(nx ) dx 4 cos (nx ) dx 0 cos(nx ) dx

1
4
1 4
n
2
0 sin ( nx ) 0
2 sin

n
2

8
n

sin

n
2
Dr Faye - Jan 2014

bn

f ( x ) sin nx dx

0 sin nx dx 4 sin

1
cos ( nx )

0 4

nx dx 0 sin nx dx

1
[ 0 0 0] 0

Thus the Fourier Series representing the given

function is:

4
8
n
Sf ( x )
sin
cosnx
2 n 1 n
2

n
sin
cosnx
8
2
2
n 1
n

8
2

sin
cos3 x

sin cos2 x
2
sin cosx

2
2
3

8
cos 3x cos 5x cos 7 x

2 cos x

3
5
7

2
2

At x ,
2

2 x
x
2

04
S( )
2
2
2

40
S( )
2
2
2

We can plot the graphs of f(x) and its

representation by Fourier Series and see how
close the approximation is.
Let
y f (x)

8
y1 2 ( ) cos x

8
cos(3x )
y 2 2 ( ) cos x

3
8
cos(3x ) cos(5x ) cos(7 x ) cos(9 x )
y 3 2 ( ) cos x

3
5
7
9
Dr Faye - Jan 2014

5

f(x)

-1
-4

-3

-2

-1

4.5
4
3.5

f(x)

3
2.5
2
1.5
1
0.5
0
-0.5
-4

-3

-2

-1

4.5
4
3.5

f(x)

3
2.5
2
1.5
1
0.5
0
-0.5
-4

-3

-2

-1

End