Вы находитесь на странице: 1из 21

Representing Periodic

Functions by Fourier
Series

23.2

Introduction
In this Section we show how a periodic function can be expressed as a series of sines and cosines.
We begin by obtaining some standard integrals involving sinusoids. We then assume that if f (t)
is a periodic function, of period 2, then the Fourier series expansion takes the form:
a0 
f (t) =
(an cos nt + bn sin nt)
+
2
n=1

Our main purpose here is to show how the constants in this expansion; an , n = 0, 1, 2, 3 . . . and
bn , n = 1, 2, 3, . . . may be determined for any given function f (t).

'

know what a periodic function is

Prerequisites

be able to integrate functions involving


sinusoids

Before starting this Section you should . . .


have knowledge of integration by parts

&

Learning Outcomes

calculate Fourier coecients of a function


of period 2

After completing this Section you should be


able to . . .

calculate Fourier coecients of a function


of general period

1. Introduction
We recall rst a simple trigonometric identity:
cos 2t = 1 + 2 cos2 t

or equivalently

cos2 t =

1 1
+ cos 2t
2 2

(1)

Equation 1 can be interpreted as a simple nite Fourier Series representation of the periodic
function f (t) = cos2 t which has period . We just note that the Fourier Series representation
contains a constant term and a period term.
A more complicated trigonometric identity is
sin4 t =

3 1
1
cos 2t + cos 4t
8 2
8

(2)

which again can be considered as a nite Fourier Series representation. (Do not worry if you
are unfamiliar with the result (2).) Note that the function f (t) = sin4 t (which has period ) is
being written in terms of a constant function, a function of period or frequency 1 (the rst
harmonic) and a function of period 2 or frequency 2 (the second harmonic).
The reason for the constant term in both (1) and (2) is that each of the functions cos2 t and
sin4 t is non-negative and hence each must have a positive average value. Any sinusoid of the
form cos nt or sin nt has, by symmetry, zero average value as, therefore, would a Fourier Series
containing only such terms. A constant term can therefore be expected to arise in the Fourier
Series of a function which has a non-zero average value.

2. Functions of Period 2
We now discuss how to represent periodic non-sinusoidal functions f (t) of period 2 in terms
of sinusoids, i.e. how to obtain Fourier Series representations. As already discussed we expect
n
such Fourier Series to contain harmonics of frequency 2
(n = 1, 2, 3, . . .) and, if the periodic
function has a non-zero average value, a constant term.
Thus we seek a Fourier Series representation of the general form
f (t) =

a0
+ a1 cos t + a2 cos 2t + . . . + b1 sin t + b2 sin 2t + . . .
2

The reason for labelling the constant term as a20 will be discussed later. The amplitudes a1 , a2 , . . .
b1 , b2 , . . . of the sinusoids are called Fourier coecients.
Obtaining the Fourier coecients for a given periodic function f (t) is our main task and is
referred to as Fourier Analysis. Before embarking on such an analysis it is instructive to establish,
at least qualitatively, the plausibility of approximating a function by a few terms of its Fourier
Series.

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Consider the square wave of period 2 one period of which


is shown in Figure 1.
4

Figure 1
Write down
i. the analytic description of this function,
ii. whether you expect the Fourier Series of this function to contain
a constant term,
iii. any other possible features of the Fourier Series that you might
expect from the graph of the square-wave function.

Your solution

(ii) The Fourier Series will contain a constant term (often referred to as the d.c. (direct current)
term by engineers) since the square wave here is non-negative and cannot therefore have a zero
average value)
(iii) Since the square wave is an even function (i.e. the graph in Figure 1 has symmetry about
the y axis) then its Fourier Series will contain cosine terms but not sine terms because only the
former are even functions. (Well done if you spotted this at this early stage!)
f (t + 2) = f (t)
f (t) =

< t < 2 ,

<t<

2 < t <

