Você está na página 1de 81

# Periodic Functions and

Fourier Series
Periodic Functions
A function u f is periodic
if it is defined for all real
and if there is some positive number,
T such that
u u f T f = +
.
0
u
T
f u ( )
0
u
T
f u ( )
0
u
T
f u ( )
Fourier Series
u f
be a periodic function with period 2
The function can be represented by
a trigonometric series as:

=

=
+ + =
1 1
0
sin cos
n
n
n
n
n b n a a f u u u

=

=
+ + =
1 1
0
sin cos
n
n
n
n
n b n a a f u u u
What kind of trigonometric (series) functions

u u u
u u u
3 2
and 3 2
sin , sin , sin
cos , cos , cos
0
0
t 2t
cos u cos 2u cos 3u
0
0
t
2t
sin u sin 2u sin 3u
We want to determine the coefficients,
n
a
and
n
b
.
Let us first remember some useful
integrations.

+ + =
t
t
t
t
t
t
u u u u
u u u
d m n d m n
d m n
cos
2
1
cos
2
1
cos cos
0 = u u u
}
t
t
d m n cos cos m n =
t = u u u
}
t
t
d m n cos cos
m n =

+ + =
t
t
t
t
t
t
u u u u
u u u
d m n d m n
d m n
sin
2
1
sin
2
1
cos sin
0 = u u u
}
t
t
d m n cos sin
for all values of m.

+ =
t
t
t
t
t
t
u u u u
u u u
d m n d m n
d m n
cos
2
1
cos
2
1
sin sin
0 = u u u
}
t
t
d m n sin sin m n =
t = u u u
}
t
t
d m n sin sin m n =
Determine
0
a
Integrate both sides of (1) from
to
u u u
u u
t
t
t
t
d n b n a a
d f
n
n
n
n

+ + =
1 1
0
sin cos
u u
u u u
u u
t
t
t
t
t
t
t
t
d n b
d n a d a
d f
n
n
n
n

|
|
.
|

\
|
+
|
|
.
|

\
|
+ =
1
1
0
sin
cos
0 0
0
+ + =

u u u
t
t
t
t
d a d f
( ) 0 0 2
0
+ + t = u u
}
t
t
a d f
( ) u u
t
=
}
t
t
d f a
2
1
0
0
a
is the average (dc) value of the
function,
u f
.
u u u
u u
t
t
d n b n a a
d f
n
n
n
n
(

+ + =

=

=
2
0
1 1
0
2
0
sin cos
It is alright as long as the integration is
performed over one period.
You may integrate both sides of (1) from
0
to
2
u u
u u u
u u
t
t t
t
d n b
d n a d a
d f
n
n
n
n
|
|
.
|

\
|
+
|
|
.
|

\
|
+ =

=
2
0
1
2
0
1
2
0
0
2
0
sin
cos
0 0
2
0
0
2
0
+ + = u u u
t t
d a d f
0 0 2
0
2
0
+ + = a d f t u u
t
t
d f a
2
0
0
2
1
Determine
n
a
Multiply (1) by
u m cos
and then Integrate both sides from
to
u u u u
u u u
t
t
t
t
d m n b n a a
d m f
n
n
n
n

## + + = cos sin cos

cos
1 1
0
Let us do the integration on the right-hand-side
one term at a time.
First term,
}
t
t
= u u 0
0
d m a cos
Second term,
u u u
}

t
t

=
d m n a
n
n
cos cos
1
t u u u
t
t
m
n
n
a d m n a =

=
cos cos
1
Second term,
Third term,
0
1

=
u u u
t
t
d m cos n sin b
n
n
Therefore,
t
t
m
a d m f

cos
, 2 , 1 cos
1
= =

m d m f a
m
u u u
t
t
t
Determine
n
b
Multiply (1) by
u m sin
and then Integrate both sides from
to
( )
u u u u
u u u
t
t
t
t
d m sin n sin b n cos a a
d m sin f
n
n
n
n