(i) We have
To be precise it is possible to show, and we will do so later, that the Fourier Series representation
3

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

of this square wave is


8
2+


1
1
1
cos t cos 3t + cos 5t cos 7t + . . .
3
5
7

i.e. the Fourier coecients are


8
8
8
a0
a3 = ,
a5 =
= 2,
a1 = ,
a2 = 0,
a4 = 0,
,...
2

3
5
Note, as well as the presence of the constant term and of the cosine (but not sine) terms, that
only odd harmonics are present i.e. sinusoids of period 2, 2
, 2
, 2
, . . . or of frequency
3
5
7
1
1, 3, 5, 7, . . . times the fundamental frequency 2 .
We now show in Figure 2 graphs (for 0 < t < only since the square wave and its Fourier Series
are even) of
(i) the square wave
(ii) the rst two terms of the Fourier Series
(iii) the rst three terms of the Fourier Series
(iv) the rst four terms of the Fourier Series
(v) the rst ve terms of the Fourier Series
(i)
4

(ii)
2+

2
(iv)
4

2+

8
1
(cos t cos 3t )

1
1
8
2 + (cos t cos 3t + cos 5t )

3
5

(iii)

8
cos t

2+

(v)

1
1
1
8
(cos t cos 3t + cos 5t cos 7t )

3
5
7

Figure 2
We can clearly see from Figure 2 that as the number of terms is increased the graph of the
Fourier Series gradually approaches that of the original square wave - the ripples increase in
number but decrease in amplitude. (The behaviour near the discontinuity, at t = 2 , is slightly
more complicated and it is possible to show that however many terms are taken in the Fourier
Series, some overshoot will always occur. This eect, which we do not discuss further, is
known as Gibbs Phenomenon.)
HELM (VERSION 1: March 18, 2004): Workbook Level 2
23.2: Representing Periodic Functions by Fourier Series

Orthogonality properties of sinusoids


As stated earlier, a periodic function f (t) with period 2 has a Fourier Series representation
a0
+ a1 cos t + a2 cos 2t + . . . + b1 sin t + b2 sin 2t + . . .
2

a0 
=
(an cos nt + bn sin nt)
+
2
n=1

f (t) =

(3)

To determine the Fourier coecients an , bn and the constant term a20 use has to be made of
certain integrals involving sinusoids, the integrals being over a range , + 2, where is any
number. (We will normally choose = ).

Find

sin nt dt and

cos nt dt where n is an integer

Your solution

As special cases, if n = 0 the rst integral is zero and the second integral has value 2.

cos nt dt =


1
sin nt
n

=0

n = 0

In fact both integrals are zero for





1
1
cos nt
= { cos n + cos n} = 0
n
n

(5)

sin nt dt =

n = 0

(4)

N.B. Any integration range , + 2, would give these same (zero) answers.
These integrals enable us to calculate the constant term in the Fourier Series (3) as in the
following guided exercise.

Integrate both sides of (3) from to and use the above results. Hence
obtain an expression for a0 .

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Your solution

1
f (t)dt = (2a0 )
2

or

a0 =

(using the integrals (4) and (5) shown above). Thus we get

1
2

n=1

a0 dt +




an cos nt dt +

f (t)dt


(6)


1

bn sin nt dt = [a0 t]
+
{0 + 0}
2
n=1

(whose value clearly depends on the function f (t).)


Integrating the right hand side term by term we get

f (t)dt
We get for the left hand side

Key Point
The constant term in a trigonometric Fourier Series for a function of period 2 is

1
a0
f (t)dt = average value of f (t) over 1 period.
=
2
2

This result ties in with our earlier discussion on the signicance of the constant term. Clearly a
signal whose average value is zero will have no constant term in its Fourier Series. The following
square wave is an example.
HELM (VERSION 1: March 18, 2004): Workbook Level 2
23.2: Representing Periodic Functions by Fourier Series

f (t)
1

Figure 3
We now obtain further integrals, known as orthogonality properties, which enable us to nd the
remaining Fourier coecients i.e. the amplitudes an and bn (n = 1, 2, 3, . . .) of the sinusoids.

Recall, using a standard trigonometric identity that


1
{sin(n + m)t + sin(n m)t}
2

sin nt cos mt =
Hence evaluate

sin nt cos mt dt

where n and m are any integers.

Your solution

using the results (4) and (5) since n + m and n m are also integers. This result holds for any
interval , + 2.

sin nt cos mt dt =
We get


1
2

sin(n + m)t dt +



1
sin(n m)t dt = {0 + 0} = 0
2
7

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Key Point
For any integers m, n, including the case m = n, we have the orthogonality relation

sin nt cos mt dt = 0

We shall use this result shortly but need a few more integrals rst.
Consider next

cos nt cos mt dt
where m and n are integers.

Using another trigonometric identity we have, for the case n = m,




1
cos nt cos mt dt =
{cos(n + m)t + cos(n m)t}dt
2

1
{0 + 0} = 0 using the integrals (4) and (5).
2
For the case n = m we must get a non-zero answer since cos2 nt is non-negative. In this case:


1
2
cos nt dt =
(1 + cos 2nt)dt
2



1
1
=
=
(provided n = 0)
t+
sin 2nt
2
2n


For the case n = m = 0 we have
cos nt cos mt dt = 2
=

Proceeding in a similar way to the above, obtain



sin nt sin mt dt

for integers m and n. Again consider separately the cases n = m, n = m = 0


and n = m = 0.
Your solution

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Of course, when n = m = 0,

sin nt sin mt dt = 0.

sin2 nt dt =

1
2

(1 cos 2nt)dt =

using the identity cos 2 = 1 2 sin2 with = nt gives for n = m = 0





sin nt sin mt dt = 0

n, m integers

n = m

Using the identity sin nt sin mt = 21 {cos(n m)t cos(n + m)t} and integrating the right
hand side terms, we get, using (4) and (5)

We summarise these results in the following key point:

Key Point
For integers n, m


sin nt cos mt dt = 0

n = m
0
n = m = 0
cos nt cos mt dt =

2 n = m = 0


0 n = m, n = m = 0
sin nt sin mt dt =

n=m

All these results hold for any integration range , + 2.

3. Calculation of Fourier coefficients


Consider the Fourier Series for a function f (t) of period 2:
a0 
(an cos nt + bn sin nt)
+
f (t) =
2
n=1

(7)

To obtain the coecients an (n = 1, 2, 3, . . .), we multiply both sides by cos mt where m is some
positive integer and integrate both sides from to :
for the left hand side we obtain

f (t) cos mt dt

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

for the right hand side we obtain


a0
2

cos mt dt +





an

n=1

cos nt cos mt dt + bn


sin nt cos mt dt

The rst integral is zero using (5).


Using the orthogonality relations all the integrals in the summation give zero except for the case
n = m when, from the last key point


cos2 mt dt =

Hence

f (t) cos mt dt = am

from which the coecient am can be obtained.


Rewriting m as n we get
1
an =

f (t) cos nt dt

for n = 1, 2, 3, . . .

(8)

Using (6), we see the formula also works for n = 0 (but we must remember that the constant
term is a20 .)
From (8)
an = 2 average value of f (t) cos nt over one period.

By multiplying (7) by sin mt obtain an expression for the Fourier Sine coecients bn ; n = 1, 2, 3, . . .

Your solution

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

10

11

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

In the integrals any convenient integration range , + 2 may be used.


an

1
=

bn

1
=

The Fourier coecients are

f (t) cos nt dt

n = 0, 1, 2, . . .

f (t) sin nt dt

n = 1, 2, . . .

a0 
f (t) =
(an cos nt + bn sin nt)
+
2
n=1

A function f (t) with period 2 has a Fourier Series