+ + =
1 1
0
Let us do the integration on the right-hand-side
one term at a time.
First term,

t
t
u u 0
0
d m sin a
Second term,
u u u
t
t
d m sin n cos a
n
n

=1
0
1

=
u u u
t
t
d m sin n cos a
n
n
Second term,
Third term,
t
t
m
n
n
b d m n b

=
sin sin
1
Therefore,
t u u u
t
t
m
b d m sin f =

, , m d m sin f b
m
2 1
1
= =

u u u
t
t
t
( ) u u
t
=
}
t
t
d f a
2
1
0
The coefficients are:
, 2 , 1 cos
1
= =

m d m f a
m
u u u
t
t
t
, 2 , 1 sin
1
= =

m d m f b
m
u u u
t
t
t
( ) u u
t
=
}
t
t
d f a
2
1
0
We can write n in place of m:
, , n d n cos f a
n
2 1
1
= =

u u u
t
t
t
, , n d n sin f b
n
2 1
1
= =

u u u
t
t
t
The integrations can be performed from
0
to
2
u u
t
t
d f a =
2
0
0
2
1
, , n d n cos f a
n
2 1
1
2
0
= = u u u
t
t
, , n d n sin f b
n
2 1
1
2
0
= = u u u
t
t
Example 1. Find the Fourier series of
the following periodic function.
0
u
f u ( )
t 2t 3t 4t 5t
A
-A
( )
t < u < t =
t < u < = u
2
0
when A
when A f
u t u f f = + 2
0
2
1
2
1
2
1
2
0
2
0
2
0
0
=
(

+ =
(

+ =
=
u u
t
u u u u
t
u u
t
t
t
t
t
t
t
t
d A d A
d f d f
d f a
0
1 1
1
1
2
0
2
0
2
0
=
(

+
(

=
(

+ =
=
t
t
t
t
t
t
t
u
t
u
t
u u u u
t
u u u
t
n
n sin
A
n
n sin
A
d n cos A d n cos A
d n cos f a
n
t t t
t
u
t
u
t
u u u u
t
u u u
t
t
t
t
t
t
t
t
n cos n cos cos n cos
n
A
n
n cos
A
n
n cos
A
d n sin A d n sin A
d n sin f b
n
+ + =
(

+
(

=
(

+ =
=
2 0
1 1
1
1
2
0
2
0
2
0
odd is n when
4
1 1 1 1
2 0
t
t
t t t
t
n
A
n
A
n cos n cos cos n cos
n
A
b
n
=
+ + + =
+ + =
even is n when 0
1 1 1 1
2 0
=
+ + =
+ + =
t
t t t
t
n
A
n cos n cos cos n cos
n
A
b
n
Therefore, the corresponding Fourier series is
|
.
|

\
|
+ + + + u u u u
t
7 sin
7
1
5 sin
5
1
3 sin
3
1
sin
4A
In writing the Fourier series we may not be
able to consider infinite number of terms for
practical reasons. The question therefore, is
how many terms to consider?
When we consider 4 terms as shown in the
previous slide, the function looks like the
following.
1.5
1
0.5
0
0.5
1
1.5
f u ( )
u
When we consider 6 terms, the function looks
like the following.
1.5
1
0.5
0
0.5
1
1.5
f u ( )
u
When we consider 8 terms, the function looks
like the following.
1.5
1
0.5
0
0.5
1
1.5
f u ( )
u
When we consider 12 terms, the function looks
like the following.
1.5
1
0.5
0
0.5
1
1.5
f u ( )
u
The red curve was drawn with 12 terms and
the blue curve was drawn with 4 terms.
1.5
1
0.5
0
0.5
1
1.5
u
The red curve was drawn with 12 terms and
the blue curve was drawn with 4 terms.
0 2 4 6 8 10
1.5
1
0.5
0
0.5
1
1.5
u
The red curve was drawn with 20 terms and
the blue curve was drawn with 4 terms.
0 2 4 6 8 10
1.5
1
0.5
0
0.5
1
1.5
u
Even and Odd Functions
(We are not talking about even or
odd numbers.)
Even Functions
u
f(u)
The value of the
function would
be the same
when we walk
equal distances
along the X-axis
in opposite
directions.
u u f f =
Mathematically speaking -
Odd Functions
The value of the
function would
change its sign
but with the
same magnitude
when we walk
equal distances
along the X-axis
in opposite
directions.
u u f f =
Mathematically speaking -
u
f(u)
Even functions can solely be represented
by cosine waves because, cosine waves
are even functions. A sum of even
functions is another even function.
10 0 10
5
0
5
u
Odd functions can solely be represented by
sine waves because, sine waves are odd
functions. A sum of odd functions is another
odd function.
10 0 10
5
0
5
u
The Fourier series of an even function
u f
is expressed in terms of a cosine series.

=1
0
cos
n
n
n a a f
The Fourier series of an odd function
u f
is expressed in terms of a sine series.

=
=
1
sin
n
n
n b f u u
Example 2. Find the Fourier series of
the following periodic function.
u t u f f = + 2
x
f(x)
t t 3t 5t 7t 9t
0
x when x x f
2
3 3 2
1
2
1
2
1
2 3
2
0
t
t
t
t
t
t
=
=

x
x
x
dx x dx x f a

nxdx x
dx nx x f a
n
cos
1
cos
1
2
t
t
t
t
Use integration by parts. Details are shown
n
n
a
n
cos
4
2
odd is n when
4
2
n
a
n
even is n when
4
2
n
a
n
This is an even function.
Therefore,
0
n
b
The corresponding Fourier series is
|
.
|

\
|
+ +
2 2 2
2
4
4 cos
3
3 cos
2
2 cos
cos 4
3
x x x
x
t
Functions Having Arbitrary Period
Assume that a function
( ) t f
has
period,
T
. We can relate angle
(
u
) with time (
t
) in the following
manner.
t e u
e is the angular velocity in radians per
second.
f 2
f is the frequency of the periodic function,
t f
t f 2
T
f
1
where
t
T
t
u
2
Therefore,
t
T
t
u
2
dt
T
d
t
u
2
Now change the limits of integration.
t u
2
T
t t
T
t
t
2
=
2
T
t t
T
t
t
2
=
( ) u u
t
=
}
t
t
d f a
2
1
0
dt t f
T
a
T
T

2
2
0
1
, , n d n cos f a
n
2 1
1
= =

u u u
t
t
t
, 2 , 1
2
cos
2
2
2
=
|
.
|

\
|
=

n dt t
T
n
t f
T
a
T
T
n
t
, , n d n sin f b
n
2 1
1
= =

u u u
t
t
t
, 2 , 1
2
sin
2
2
2
=
|
.
|

\
|
=

n dt t
T
n
t f
T
b
T
T
n
t
Example 4. Find the Fourier series of
the following periodic function.
0
t
T/2
f(t)
T/4
3T/4
T -T/2 2T
4
3
4 2
4 4
T
t
T
when
T
t
T
t
T
when t t f
s s + =
s s =
( ) ( ) t f T t f = +
This is an odd function. Therefore,
0 =
n
a
dt t
T
n
t f
T
dt t
T
n
t f
T
b
T
T
n
2
sin
4
2
sin
2
2
0
0
dt t
T
n T
t
T
dt t
T
n
t
T
b
T
T
T
n
2
sin
2
4
2
sin
4
2
4
4
0
Use integration by parts.
2
sin
2
2
sin
2
. 2
4
2 2
2
n
n
T
n
n
T
T
b
n
0 =
n
b
when n is even.
Therefore, the Fourier series is
(

|
.
|

\
|
t
+
|
.
|

\
|
t

|
.
|

\
|
t
t
t
T
t
T
t
T
T 10
5
1 6
3
1 2 2
2 2 2
sin sin sin
The Complex Form of Fourier Series

=

=
+ + =
1 1
0
sin cos
n
n
n
n
n b n a a f u u u
Let us utilize the Euler formulae.
2
u u
u
j j
e e
cos

i
e e
sin
j j
2
u u
u

The
n
th harmonic component of (1) can be
expressed as:
i
e e
b
e e
a
n b n a
jn jn
n
jn jn
n
n n
2 2
sin cos
u u u u
2 2
u u u u jn jn
n
jn jn
n
e e
ib
e e
a

u u jn
n n
jn
n n
n n
e
jb a
e
jb a
n b n a

2 2
sin cos
Denoting
|
|
.
|

\
|

=
2
n n
n
jb a
c

2
n n
n
jb a
c
,
and
0 0
a c
u u
u u
jn
n
jn
n
n n
e c e c
n sin b n cos a

## The Fourier series for

u f
can be expressed as:

n
jn
n
n
jn
n
jn
n
e c
e c e c c f
u
u u
1
0
The coefficients can be evaluated in
the following manner.
u u u
t
u u u
t
t
t
t
t
d n f
j
d n f
jb a
c
n n
n
sin
2
cos
2
1
2

=
|
.
|

\
|

=

=
t
t
u u u u
t
d n j n f sin cos
2
1

=
t
t
u
u u
t
d e f
jn
2
1
u u u
t
u u u
t
t
t
t
t
d n f
j
d n f
jb a
c
n n
n
sin
2
cos
2
1
2

+ =
|
.
|

\
|
+
=

+ =
t
t
u u u u
t
d n j n f sin cos
2
1

=
t
t
u
u u
t
d e f
jn
2
1
.
2
n n
n
jb a
c

2
n n
n
jb a
c
n
c

n
c
Note that
is the complex conjugate of
.
Hence we may write that
( )
}
t
t
u
u u
t
= d e f c
jn
n
2
1
, , , n 2 1 0
The complex form of the Fourier series of
u f
t 2 with period is:

= n
jn
n
e c f
u
u
Example 1. Find the Fourier series of
the following periodic function.
0
u
f u ( )
t 2t 3t 4t 5t
A
-A
( )
t < u < t =
t < u < = u
2
0
when A
when A f
u t u f f = + 2
A 5 :=
f x ( ) A 0 x s t < if
A t x s 2 t s if
0 otherwise
:=
A
0
1
2t
0
2t
x f x ( )
(
(
]
d :=
A
0
0 =
n 1 8 .. :=
A
n
1
t
0
2t
x f x ( ) cos n x ( )
(
(
]
d :=
A
1
0 = A
2
0 = A
3
0 = A
4
0 =
A
5
0 = A
6
0 = A
7
0 = A
8
0 =
B
n
1
t
0
2 t
x f x ( ) sin n x ( )
(
(
]
d :=
B
1
6.366 = B
2
0 = B
3
2.122 = B
4
0 =
B
5
1.273 = B
6
0 = B
7
0.909 = B
8
0 =
Complex Form
( )

=
u
= u
n
jn
n
e c f
( )
}
t
t
u
u u
t
= d e f c
jn
n
2
1
, , , 2 1 0 = n
C n ( )
1
2 t
0
2 t
x f x ( ) e
1i n x

(
(
]
d :=
C 0 ( ) 0 = C 1 ( ) 3.183i = C 2 ( ) 0 = C 3 ( ) 1.061i =
C 4 ( ) 0 = C 5 ( ) 0.637i = C 6 ( ) 0 = C 7 ( ) 0.455i =
C 1 ( ) 3.183i = C 2 ( ) 0 = C 3 ( ) 1.061i =
C 4 ( ) 0 = C 5 ( ) 0.637i = C 6 ( ) 0 = C 7 ( ) 0.455i =
C n ( )
1
2 t
0
2 t
x f x ( ) e
1i n x

(
(
]
d :=