Key Point
A similar calculation to that performed to nd the an gives



f (t) sin mt dt =

a0
2

sin mt dt



n=1

an cos nt sin mt dt +


bn sin nt sin mt dt

All terms on the right hand side integrate to zero except for the case n = m where


relabelling m as n.
bn =

bm sin2 mt dt = bm

f (t) sin nt dt

n = 1, 2, 3, . . .

(9)

(There is no Fourier coecient b0 .)


Clearly bn = 2 average value of f (t) sin nt over one period.

4. Examples of Fourier Series


We shall obtain the Fourier Series of the half-rectied square wave shown.
f (t)
1

period

Figure 4
We have


1 0<t<
0 < t < 2
f (t + 2) = f (t)
f (t) =

The calculation of the Fourier coecients is merely straightforward integration using the results
already obtained:

1
an =
f (t) cos nt dt

in general. Hence, for our square wave
1
an =

But a0 =



1 sin nt
(1) cos nt dt =
=0

n 0

(1) dt = 1 so the constant term is

a0
2

provided n = 0

= 12 .

(The square wave takes on values 1 and 0 over equal length intervals of t so
value.)
Similarly



1
1
cos nt
bn =
(1) sin nt dt =

n
0
Some care is needed now!
bn =
But cos n = +1

cos n = 1

i.e. b1 = 2 , b3 =

is clearly the mean

1
(1 cos n)
n

n = 2, 4, 6, . . . ,

However,

1
2

2
,
3

b5 =

bn = 0

n = 2, 4, 6, . . .

n = 1, 3, 5, . . .
bn =

1
2
(1 (1)) =
n
n

n = 1, 3, 5, . . .

2
,...
5

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

12

Hence the required Fourier Series is


a0 
(an cos nt + bn sin nt)
in general
+
f (t) =
2
n=1


1
1
1 2
+
sin t + sin 3t + sin 5t + . . .
in this case
f (t) =
2
3
5

Note that the Fourier Series for this particular form of the square wave contains a constant term
and odd harmonic sine terms.
We already know why the constant term arises (because of the non-zero mean value of the
functions) and will explain later why the presence of any odd harmonic sine terms could have
been predicted without integration.
The Fourier series we have found can be written in summation notation in various ways:

1 2  1
+
sin nt
2 n=1 n
(n odd)

or, since n is odd, we may write


n = 2k 1

k = 1, 2, . . .

and write the Fourier Series as

1
1 2
+
sin(2k 1)t
2 k=1 (2k 1)

Obtain the Fourier Series of the square wave one period of which is shown:
4

Figure 5

13

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

14

Clearly in nding the Fourier Series of square waves the integration is particularly simple because
We have, since the function is non-zero only for 2 < t < 2 ,
a0

a0
2

1
=

4 dt = 4
2

= 2 is the constant term as we would expect. Also


an




1 2
4 sin nt 2
=
4 cos nt dt =
2

n
2
n 
n 
4 n 
8
sin
sin
=
sin
n
2
2
n
2
=

n = 1, 2, 3, . . .

It follows from a knowledge of the sine function that

n = 2, 4, 6, . . .
0

an =

8
n

n = 1, 5, 9, . . .

8
n

n = 3, 7, 11, . . .

Also
bn =

4 sin nt dt =
2





4
4 n 
n
cos nt 2
=

cos
cos
=0

n
n
2
2

Hence, the required Fourier Series is



f (t) = 2 +

cos t


1
1
1
cos 3t + cos 5t cos 7t + . . .
3
5
7

which, like the previous square wave, contains a constant term and odd harmonics, but in this
case odd harmonic cosine terms rather than sine.
You may recall that this particular square was used earlier and we have already sketched the
form of the Fourier Series for 2, 3, 4 and 5 terms.

Your solution

f (t) takes on piecewise constant values. For other functions, such as saw-tooth waves this will
not be the case. Before we tackle such functions however we shall generalise our formulae for
the Fourier coecients an , bn to the case of a periodic function of arbitrary period, rather than
conning ourselves to period 2.

5. Fourier Series for functions of general period


This is a straightforward extension of the period 2 case that we have already discussed.
Using x (instead of t) temporarily as the variable. We have seen that a 2 periodic function
f (x) has a Fourier Series

a0 
f (x) =
(an cos nx + bn sin nx)
+
2
n=1

1
an =
f (x) cos nx dx
n = 0, 1, 2, . . .


1
f (x) sin nx dx
n = 1, 2, . . .
bn =

with

Suppose we now change the variable to t where


x=

2
t
P

x = corresponds to t = P2 .
Thus x =
corresponds to
t = P2 and
Hence regarded as a function of t, we have a function with period P .
t, and hence dx = 2
dt, in the expressions for an and bn we
Making the substitution x = 2
P
P
obtain
an

2
=
P

bn

2
=
P

P
2

P2

P
2

P2


2nt
dt
f (t) cos
P


2nt
f (t) sin
dt
P

n = 0, 1, 2 . . .

n = 1, 2 . . .

These integrals give the Fourier coecients for a function of period P whose Fourier Series is





a0 
2nt
2nt
f (t) =
+
+ bn sin
an cos
2
P
P
n=1
Various other notations are commonly used in this case e.g. it is sometimes convenient to write
the period P = 2. (This is particularly useful when Fourier Series arise in the solution of
partial dierential equations.) Another alternative is to use the angualr frequency and put
P = 2/.
15

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Write down the form of the Fourier Series and expressions for the coecients
if (i) P = 2
(ii) P = 2
.

Your solution










a
nt
nt
1 
nt
0
(i) f (t) =
f (t) cos
an cos
+
+ bn sin
with an =
dt
2


 

n=1
and similarly for bn .


a0 

(ii) f (t) =
[an cos(nt) + bn sin(nt)] with an =
f (t) cos(nt) dt
+
2

n=1
and similarly for bn .
You should note that, as usual, any convenient integration range of length P (or 2 or
be used in evaluating an and bn .

) can

Example Find the Fourier Series of the function shown in Figure 6, viz a saw tooth wave
with alternative portions removed
f (t)
2
2

Figure 6
Here the period P = 2 = 4 so  = 2. The Fourier Series will have the form



nt
nt
a0 
an cos
+
+ bn sin
f (t) =
2
2
2
n=1
The coecients an are given by
1
an =
2

f (t) =
Hence an =

f (t) cos
2

where

1
2

2
0

t cos

 nt 
2

0
t

nt
2


dt

2 < t < 0
0<t<2

dt

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

16

The integration is readily performed using integration by parts:




t cos
0

nt
2




2

 2
2
nt
2
nt

sin
dt = t
sin
dt
n
2
n 0
2
0

2
nt
4
n = 0
cos
=
n2 2
2
0
4
{cos n 1} .
n2 2

=
Hence, since an =

1
2

2
0

t cos( nt
)dt
2

an =

The constant term is

a0
2

n = 2, 4, 6, . . .

n242

n = 1, 3, 5, . . .

where
1
a0 =
2

Similarly
1
bn =
2
where

t sin
0

nt
2

t dt = 1.
0

t sin
0

nt
2


dt



2


 2
2
nt
2
nt
dt = t
cos
dt.
+
cos
n
2
n 0
2
0

The second integral gives zero. Hence


2
cos n
n

2
n = 2, 4, 6, . . .
n

bn =

2
+ n

n = 1, 3, 5, . . .

Hence, using all these results for the Fourier coecients, the required Fourier Series is






t
4
1
3t
1
5t
1
cos

+ cos
+
cos
+ ...
f (t) =
2
2
2
9
2
25
2





t
1
2t
1
3t
2
sin
sin
+ sin
...
+

2
2
2
3
2
Notice that because the Fourier coecients depend on n12 (rather than n1 as was the case for
the square wave) the sinusoidal components in the Fourier Series have quite rapidly decreasing
amplitudes. We would therefore expect to be able to approximate the original sawtooth function
using only a quite small number of terms in the series.
17

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Obtain the Fourier Series of the function


1<t<1

f (t) = t2
f (t + 2) = f (t)
f (t)

2 1

1 2

Figure 7

First write out the form of the Fourier Series in this case
Your solution

a0 
[an (cos nt) + bn sin(nt)]
+
2
n=1

Since P = 2 = 2 and since the function has a non-zero average value, the form of the Fourier
Series is
Now write out integral expressions for an and bn . Will there be a constant term in the Fourier
Series?
Your solution

The constant term will be

a0
2

where a0 =

t2 dt.


bn =

t2 sin(nt) dt


an =

n = 1, 2, . . .

t2 cos(nt) dt


n = 0, 1, 2, . . .

Because the function is non-negative there will be a constant term. Since P = 2 = 2 so  = 1


we have
HELM (VERSION 1: March 18, 2004): Workbook Level 2
23.2: Representing Periodic Functions by Fourier Series

18

19

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

The integral for bn is zero for all n because the integrand is an odd function of t. (We shall
cover this point more fully in the next unit.) Since the integrand is even in the integrals for an
we can write

1

t2 cos nt dt

an = 2

n = 0, 1, 2, . . .

The constant term will be

ao
2

where

a0 = 2
0

1
2
t2 dt = .
3

For n = 1, 2, 3, . . . we must integrate by parts (twice)




1
 1
t2
2
t sin(nt) dt
sin(nt)
n
n 0
0
an = 2

4
n



1
 1
1
t
cos(nt) dt .

cos(nt) +
n
n 0
0

The integral gives zero so


4
an = 2 2 cos n.
n
Now write out the nal form of the Fourier Series. We have

1
4  cos n
f (t) =
+
cos(nt)
3 2 n=1 n2


1
4
+
3 2

cos(t) +


1
1
cos(2t) cos(3t) + . . .
4
9

Your solution
Now evaluate the integrals. Try to spot the value of the integral for bn so as to avoid integration.
Note that the integrand is an even functions for an and an odd functon for bn .

Exercises
For each of the following periodic signals
sketch the given function over a few periods
nd the trigonometric Fourier coecients
write out the rst few terms of the Fourier Series.

1 0 < t < /2
1. f (t) =
f (t + 2) = f (t)

0 /2 < t < 2
2. f (t) = t2 1 < t < 1

1 T /2 < t < 0
3. f (t) =

1 0 < t < T /2

0 < t < 0
4. f (t) =
2
0<t<
t

0,
5. f (t) =

A sin 2t ,
T

square wave

f (t + 2) = f (t)
f (t + T ) = f (t)

square wave

f (t + 2) = f (t)

T /2 < t < 0
half wave rectier
0 < t < T /2

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

20

21

HELM (VERSION 1: March 18, 2004): Workbook Level 2


23.2: Representing Periodic Functions by Fourier Series

Answers
1.



cos 5t
cos 3t
1 1
+
cos t
+
...
4
3
5


2 sin 2t sin 3t sin 5t 2 sin 6t
+
+
+
+ ...
2
3
5
6
+

2.
3.
4.

sin t +



cos 2t cos 3t cos 4t
4
1
cos t

+ ...
3 2
4
9
16


1
1
sin 3 t + sin 5 t + . . .
where = 2/T .
3
5
4

sin t +



cos 2t cos 3t
2
+
...
2 cos t
6
22
32


+

5.

sin t

sin 2t +
2

3 33


sin 3t

sin 4t + . . .
4



2A cos 2 t cos 4 t
A A
+ sin t
+
+ ...

(1)(3)
(3)(5)

Вам также может понравиться