0% found this document useful (0 votes)
48 views

HELM Fourier Series Workbook

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

HELM Fourier Series Workbook

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

About

 the  HELM  Project  


HELM   (Helping   Engineers   Learn   Mathematics)   materials   were   the   outcome   of   a   three-­‐year   curriculum  
development  project  undertaken  by  a  consortium  of  five  English  universities  led  by  Loughborough  University,  
funded   by   the   Higher   Education   Funding   Council   for   England   under   the   Fund   for   the   Development   of   Teaching  
and  Learning  for  the  period  October  2002  –  September  2005,  with  additional  transferability  funding  October  
2005  –  September  2006.  
HELM  aims  to  enhance  the  mathematical  education  of  engineering  undergraduates  through  flexible  learning  
resources,  mainly  these  Workbooks.  
HELM  learning  resources  were  produced  primarily  by  teams  of  writers  at  six  universities:  Hull,  Loughborough,  
Manchester,  Newcastle,  Reading,  Sunderland.  
HELM   gratefully   acknowledges   the   valuable   support   of   colleagues   at   the   following   universities   and   colleges  
involved  in  the  critical  reading,  trialling,  enhancement  and  revision  of  the  learning  materials:    
Aston,  Bournemouth  &  Poole  College,  Cambridge,  City,  Glamorgan,  Glasgow,  Glasgow  Caledonian,  Glenrothes  
Institute   of   Applied   Technology,   Harper   Adams,   Hertfordshire,   Leicester,   Liverpool,   London   Metropolitan,  
Moray   College,   Northumbria,   Nottingham,   Nottingham   Trent,   Oxford   Brookes,   Plymouth,   Portsmouth,  
Queens   Belfast,   Robert   Gordon,   Royal   Forest   of   Dean   College,   Salford,   Sligo   Institute   of   Technology,  
Southampton,   Southampton   Institute,   Surrey,   Teesside,   Ulster,   University   of   Wales   Institute   Cardiff,   West  
Kingsway  College  (London),  West  Notts  College.  
 

HELM  Contacts:  
Post:  HELM,  Mathematics  Education  Centre,  Loughborough  University,  Loughborough,  LE11  3TU.  
Email:  [email protected]          Web:  http://helm.lboro.ac.uk  
 

HELM  Workbooks  List  


1   Basic  Algebra   26   Functions  of  a  Complex  Variable  
2   Basic  Functions   27   Multiple  Integration  
3   Equations,  Inequalities  &  Partial  Fractions   28   Differential  Vector  Calculus  
4   Trigonometry   29   Integral  Vector  Calculus  
5   Functions  and  Modelling   30   Introduction  to  Numerical  Methods  
6   Exponential  and  Logarithmic  Functions   31   Numerical  Methods  of  Approximation  
7   Matrices   32   Numerical  Initial  Value  Problems  
8   Matrix  Solution  of  Equations   33   Numerical  Boundary  Value  Problems  
9   Vectors   34   Modelling  Motion  
10   Complex  Numbers   35   Sets  and  Probability  
11   Differentiation   36   Descriptive  Statistics  
12   Applications  of  Differentiation   37   Discrete  Probability  Distributions  
13   Integration   38   Continuous  Probability  Distributions  
14   Applications  of  Integration  1   39   The  Normal  Distribution  
15   Applications  of  Integration  2   40   Sampling  Distributions  and  Estimation  
16   Sequences  and  Series   41   Hypothesis  Testing  
17   Conics  and  Polar  Coordinates   42   Goodness  of  Fit  and  Contingency  Tables  
18   Functions  of  Several  Variables   43   Regression  and  Correlation  
19   Differential  Equations   44   Analysis  of  Variance  
20   Laplace  Transforms   45   Non-­‐parametric  Statistics  
21   z-­‐Transforms   46   Reliability  and  Quality  Control  
22   Eigenvalues  and  Eigenvectors   47   Mathematics  and  Physics  Miscellany  
23   Fourier  Series   48   Engineering  Case  Study  
24   Fourier  Transforms   49   Student’s  Guide  
25   Partial  Differential  Equations   50   Tutor’s  Guide  
 
©  Copyright    Loughborough  University,  2015
 
 
 
Production  of  this  2015  edition,  containing  corrections  and  minor  
revisions  of  the  2008  edition,  was  funded  by  the  sigma  Network.    

 
 
 
Contents 23
Fourier Series
23.1 Periodic Functions 2

23.2 Representing Periodic Functions by Fourier Series 9

23.3 Even and Odd Functions 30

23.4 Convergence 40

23.5 Half-range Series 46

23.6 The Complex Form 53

23.7 An Application of Fourier Series 68

Learning outcomes
In this Workbook you will learn how to express a periodic signal f(t) in a series of sines and
cosines. You will learn how to simplify the calculations if the signal happens to be an even
or an odd function. You will learn some brief facts relating to the convergence of the
Fourier series. You will learn how to approximate a non-periodic signal by a Fourier series.
You will learn how to re-express a standard Fourier series in complex form which paves the
way for a later examination of Fourier transforms. Finally you will learn about some simple
applications of Fourier series.
 

Periodic Functions 23.1


 

Introduction
You should already know how to take a function of a single variable f (x) and represent it by a
power series in x about any point x0 of interest. Such a series is known as a Taylor series or Taylor
expansion or, if x0 = 0, as a Maclaurin series. This topic was firs met in 16. Such an expansion
is only possible if the function is sufficiently smooth (that is, if it can be differentiated as often as
required). Geometrically this means that there are no jumps or spikes in the curve y = f (x) near
the point of expansion. However, in many practical situations the functions we have to deal with are
not as well behaved as this and so no power series expansion in x is possible. Nevertheless, if the
function is periodic, so that it repeats over and over again at regular intervals, then, irrespective of
the function’s behaviour (that is, no matter how many jumps or spikes it has), the function may be
expressed as a series of sines and cosines. Such a series is called a Fourier series.
Fourier series have many applications in mathematics, in physics and in engineering. For example
they are sometimes essential in solving problems (in heat conduction, wave propagation etc) that
involve partial differential equations. Also, using Fourier series the analysis of many engineering
systems (such as electric circuits or mechanical vibrating systems) can be extended from the case
where the input to the system is a sinusoidal function to the more general case where the input is
periodic but non-sinsusoidal.

 

Prerequisites • be familiar with trigonometric functions


Before starting this Section you should . . .

' 
$
• recognise periodic functions

• determine the frequency, the amplitude and


Learning Outcomes the period of a sinusoid
On completion you should be able to . . . • represent common periodic functions by
trigonometric Fourier series
& %

2 HELM (2015):
Workbook 23: Fourier Series
®

1. Introduction
You have met in earlier Mathematics courses the concept of representing a function by an infinite
series of simpler functions such as polynomials. For example, the Maclaurin series representing ex
has the form
x2 x3
ex = 1 + x + + + ...
2! 3!
or, in the more concise sigma notation,

X xn
ex =
n=0
n!
(remembering that 0! is defined as 1).
The basic idea is that for those values of x for which the series converges we may approximate the
function by using only the first few terms of the infinite series.
Fourier series are also usually infinite series but involve sine and cosine functions (or their complex
exponential equivalents) rather than polynomials. They are widely used for approximating periodic
functions. Such approximations are of considerable use in science and engineering. For example,
elementary a.c. theory provides techniques for analyzing electrical circuits when the currents and
voltages present are assumed to be sinusoidal. Fourier series enable us to extend such techniques
to the situation where the functions (or signals) involved are periodic but not actually sinusoidal.
You may also see in 25 that Fourier series sometimes have to be used when solving partial
differential equations.

2. Periodic functions
A function f (t) is periodic if the function values repeat at regular intervals of the independent variable
t. The regular interval is referred to as the period. See Figure 1.

f (t)

t
period

Figure 1
If P denotes the period we have
f (t + P ) = f (t)
for any value of t.

HELM (2015): 3
Section 23.1: Periodic Functions
The most obvious examples of periodic functions are the trigonometric functions sin t and cos t, both
of which have period 2π (using radian measure as we shall do throughout this Workbook) (Figure
2). This follows since
sin(t + 2π) = sin t and cos(t + 2π) = cos t

y = sin t y = cos t

1 1

π 2π t π 2π t

period period

Figure 2
The amplitude of these sinusoidal functions is the maximum displacement from y = 0 and is clearly
1. (Note that we use the term sinusoidal to include cosine as well as sine functions.)
More generally we can consider a sinusoid
y = A sin nt
which has maximum value, or amplitude, A and where n is usually a positive integer.
For example
y = sin 2t

is a sinusoid of amplitude 1 and period = π (Figure 3). The fact that the period is π follows
2
because
sin 2(t + π) = sin(2t + 2π) = sin 2t
for any value of t.

y = sin 2t
1

π π t
2

period

Figure 3

4 HELM (2015):
Workbook 23: Fourier Series
®

We see that y = sin 2t has half the period of sin t, π as opposed to 2π (Figure 4). This can
alternatively be phrased by stating that sin 2t oscillates twice as rapidly (or has twice the frequency)
of sin t.

y = sin t
y = sin 2t
1

π 2π t

Figure 4

In general y = A sin nt has amplitude A, period and completes n oscillations when t changes
n
by 2π. Formally, we define the frequency of a sinusoid as the reciprocal of the period:
1
frequency =
period
and the angular frequency, often denoted the Greek Letter ω (omega) as

angular frequency = 2π × frequency =
period
n
Thus y = A sin nt has frequency and angular frequency n.

Task
State the amplitude, period, frequency and angular frequency of
2t
(a) y = 5 cos 4t (b) y = 6 sin .
3

Your solution
(a)

Answer
2π π 2
amplitude 5, period = , frequency , angular frequency 4
4 2 π

Your solution
(b)

Answer
1 2
amplitude 6, period 3π, frequency , angular frequency
3π 3

HELM (2015): 5
Section 23.1: Periodic Functions
Harmonics
In representing a non-sinusoidal function of period 2π by a Fourier series we shall see shortly that
only certain sinusoids will be required:

(a) A1 cos t (and B1 sin t)


These also have period 2π and together are referred to as the first harmonic (or
fundamental harmonic).
(b) A2 cos 2t (and B2 sin 2t)
These have half the period, and double the frequency, of the first harmonic and are
referred to as the second harmonic.
(c) A3 cos 3t (and B3 sin 3t)

These have period and constitute the third harmonic.
3
In general the Fourier series of a function of period 2π will require harmonics of the type
An cos nt ( and Bn sin nt) where n = 1, 2, 3, . . .

Non-sinusoidal periodic functions


The following are examples of non-sinusoidal periodic functions (they are often called “waves”).
Square wave
f (t)
1
−π π 2π t
−1

Figure 5
Analytically we can describe this function as follows:

−1 −π < t < 0
f (t) = (which gives the definition over one period)
+1 0<t<π
f (t + 2π) = f (t) (which tells us that the function has period 2π)
Saw-tooth wave
f (t)
4

−2 2 4 t

Figure 6
In this case we can describe the function as follows:
f (t) = 2t 0<t<2 f (t + 2) = f (t)
1 2π
Here the period is 2, the frequency is and the angular frequency is = π.
2 2

6 HELM (2015):
Workbook 23: Fourier Series
®

Triangular wave

f (t)
π

−π π 2π t

Figure 7
Here we can conveniently define the function using −π < t < π as the “basic period”:

−t −π < t < 0
f (t) =
t 0<t<π
or, more concisely,
f (t) = |t| −π <t<π
together with the usual statement on periodicity
f (t + 2π) = f (t).

Task
Write down an analytic definition for the following periodic function:

f (t)
2

−2 3
−5 −3 2 5 t
−1

Your solution

Answer

2−t 0<t<3
f (t) = f (t + 5) = f (t)
−1 3<t<5

HELM (2015): 7
Section 23.1: Periodic Functions
Task
Sketch the graphs of the following periodic functions showing all relevant values:
 2
 t /2 0<t<4
(a) f (t) = 8 4<t<6 f (t + 8) = f (t)
0 6<t<8

(b) f (t) = 2t − t2 0<t<2 f (t + 2) = f (t)

Your solution

Answer
f (t)
(a)
8

4 6 8 t
period
f (t)
(b)

1 2 t
period

Figure 9

8 HELM (2015):
Workbook 23: Fourier Series
®

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 X
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 (for n = 0, 1, 2, 3 . . . and
bn (for 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
&
# %
• calculate Fourier coefficients of a function of
period 2π
Learning Outcomes
• calculate Fourier coefficients of a function of
On completion you should be able to . . .
general period
" !

HELM (2015): 9
Section 23.2: Representing Periodic Functions by Fourier Series
1. Introduction
We recall first a simple trigonometric identity:
1 1
cos 2t = −1 + 2 cos2 t or equivalently cos2 t = + cos 2t (1)
2 2
Equation 1 can be interpreted as a simple finite Fourier series representation of the periodic function
f (t) = cos2 t which has period π. We note that the Fourier series representation contains a constant
term and a period π term.
A more complicated trigonometric identity is
3 1 1
sin4 t = − cos 2t + cos 4t (2)
8 2 8
which again can be considered as a finite 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
1
written in terms of a constant function, a function of period π or frequency (the “first harmonic”)
π
π 2
and a function of period or frequency (the “second harmonic”).
2 π
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. Therefore, so 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 such
n
Fourier series to contain harmonics of frequency (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
a0
f (t) = + a1 cos t + a2 cos 2t + . . . + b1 sin t + b2 sin 2t + . . .
2
a0
The reason for labelling the constant term as will be discussed later. The amplitudes a1 , a2 , . . .
2
b1 , b2 , . . . of the sinusoids are called Fourier coefficients.
Obtaining the Fourier coefficients 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.

10 HELM (2015):
Workbook 23: Fourier Series
®

Task
Consider the square wave of period 2π one period of which
is shown in Figure 10.

−π −π π π t
2 2

(a) Write down the analytic description of this function,


(b) State whether you expect the Fourier series of this function to contain
a constant term,
(c) List any other possible features of the Fourier series that you might
expect from the graph of the square-wave function.

Your solution

Answer
(a) We have
 π π
 4
 − <t<
2 2

f (t) =
 0 −π < t < − π , π < t < π


2 2
f (t + 2π) = f (t)

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

HELM (2015): 11
Section 23.2: Representing Periodic Functions by Fourier Series
It is possible to show, and we will do so later, that the Fourier series representation of this square
wave is
 
8 1 1 1
2+ cos t − cos 3t + cos 5t − cos 7t + . . .
π 3 5 7
i.e. the Fourier coefficients are
a0 8 8 8
= 2, a1 = , a2 = 0, a3 = − , a4 = 0, a5 = ,...
2 π 3π 5π
Note, as well as the presence of the constant term and of the cosine (but not sine) terms, that only
2π 2π 2π
odd harmonics are present i.e. sinusoids of period 2π, , , , . . . or of frequency 1, 3, 5, 7, . . .
3 5 7
1
times the fundamental frequency .

We now show in Figure 8 graphs of
(i) the square wave

(ii) the first two terms of the Fourier series representing the square wave

(iii) the first three terms of the Fourier series representing the square wave

(iv) the first four terms of the Fourier series representing the square wave

(v) the first five terms of the Fourier series representing the square wave
Note: We show the graphs for 0 < t < π only since the square wave and its Fourier series are even.

(i)
4

−π −π π π t
2 2

(ii) 8 (iii) 8 1
2+ cos t 2+ (cos t − cos 3t )
π π 3
4 4

π t π t
2 π 2 π
8 1 1 1
(iv) 8 1 1 2+ (cos t − cos 3t + cos 5t − cos 7t )
2 + (cos t − cos 3t + cos 5t ) (v) π 3 5 7
π 3 5
4 4

π t π t
2 π π
2

Figure 8

12 HELM (2015):
Workbook 23: Fourier Series
®

We can clearly see from Figure 8 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 = , is slightly more complicated
2
and it is possible to show that however many terms are taken in the Fourier series, some “overshoot”
will always occur. This effect, which we do not discuss further, is known as the Gibbs Phenomenon.)

Orthogonality properties of sinusoids


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

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

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

Task Z π Z π
Find sin nt dt and cos nt dt where n is an integer.
−π −π

Your solution

Answer
In fact both integrals are zero for
Z π  π
1 1
sin nt dt = − cos nt = (− cos nπ + cos nπ) = 0 n 6= 0 (4)
−π n −π n
Z π  π
1
cos nt dt = sin nt =0 6 0
n= (5)
−π n −π

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

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
task.

HELM (2015): 13
Section 23.2: Representing Periodic Functions by Fourier Series
Task
Integrate both sides of (3) from −π to π and use the results from the previous
Task. Hence obtain an expression for a0 .

Your solution

Answer
We get for the left-hand side
Z π
f (t)dt
−π

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


Integrating the right-hand side term by term we get
∞ Z π π ∞
1 π
Z π  
1
Z X X
a0 dt + an cos nt dt + bn sin nt dt = a0 t + {0 + 0}
2 −π n=1 −π −π 2 −π n=1

(using the integrals (4) and (5) shown above). Thus we get
Z π
1 1 π
Z
f (t) dt = (2a0 π) or a0 = f (t) dt (6)
−π 2 π −π

Key Point 1
The constant term in a trigonometric Fourier series for a function of period 2π is
Z π
a0 1
= f (t) dt = average value of f (t) over 1 period.
2 2π −π

14 HELM (2015):
Workbook 23: Fourier Series
®

This result ties in with our earlier discussion on the significance 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 (Figure 9) is an example.

f (t)
1

π 2π t

−1

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

Task
Using the standard trigonometric identity that
1
sin nt cos mt ≡ {sin(n + m)t + sin(n − m)t}
2
Z π
evaluate sin nt cos mt dt where n and m are any integers.
−π

Your solution

Answer
We get
Z π Z π Z π 
1 1
sin nt cos mt dt = sin(n + m)t dt + sin(n − m)t dt = {0 + 0} = 0
−π 2 −π −π 2

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

HELM (2015): 15
Section 23.2: Representing Periodic Functions by Fourier Series
Key Point 2
Orthogonality Relation
For any integers m, n, including the case m = n,
Z π
sin nt cos mt dt = 0
−π

We shall use this result shortly but need a few more integrals first.
Consider next
Z π
cos nt cos mt dt where m and n are integers.
−π

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


π π
1
Z Z
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
Z Z
2
cos nt dt = (1 + cos 2nt) dt
−π 2 −π
 π
1 1
= t+ sin 2nt =π ( provided n 6= 0)
2 2n −π


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

Task
Proceeding in a similar way to the above, evaluate
Z π
sin nt sin mt dt
−π

for integers m and n.


Again consider separately the three cases: (a) n 6= m, (b) n = m 6= 0 and (c)
n = m = 0.

16 HELM (2015):
Workbook 23: Fourier Series
®

Your solution

Answer
(a) Using the identity sin nt sin mt ≡ 12 {cos(n − m)t − cos(n + m)t} and integrating the right-
hand side terms, we get, using (4) and (5)
Z π
sin nt sin mt dt = 0 n, m integers n 6= m
−π

(b) Using the identity cos 2θ = 1 − 2 sin2 θ with θ = nt gives for n = m 6= 0


Z π
1 π
Z
2
sin nt dt = (1 − cos 2nt)dt = π
−π 2 −π
Z π
(c) When n = m = 0, sin nt sin mt dt = 0.
−π

We summarise these results in the following Key Point:

Key Point 3
For integers n, m
Z π
sin nt cos mt dt = 0
−π

Z π  0 n 6= m
cos nt cos mt dt = π n = m 6= 0
−π 
2π n = m = 0
Z π 
0 n 6= m, n = m = 0
sin nt sin mt dt =
−π π n=m

All these results hold for any integration range of width 2π.

HELM (2015): 17
Section 23.2: Representing Periodic Functions by Fourier Series
3. Calculation of Fourier coefficients
Consider the Fourier series for a function f (t) of period 2π:

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

To obtain the coefficients 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
Z π
f (t) cos mt dt
−π

For the right-hand side we obtain


∞ 
a0 π
Z X Z π Z π 
cos mt dt + an cos nt cos mt dt + bn sin nt cos mt dt
2 −π n=1 −π −π

The first 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 Key Point 3
Z π
cos2 mt dt = π
−π

Hence
Z π
f (t) cos mt dt = am π
−π

from which the coefficient am can be obtained.


Rewriting m as n we get
1 π
Z
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
a0
is .)
2
From (8)
an = 2 × average value of f (t) cos nt over one period.

18 HELM (2015):
Workbook 23: Fourier Series
®

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

Your solution

Answer
A similar calculation to that performed to find the an gives
π π ∞ Z π π 
a0
Z Z X Z
f (t) sin mt dt = sin mt dt + an cos nt sin mt dt + bn sin nt sin mt dt
−π 2 −π n=1 −π −π

All terms on the right-hand side integrate to zero except for the case n = m where
Z π
bm sin2 mt dt = bm π
−π

Relabelling m as n gives
1 π
Z
bn = f (t) sin nt dt n = 1, 2, 3, . . . (9)
π −π
(There is no Fourier coefficient b0 .)
Clearly bn = 2 × average value of f (t) sin nt over one period.

HELM (2015): 19
Section 23.2: Representing Periodic Functions by Fourier Series
Key Point 4
A function f (t) with period 2π has a Fourier series

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

The Fourier coefficients are


π
1
Z
an = f (t) cos nt dt n = 0, 1, 2, . . .
π −π
π
1
Z
bn = f (t) sin nt dt n = 1, 2, . . .
π −π

In the integrals any convenient integration range extending over an interval of 2π may be used.

4. Examples of Fourier series


We shall obtain the Fourier series of the “half-rectified” square wave shown in Figure 10.

f (t)
1

π 2π t
period

Figure 10
We have

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

The calculation of the Fourier coefficients is merely straightforward integration using the results
already obtained:
1 π
Z
an = f (t) cos nt dt
π −π
in general. Hence, for our square wave

1 π

1 sin nt
Z
an = (1) cos nt dt = =0 provided n 6= 0
π 0 π n 0

20 HELM (2015):
Workbook 23: Fourier Series
®

π
1 a0 1
Z
But a0 = (1) dt = 1 so the constant term is = .
π 0 2 2
1
(The square wave takes on values 1 and 0 over equal length intervals of t so is clearly the mean
2
value.)
Similarly
π  π
1 1 cos nt
Z
bn = (1) sin nt dt = −
π 0 π n 0

Some care is needed now!


1
bn = (1 − cos nπ)

But cos nπ = +1 n = 2, 4, 6, . . . ,

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

However, cos nπ = −1 n = 1, 3, 5, . . .
1 2
∴ bn = (1 − (−1)) = n = 1, 3, 5, . . .
nπ nπ
2 2 2
i.e. b1 = , b3 = , b5 = ,...
π 3π 5π
Hence the required Fourier series is


a0 X
f (t) = + (an cos nt + bn sin nt) in general
2 n=1
 
1 2 1 1
f (t) = + sin t + sin 3t + sin 5t + . . . in this case
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 X 1
+ sin nt or, since n is odd, we may write n = 2k − 1 k = 1, 2, . . . and write the
2 π n=1 n
(n odd)

1 2X 1
Fourier series as + sin(2k − 1)t
2 π k=1 (2k − 1)

HELM (2015): 21
Section 23.2: Representing Periodic Functions by Fourier Series
Task
Obtain the Fourier series of the square wave one period of which is shown:

−π −π π π t
2 2

Your solution

22 HELM (2015):
Workbook 23: Fourier Series
®

Answer
We have, since the function is non-zero only for − π2 < t < π2 ,
Z π
1 2
a0 = 4 dt = 4
π − π2
a0
∴ = 2 is the constant term as we would expect. Also
2
Z π  π
1 2 4 sin nt 2
an = 4 cos nt dt =
π − π2 π n −π
2

4 n  nπ o  nπ  8  nπ 
= sin − sin − = sin n = 1, 2, 3, . . .
nπ 2 2 nπ 2
It follows from a knowledge of the sine function that


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




 8

an = n = 1, 5, 9, . . .
 nπ


8


 −

 n = 3, 7, 11, . . .

Also
Z π  π
1 2 4 cos nt 2 4 n  nπ   nπ o
bn = 4 sin nt dt = − =− cos − cos − =0
π − π2 π n −π nπ 2 2
2

Hence, the required Fourier series is


 
8 1 1 1
f (t) = 2 + cos t − 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 wave was used earlier and we have already sketched the
form of the Fourier series for 2, 3, 4 and 5 terms in Figure 8.

Clearly, in finding the Fourier series of square waves, the integration is particularly simple because
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 coefficients an , bn to the case of a periodic function of arbitrary period, rather than confining
ourselves to period 2π.

HELM (2015): 23
Section 23.2: Representing Periodic Functions by Fourier Series
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 X
f (x) = + (an cos nx + bn sin nx)
2 n=1

with
π π
1 1
Z Z
an = f (x) cos nx dx n = 0, 1, 2, . . . bn = f (x) sin nx dx n = 1, 2, . . .
π −π π −π


Suppose we now change the variable to t where x = t.
T
Thus x = π corresponds to t = T /2 and x = −π corresponds to t = −T /2.
Hence regarded as a function of t, we have a function with period T .
2π 2π
Making the substitution x = t, and hence dx = dt, in the expressions for an and bn we obtain
T T
Z T  
2 2 2nπt
an = f (t) cos dt n = 0, 1, 2 . . .
T − T2 T
Z T  
2 2 2nπt
bn = f (t) sin dt n = 1, 2 . . .
T − T2 T
These integrals give the Fourier coefficients for a function of period T whose Fourier series is
∞     
a0 X 2nπt 2nπt
f (t) = + an cos + bn sin
2 n=1
T T
Various other notations are commonly used in this case e.g. it is sometimes convenient to write
the period T = 2`. (This is particularly useful when Fourier series arise in the solution of partial
differential equations.) Another alternative is to use the angular frequency ω and put T = 2π/ω.

Task
Write down the form of the Fourier series and expressions for the coefficients if
(a) T = 2` (b) T = 2π/ω.

Your solution

24 HELM (2015):
Workbook 23: Fourier Series
®

Answer
∞ 
1 `
     
a0 X nπt nπt nπt
Z
(a) f (t) = + an cos + bn sin with an = f (t) cos dt
2 n=1
` ` ` −` `
and similarly for bn .
∞ Z π
a0 X ω ω
(b) f (t) = + {an cos(nωt) + bn sin(nωt)} with an = f (t) cos(nωt) dt
2 n=1
π − ωπ
and similarly for bn .


You should note that, as usual, any convenient integration range of length T (or 2` or ) can be
ω
used in evaluating an and bn .

Example 1
Find the Fourier series of the function shown in Figure 11 which is a saw-tooth
wave with alternate portions removed.

f (t)
2

−2 2 t

Figure 11

Solution
Here the period T = 2` = 4 so ` = 2. The Fourier series will have the form
∞     
a0 X nπt nπt
f (t) = + an cos + bn sin
2 n=1
2 2
The coefficients an are given by
1 2
 
nπt
Z
an = f (t) cos dt
2 −2 2
where

−2 < t < 0
0
f (t) = f (t + 4) = f (t)
t
0<t<2
1 2
 
nπt
Z
Hence an = t cos dt.
2 0 2

HELM (2015): 25
Section 23.2: Representing Periodic Functions by Fourier Series
Solution (contd.)
The integration is readily performed using integration by parts:
Z 2     2 Z 2  
nπt 2 nπt 2 nπt
t cos dt = t sin − sin dt
0 2 nπ 2 0 nπ 0 2
  2
4 nπt
= cos n 6= 0
n2 π 2 2 0

4
= (cos nπ − 1).
n2 π 2
2
1 nπt
Z
Hence, since an = t cos( )dt
2 0 2


 0 n = 2, 4, 6, . . .
an =
 − 4

n = 1, 3, 5, . . .
n2 π 2
2
a0 1
Z
The constant term is where a0 = t dt = 1.
2 2 0

Similarly
2  
1 nπt
Z
bn = t sin dt
2 0 2
where
2     2 Z 2  
nπt 2 nπt 2 nπt
Z
t sin dt = −t cos + cos dt.
0 2 nπ 2 0 nπ 0 2

The second integral gives zero. Hence



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




2 
bn = − cos nπ =
nπ 
 2
 +
 n = 1, 3, 5, . . .

Hence, using all these results for the Fourier coefficients, the required Fourier series is
       
1 4 πt 1 3πt 1 5πt
f (t) = − cos + cos + cos + ...
2 π2 2 9 2 25 2
       
2 πt 1 2πt 1 3πt
+ sin − sin + sin ...
π 2 2 2 3 2
1 1
Notice that because the Fourier coefficients depend on (rather than as was the case for
n2 n
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 saw-tooth function
using only a quite small number of terms in the series.

26 HELM (2015):
Workbook 23: Fourier Series
®

Task
Obtain the Fourier series of the function

f (t) = t2 −1<t<1
f (t + 2) = f (t)

f (t)

−2 −1 1 2 t

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

Answer
Since T = 2` = 2 and since the function has a non-zero average value, the form of the Fourier
series is

a0 X
+ {an (cos nπt) + bn sin(nπt)}
2 n=1

Now write out integral expressions for an and bn . Will there be a constant term in the Fourier series?
Your solution

Answer
Because the function is non-negative there will be a constant term. Since T = 2` = 2 then ` = 1
and we have
Z 1
an = t2 cos(nπt) dt n = 0, 1, 2, . . .
−1
Z 1
bn = t2 sin(nπt) dt n = 1, 2, . . .
−1

1
a0
Z
The constant term will be where a0 = t2 dt.
2 −1

HELM (2015): 27
Section 23.2: Representing Periodic Functions by Fourier Series
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 .

Your solution

Answer
The integral for bn is zero for all n because the integrand is an odd function of t. Since the integrand
is even in the integrals for an we can write
Z 1
an = 2 t2 cos nπt dt n = 0, 1, 2, . . .
0
1
ao 2
Z
The constant term will be where a0 = 2 t2 dt = .
2 0 3
For n = 1, 2, 3, . . . we must integrate by parts (twice)
( 1 Z 1 )
t2 2
an = 2 sin(nπt) − t sin(nπt) dt
nπ 0 nπ 0
( 1 Z 1 )
4 t 1
= − − cos(nπt) + cos(nπt) dt .
nπ nπ 0 nπ 0

4
The integral in the second term gives zero so an = cos nπ.
n2 π 2
Now writing out the final form of the Fourier series we have
∞  
1 4 X cos nπ 1 4 1 1
f (t) = + 2 cos(nπt) = + 2 − cos(πt) + cos(2πt) − cos(3πt) + . . .
3 π n=1 n2 3 π 4 9

28 HELM (2015):
Workbook 23: Fourier Series
®

Exercises
For each of the following periodic signals

• sketch the given function over a few periods

• find the trigonometric Fourier coefficients

• write out the first few terms of the Fourier series.



1 0 < t < π/2
1. f (t) = f (t + 2π) = f (t) square wave
0 π/2 < t < 2π

2. f (t) = t2 − 1 < t < 1 f (t + 2) = f (t)



−1 −T /2 < t < 0
3. f (t) = f (t + T ) = f (t) square wave
1 0 < t < T /2


 0 −π < t < 0
4. f (t) = f (t + 2π) = f (t)
2
t 0<t<π

−T /2 < t < 0

0

5. f (t) = f (t + T ) = f (t) half-wave rectifier
A sin 2πt

0 < t < T /2
T
Answers
1.
 
1 1 cos 3t cos 5t
+ cos t − + − ...
4 π 3 5
 
1 2 sin 2t sin 3t sin 5t 2 sin 6t
+ sin t + + + + + ...
π 2 3 5 6
 
1 4 cos 2πt cos 3πt cos 4πt
2. − cos πt − + − + ...
3 π2 4 9 16
 
4 1 1
3. sin ω t + sin 3 ω t + sin 5ω t + . . . where ω = 2π/T .
π 3 5
4.
π2
 
cos 2t cos 3t
− 2 cos t − + − ...
6 22 32
    
4 π π 4 π
+ π− sin t − sin 2t + − sin 3t − sin 4t + . . .
π 2 3 33 π 4
 
A A 2A cos 2 ω t cos 4ω t
5. + sin ω t − + + ...
π 2 π (1)(3) (3)(5)

HELM (2015): 29
Section 23.2: Representing Periodic Functions by Fourier Series
Even and Odd  

Functions 23.3
 

Introduction
In this Section we examine how to obtain Fourier series of periodic functions which are either even
or odd. We show that the Fourier series for such functions is considerably easier to obtain as, if the
signal is even only cosines are involved whereas if the signal is odd then only sines are involved. We
also show that if a signal reverses after half a period then the Fourier series will only contain odd
harmonics.

' $
• know how to obtain a Fourier series

Prerequisites • be able to integrate functions involving


sinusoids
Before starting this Section you should . . .
• have knowledge of integration by parts
&
# %
• determine if a function is even or odd or
neither
Learning Outcomes
On completion you should be able to . . . • easily calculate Fourier coefficients of even or
odd functions
" !

30 HELM (2015):
Workbook 23: Fourier Series
®

1. Even and odd functions


We have shown in the previous Section how to calculate, by integration, the coefficients an (n =
0, 1, 2, 3, . . .) and bn (n = 1, 2, 3, . . .) in a Fourier series. Clearly this is a somewhat tedious pro-
cess and it is advantageous if we can obtain as much information as possible without recourse to
integration. In the previous Section we showed that the square wave (one period of which shown in
Figure 12) has a Fourier series containing a constant term and cosine terms only (i.e. all the Fourier
coefficients bn are zero) while the function shown in Figure 13 has a more complicated Fourier series
containing both cosine and sine terms as well as a constant.

−π −π π π t
2 2

Figure 12: Square wave

f (t)
2

−2 2 t

Figure 13: Saw-tooth wave

Task
Contrast the symmetry or otherwise of the functions in Figures 12 and 13.

Your solution

Answer
The square wave in Figure 12 has a graph which is symmetrical about the y-axis and is called an
even function. The saw-tooth wave shown in Figure 13 has no particular symmetry.
In general a function is called even if its graph is unchanged under reflection in the y-axis. This is
equivalent to
f (−t) = f (t) for all t
Obvious examples of even functions are t2 , t4 , |t|, cos t, cos2 t, sin2 t, cos nt.
A function is said to be odd if its graph is symmetrical about the origin (i.e. it has rotational
symmetry about the origin). This is equivalent to the condition
f (−t) = −f (t)

HELM (2015): 31
Section 23.3: Even and Odd Functions
Figure 14 shows an example of an odd function.

f (t)

Figure 14
Examples of odd functions are t, t3 , sin t, sin nt. A periodic function which is odd is the saw-tooth
wave in Figure 15.

f (t)

−1 1 t

−1

Figure 15
Some functions are neither even nor odd. The periodic saw-tooth wave of Figure 13 is an example;
another is the exponential function et .

Task
State the period of each of the following periodic functions and say whether it is
even or odd or neither.
(a) f (t) (b) f (t)

π
−π π t −π −π − π 4
π
2
π t
2 4

Your solution

Answer
(a) is neither even nor odd (with period 2π)
(b) is odd (with period π).

32 HELM (2015):
Workbook 23: Fourier Series
®

A Fourier series contains a sum of terms while the integral formulae for the Fourier coefficients an
and bn contain products of the type f (t) cos nt and f (t) sin nt. We need therefore results for sums
and products of functions.
Suppose, for example, g(t) is an odd function and h(t) is an even function.

Let F1 (t) = g(t) h(t) (product of odd and even functions)


so F1 (−t) = g(−t)h(−t) (replacing t by − t)
= (−g(t))h(t) (since g is odd and h is even)
= −g(t)h(t)
= −F1 (t)

So F1 (t) is odd.

Now suppose F2 (t) = g(t) + h(t) (sum of odd and even functions)
∴ F2 (−t) = g(−t) + h(t)
= −g(t) + h(t)

We see that 6
F2 (−t) = F2 (t)
and F2 (−t) = 6 −F2 (t)

So F2 (t) is neither even nor odd.

Task
Investigate the odd/even nature of sums and products of
(a) two odd functions g1 (t), g2 (t)
(b) two even functions h1 (t), h2 (t)

Your solution

HELM (2015): 33
Section 23.3: Even and Odd Functions
Answer

G1 (t) = g1 (t)g2 (t)


G1 (−t) = (−g1 (t))(−g2 (t))
= g1 (t)g2 (t)
= G1 (t)

so the product of two odd functions is even.

G2 (t) = g1 (t) + g2 (t)


G2 (−t) = g1 (−t) + g2 (−t)
= −g1 (t) − g2 (t)
= −G2 (t)

so the sum of two odd functions is odd.

H1 (t) = h1 (t)h2 (t)


H2 (t) = h1 (t) + h2 (t)

A similar approach shows that

H1 (−t) = H1 (t)
H2 (−t) = H2 (t)

i.e. both the sum and product of two even functions are even.

These results are summarized in the following Key Point.

Key Point 5
Products of functions

(even) × (even) = (even)


(even) × (odd) = (odd)
(odd) × (odd) = (even)

Sums of functions

(even) + (even) = (even)


(even) + (odd) = (neither)
(odd) + (odd) = (odd)

34 HELM (2015):
Workbook 23: Fourier Series
®

Useful properties of even and of odd functions in connection with integrals can be readily deduced if
we recall that a definite integral has the significance of giving us the value of an area:

y = f (t)

a
b t

Figure 16
Z b
f (t) dt gives us the net value of the shaded area, that above the t-axis being positive, that below
a
being negative.

Task
For the case of a symmetrical interval (−a, a) deduce what you can about
Z a Z a
g(t) dt and h(t) dt
−a −a

where g(t) is an odd function and h(t) is an even function.

h(t)
g(t)

−a
a t −a a t

Your solution

Answer
We have
Z a
g(t) dt = 0 for an odd function
−a

Z a Z a
h(t) dt = 2 h(t) dt for an even function
−a 0

(Note that neither result holds for a function which is neither even nor odd.)

HELM (2015): 35
Section 23.3: Even and Odd Functions
2. Fourier series implications
Since a sum of even functions is itself an even function it is not unreasonable to suggest that a Fourier
series containing only cosine terms (and perhaps a constant term which can also be considered as
an even function) can only represent an even periodic function. Similarly a series of sine terms (and
no constant) can only represent an odd function. These results can readily be shown more formally
using the expressions for the Fourier coefficients an and bn .

Task
Recall that for a 2π-periodic function
1 π
Z
bn = f (t) sin nt dt
π −π
If f (t) is even, deduce whether the integrand is even or odd (or neither) and hence
evaluate bn . Repeat for the Fourier coefficients an .

Your solution

Answer
We have, if f (t) is even,
f (t) sin nt = (even) × (odd) = odd
1 π
Z
hence bn = (odd function) dt = 0
π −π
Thus an even function has no sine terms in its Fourier series.
Also f (t) cos nt = (even) × (even) = even
1 π 2 π
Z Z
∴ an = (even function) dt = f (t) cos nt dt.
π −π π 0

It should be obvious that, for an odd function f (t),


1 π 1 π
Z Z
an = f (t) cos nt dt = (odd function) dt = 0
π −π π −π
2 π
Z
bn = f (t) sin nt dt
π 0
Analogous results hold for functions of any period, not necessarily 2π.

36 HELM (2015):
Workbook 23: Fourier Series
®

For a periodic function which is neither even nor odd we can expect at least some of both the an
and bn to be non-zero. For example consider the square wave function:

f (t)
1

−π π 2π t

Figure 17: Square wave


This function is neithereven nor odd and we have already seen in Section 23.2 that its Fourier series
contains a constant 12 and sine terms.
This result could be expected because we can write

1
f (t) = + g(t)
2

where g(t) is as shown:

g(t)
1
2

−π π 2π t
−1
2

Figure 18
Clearly g(t) is odd and will contain only sine terms. The Fourier series are in fact
 
1 2 1 1
f (t) = + sin t + sin 3t + sin 5t + . . .
2 π 3 5

and
 
2 1 1
g(t) = sin t + sin 3t + sin 5t + . . .
π 3 5

HELM (2015): 37
Section 23.3: Even and Odd Functions
Task
For each of the following functions deduce whether the corresponding Fourier series
contains
(a) sine terms only or cosine terms only or both
(b) a constant term

y
1 2
y

−π π
−π 0 π t 0 t

3 y 4 y

−π 0 π t −π −a 0 a π t

5 y 6 y

−π 0 π 2π −π 0 π 2π t
t

7 y

−π 0 π 2π t

Your solution

Answer
1. cosine terms only (plus constant). 5. sine terms only (no constant).
2. cosine terms only (no constant). 6. sine and cosine terms (plus constant).
3. sine terms only (no constant). 7. cosine terms only (plus constant).
4. cosine terms only (plus constant).

38 HELM (2015):
Workbook 23: Fourier Series
®

Task
Confirm the result obtained for the triangular wave, function 7 in the last Task,
by finding the Fourier series fully. The function involved is

f (t) = |t| −π <t<π


f (t + 2π) = f (t)

Your solution

Answer
Since f (t) is even we can say immediately
bn = 0 n = 1, 2, 3, . . .
Also

0 n even
π

2
Z 
an = t cos nt dt = (after integration by parts)
π 0  − 4

n odd
n2 π
π
2
Z
Also a0 = t dt = π so the Fourier series is
π 0
 
π 4 1 1
f (t) = − cos t + cos 3t + cos 5t + . . .
2 π 9 25

HELM (2015): 39
Section 23.3: Even and Odd Functions
 

Convergence 23.4 

Introduction
In this Section we examine, briefly, the convergence characteristics of a Fourier series. We have seen
that a Fourier series can be found for functions which are not necessarily continuous (there may be
jumps in the curve) − the only requirement that we have made is that the function be periodic. We
have seen that the more terms we take in the Fourier series the better is the approximation to the
given signal. But an obvious question to ask is what happens at the points of discontinuity? What
does the Fourier series converge to at these points? It must converge to something (finite) since a
Fourier series is a sum of very smooth continuous functions. In this Section we give the answer to
this question.

 
• know how to obtain a Fourier series
Prerequisites
• be familiar with the limit process as applied
Before starting this Section you should . . . to functions

' 
$
• determine what a Fourier series converges to
at each point, including at a point of
Learning Outcomes discontinuity
On completion you should be able to . . . • use the convergence property of Fourier
Series to obtain series for the number π
& %

40 HELM (2015):
Workbook 23: Fourier series
®

1. Convergence of a Fourier series


We have now shown how to obtain a Fourier series for periodic functions. We have suggested that
we would expect to be able to approximate such functions by using a few terms of the Fourier series.
The detailed question of the convergence or otherwise of Fourier series has not been discussed.
The reason for this is that the great majority of functions likely to be encountered in practice have
Fourier series that do indeed converge and can therefore be safely used as approximations.
The precise conditions that have to be fulfilled for a Fourier series to converge are known as Dirichlet
conditions after the French mathematician who investigated the matter. The three conditions are
listed in the following Key Point.

Key Point 6
The Dirichlet conditions for the convergence of a Fourier series of a periodic function f (t) are:

1. f (t) must have only a finite number of finite discontinuities, within one period

2. f (t) must have a finite number of maxima and minima over one period
Z T
2
3. the integral |f (t)| dt must be finite.
− T2

It follows, for example, that if f (t) is defined over (−π, π) as one of the following functions t3 or
1/(t − 4) or 3t + 2 and f (t + 2π) = f (t), then f (t) can indeed be represented as a Fourier series as
each function satisfies the Dirichlet conditions.
1 1
On the other hand, if, over (−π, π), f (t) is or or tan t then f (t) cannot be expanded in a
t t−2
Fourier series because each of these functions has an infinite discontinuity within (−π, π).
If the Dirichlet conditions are satisfied at a point t = t0 where f (t) is continuous then, as we would
expect, the Fourier series at t0 given by
∞     
a0 X 2nπt0 2nπt0
+ an cos + bn sin converges to the function value f (t0 )
2 n=1
T T

At a point, say t = t1 , at which f (t) has a discontinuity then the series


∞     
a0 X 2nπt1 2nπt1 1
+ an cos + bn sin converges to {f (t1− ) + f (t1+ )}
2 n=1
T T 2

where f (t1− ) is the limit of f (t) as t approaches t1 from the left and f (t1+ ) is the limit as t approaches
t1 from the right (Figure 19).

HELM (2015): 41
Section 23.4: Convergence
f (t)

t1 t

Figure 19

Key Point 7
If Dirichlet conditions are satisfied then at a point of continuity t = to
∞     
a0 X 2nπt0 2nπt0
f (t0 ) = + an cos + bn sin
2 n=1
T T
whereas at a point of discontinuity t = t1 the Fourier series converges to the average of the two
limiting values
∞     
1 a0 X 2nπt1 2nπt1
{f (t1− ) + f (t1+ )} = + an cos + bn sin
2 2 n=1
T T

Example 2
Suppose we consider the square wave

f (t)
1

−π π 2π t

Figure 20
Here f (t) has finite discontinuities at −π, 0 and π. The Fourier series of f (t) is (see Section 23.3,
subsection 2)
 
1 2 1 1
+ sin t + sin 3t + sin 5t + . . . .
2 π 3 5

42 HELM (2015):
Workbook 23: Fourier series
®

π π 
At t = , for example, where f (t) is continuous the square wave converges to f = 1. On the
2 2
1
other hand at t = π the Fourier series clearly has the value (since all the sine terms are zero here).
2
1 π 1 1
This value agrees with the average of the two limiting values of f (t) at t = : (1 + 0) = . If
2 2 2 2
π
we actually put t = in the Fourier series we obtain
2
       
1 2 π 1 3π 1 5π
+ sin + sin + sin + ...
2 π 2 3 2 5 2
 
1 2 1 1 1
= + 1 − + − + ...
2 π 3 5 7
π 
Since the series converges, as we have seen, to f = 1, we obtain the interesting result
2
 
1 2 1 1 1 1 1 1 π
+ 1 − + − + . . . = 1 or 1 − + − + . . . =
2 π 3 5 7 3 5 7 4

Task
The function

0 −π < t < 0
f (t) =
t2 0<t<π

f (t + 2π) = f (t)

f (t)

−π π 2π t

has Fourier series (see Exercise 4 at the end of Section 23.2)

π2
 
cos 2t cos 3t
− 2 cos t − + − ...
6 4 9
    
4 π π 4 π
+ π− sin t − sin 2t + − sin 3t − sin 4t + . . .
π 2 3 9π 4

By using a suitable value of t show that


1 1 1 π2
1+ + + + ... =
4 9 16 6

HELM (2015): 43
Section 23.4: Convergence
First decide on the appropriate value of t to use:
Your solution

Answer
Looking at the Fourier series, the numerical series we seek is present in the cosine terms so we need
to remove the sine terms. This we can do by selecting t = 0 or t = π. The choice t = 0 will make
the cosine terms become:
1 1
1 − + − ...
4 9
which is not what we seek. Hence we put t = π.

Now put t = π in the series and decide what the Fourier series will converge to at this value. Hence
complete the question:
Your solution

Answer
At t = π the Fourier series is
π2
 
cos 2π cos 3π
− 2 cos π − + − ...
6 4 9
π2 π2
   
1 1 1 1 1 1
= − 2 −1 − − − − ... = +2 1+ + + + ...
6 4 9 16 6 4 9 16
At t = π the Fourier series will converge to
1 2  π2
π +0 = (the average of the left and right hand limits)
2 2
π2 π2 1 π2 π2 π2
   
1 1 1 1 1 1
So +2 1 + + + + ... = ∴ 1+ + + +. . . = − =
6 4 9 16 2 4 9 16 2 2 6 6

Note that in the last Task if we substitute t = 0 in the Fourier series (which converges to f (0) = 0)
we obtain another infinite series but with alternating signs:
π2 π2
 
1 1 1 1 1
− 2 1 − + − . . . = 0 or 1 − + − + ... =
6 4 9 4 9 16 12

44 HELM (2015):
Workbook 23: Fourier series
®

Exercises
1. Obtain the Fourier series of

f (t) = |t| −π ≤t≤π f (t + 2π) = f (t)

By putting t = 0 show that



X 1 π2
=
n=1
(2n − 1)2 8

2. (a) Obtain the Fourier series of the 2π periodic function


t2
f (t) = −π ≤t≤π
4
and use it to obtain the following identities:
1 1 1 π2 1 1 1 π2
(i) 1 + + + + · · · = (ii) 1 − + − + · · · =
22 32 42 6 22 32 42 12
2
1 1 1 π
(b) Show that 1 + 2 + 2 + 2 · · · =
3 5 7 8
3. Obtain the Fourier series of the 2π periodic function

f (t) = t −π ≤t≤π

Use the series to show that


1 1 1 π
1− + − + ··· =
3 5 7 4
Answers

π X (−4)
1. + cos[(2n − 1)t]
2 n=1 (2n − 1)2 π

π 2 X cos(nπ)
2. (a) + cos nt (i) Put t = π (ii) Put t = 0
12 n=1 n2
(b) Add the two series from (a).

X (−1)n
3. −2 sin nt
n=1
n

HELM (2015): 45
Section 23.4: Convergence
 

Half-Range Series 23.5 

Introduction
In this Section we address the following problem:
Can we find a Fourier series expansion of a function defined over a finite interval?
Of course we recognise that such a function could not be periodic (as periodicity demands an infinite
interval). The answer to this question is yes but we must first convert the given non-periodic function
into a periodic function. There are many ways of doing this. We shall concentrate on the most useful
extension to produce a so-called half-range Fourier series.

' $
• know how to obtain a Fourier series

Prerequisites • be familiar with odd and even functions and


their properties
Before starting this Section you should . . .
• have knowledge of integration by parts
&
 %

• choose to expand a non-periodic function
Learning Outcomes either as a series of sines or as a series of
cosines
On completion you should be able to . . .
 

46 HELM (2015):
Workbook 23: Fourier Series
®

1. Half-range Fourier series


So far we have shown how to represent given periodic functions by Fourier series. We now consider a
slight variation on this theme which will be useful in 25 on solving Partial Differential Equations.
Suppose that instead of specifying a periodic function we begin with a function f (t) defined only
over a limited range of values of t, say 0 < t < π. Suppose further that we wish to represent this
function, over 0 < t < π, by a Fourier series. (This situation may seem a little artificial at this point,
but this is precisely the situation that will arise in solving differential equations.)
To be specific, suppose we define f (t) = t2 0<t<π

f (t)
π2
t2

π t

Figure 21
We shall consider the interval 0 < t < π to be half a period of a 2π periodic function. We must
therefore define f (t) for −π < t < 0 to complete the specification.

Task
Complete the definition of the above function f (t) = t2 , 0 < t < π
by defining it over −π < t < 0 such that the resulting functions will have a Fourier
series containing
(a) only cosine terms, (b) only sine terms, (c) both cosine and sine terms.

Your solution

HELM (2015): 47
Section 23.5: Half-Range Series
Answer
(a) We must complete the definition so as to have an even periodic function:
f (t) = t2 , −π < t < 0

f1 (t)

−π π 2π t

(b) We must complete the definition so as to have an odd periodic function:


f (t) = −t2 , −π < t < 0

f2 (t)

−π π 2π t

(c) We may define f (t) in any way we please (other than (a) and (b) above). For example we might
define f (t) = 0 over −π < t < 0:

f3 (t)

−π π 2π t

The point is that all three periodic functions f1 (t), f2 (t), f3 (t) will give rise to a different Fourier
series but all will represent the function f (t) = t2 over 0 < t < π. Fourier series obtained by
extending functions in this sort of way are often referred to as half-range series.
Normally, in applications, we require either a Fourier Cosine series (so we would complete a definition
as in (i) above to obtain an even periodic function) or a Fourier Sine series (for which, as in (ii)
above, we need an odd periodic function.)
The above considerations apply equally well for a function defined over any interval.

48 HELM (2015):
Workbook 23: Fourier Series
®

Example 3
Obtain the half range Fourier Sine series to represent f (t) = t2 0 < t < 3.

Solution
We first extend f (t) as an odd periodic function F (t) of period 6: f (t) = −t2 , −3 < t < 0
F (t)

3 t

Figure 22
We now evaluate the Fourier series of F (t) by standard techniques but take advantage of the
symmetry and put an = 0, n = 0, 1, 2, . . ..
Using the results for the Fourier Sine coefficients for period T from 23.2 subsection 5,
Z T  
2 2 2nπt
bn = F (t) sin dt,
T − T2 T
we put T = 6 and, since the integrand is even (a product of 2 odd functions), we can write
2 3 2 3 2
   
2nπt nπt
Z Z
bn = F (t) sin dt = t sin dt.
3 0 6 3 0 3
(Note that we always integrate over the originally defined range, in this case 0 < t < 3.)
We now have to integrate by parts (twice!)
( 3  Z 3  )
3t2
 
2 nπt 3 nπt
bn = − cos +2 t cos dt
3 nπ 3 0 nπ 0 3
(  3     Z 3   )
2 27 6 3 nπt 6 3 nπt
= − cos nπ + t sin − sin dt
3 nπ nπ nπ 3 0 nπ nπ 0 3
(   3 )  
2 27 18 3 nπt 2 27 54
= − cos nπ − 2 2 − cos = − cos nπ + 3 3 (cos nπ − 1)
3 nπ nπ nπ 3 0 3 nπ nπ

18
− n = 2, 4, 6, . . .





=
 18 72
− 3 3


 n = 1, 3, 5, . . .
nπ n π
So the required Fourier Sine series is
       
1 4 πt 18 2πt 1 4
F (t) = 18 − sin − sin + 18 − sin(πt) − . . .
π π3 3 2π 3 3π 27π 3

HELM (2015): 49
Section 23.5: Half-Range Series
Task
Obtain a half-range Fourier Cosine series to represent the function
f (t) = 4 − t 0 < t < 4.

f (t)
4

4 t

First complete the definition to obtain an even periodic function F (t) of period 8. Sketch F (t):
Your solution

Answer
F(t)
4

−4 4 t

Now formulate the integral from which the Fourier coefficients an can be calculated:
Your solution

Answer
We have with T = 8
2 4
 
2nπt
Z
an = F (t) cos dt
8 −4 8
Utilising the fact that the integrand here is even we get
1 4
 
nπt
Z
an = (4 − t) cos dt
2 0 4

50 HELM (2015):
Workbook 23: Fourier Series
®

Now integrate by parts to obtain an and also obtain a0 :


Your solution

Answer
Using integration by parts we obtain for n = 1, 2, 3, . . .
(  4 Z 4   )
1 4 nπt 4 nπt
an = (4 − t) sin + sin dt
2 nπ 4 0 nπ 0 4
    4
1 4 4 nπt 8
= − cos = 2 2 [− cos(nπ) + 1]
2 nπ nπ 4 0 nπ

 0
 n = 2, 4, 6, . . .
i.e. an =
 16

n = 1, 3, 5, . . .
n2 π 2
1 4 a0
Z
Also a0 = (4 − t) dt = 4. So the constant term is = 2.
2 0 2

Now write down the required Fourier series:


Your solution

Answer        
16 πt 1 3πt 1 5πt
We get 2+ 2 cos + cos + cos + ...
π 4 9 4 25 4

HELM (2015): 51
Section 23.5: Half-Range Series
Note that the form of the Fourier series (a constant of 2 together with odd harmonic cosine terms)
could be predicted if, in the sketch of F (t), we imagine raising the t-axis by 2 units i.e. writing
F (t) = 2 + G(t)

G(t)
2

−4 4 t
−2

Figure 23
Clearly G(t) possesses half-period symmetry
G(t + 4) = −G(t)
and hence its Fourier series must contain only odd harmonics.

Exercises
Obtain the half-range Fourier series specified for each of the following functions:

1. f (t) = 1 0≤t≤π (sine series)

2. f (t) = t 0 ≤ t ≤ 1 (sine series)

3. (a) f (t) = e2t 0 ≤ t ≤ 1 (cosine series)


2t
(b) f (t) = e 0≤t≤π (sine series)

4. (a) f (t) = sin t 0≤t≤π (cosine series)


(b) f (t) = sin t 0≤t≤π (sine series)

Answers
 
4 1 1
1. sin t + sin 3t + sin 5t + · · ·
π 3 5
2 1 1
2. {sin πt − sin 2πt + sin 3πt − · · · }
π 2 3

e2 − 1 X 4
3. (a) + 2π2
{e2 cos(nπ) − 1} cos nπt
2 n=1
4 + n

X 2nπ
(b) {1 − e2 cos(nπ)} sin nπt
n=1
4 + n2 π 2
∞  
2 X1 1 1
4. (a) + (1 − cos(1 − n)π) + (1 − cos(1 + n)π) cos nt
π n=2 π 1−n 1+n
(b) sin t itself (!)

52 HELM (2015):
Workbook 23: Fourier Series
®

 

The Complex Form 23.6


 

Introduction
In this Section we show how a Fourier series can be expressed more concisely if we introduce the
complex number i where i2 = −1. By utilising the Euler relation:
e iθ ≡ cos θ + i sin θ
we can replace the trigonometric functions by complex exponential functions. By also combining the
Fourier coefficients an and bn into a complex coefficient cn through
1
cn = (an − ibn )
2
we find that, for a given periodic signal, both sets of constants can be found in one operation.
We also obtain Parseval’s theorem which has important applications in electrical engineering.
The complex formulation of a Fourier series is an important precursor of the Fourier transform which
attempts to Fourier analyse non-periodic functions.

' $
• know how to obtain a Fourier series

• be competent working with the complex


Prerequisites numbers

Before starting this Section you should . . . • be familiar with the relation between the
exponential function and the trigonometric
functions
&
 %

• express a periodic function in terms of its
Learning Outcomes Fourier series in complex form
On completion you should be able to . . . • understand Parseval’s theorem
 

HELM (2015): 53
Section 23.6: The Complex Form
1. Complex exponential form of a Fourier series
So far we have discussed the trigonometric form of a Fourier series i.e. we have represented functions
of period T in the terms of sinusoids, and possibly a constant term, using
∞     
a0 X 2nπt 2nπt
f (t) = + an cos + bn sin .
2 n=1
T T
If we use the angular frequency

ω0 =
T
we obtain the more concise form

a0 X
f (t) = + (an cos nω0 t + bn sin nω0 t).
2 n=1

We have seen that the Fourier coefficients are calculated using the following integrals:
Z T
2 2
an = f (t) cos nω0 t dt n = 0, 1, 2, . . . (1)
T − T2

Z T
2 2
bn = f (t) sin nω0 t dt n = 1, 2, . . . (2)
T − T2

An alternative, more concise form, of a Fourier series is available using complex quantities. This
form is quite widely used by engineers, for example in Circuit Theory and Control Theory, and leads
naturally into the Fourier Transform which is the subject of 24.

2. Revision of the exponential form of a complex number


Recall that a complex number in Cartesian form which is written as
z = a + ib,
where a and b are real numbers and i2 = −1, can be written in polar form as
z = r(cos θ + i sin θ)

where r = |z| = a2 + b2 and θ, the argument or phase of z, is such that
a = r cos θ b = r sin θ.
A more concise version of the polar form of z can be obtained by defining a complex exponential
quantity e iθ by Euler’s relation
e iθ ≡ cos θ + i sin θ
The polar angle θ is normally expressed in radians. Replacing i by − i we obtain the alternative
form
e− iθ ≡ cos θ − i sin θ

54 HELM (2015):
Workbook 23: Fourier Series
®

Task
Write down in cos θ±i sin θ form and also in Cartesian form (a) e iπ/6 (b) e− iπ/6 .

Use Euler’s relation:


Your solution

Answer
We have, by definition,
π   π  √3 1 π  π  √
3 1
(a) e iπ/6 = cos + i sin = + i (b) e− iπ/6 = cos − i sin = − i
6 6 2 2 6 6 2 2

Task π  π 
Write down (a) cos (b) sin in terms of e iπ/6 and e− iπ/6 .
6 6

Your solution

Answer
We have, adding the two results from the previous task
π  π  1
− iπ/6
iπ/6
e iπ/6 + e− iπ/6

e +e = 2 cos or cos =
6 6 2
Similarly, subtracting the two results,
π  π  1
e iπ/6 − e− iπ/6 = 2 i sin e iπ/6 − e− iπ/6

or sin =
6 6 2i
(Don’t forget the factor i in this latter case.)
Clearly, similar calculations could be carried out for any angle θ. The general results are summarised
in the following Key Point.

HELM (2015): 55
Section 23.6: The Complex Form
Key Point 8
Euler’s Relations

eiθ ≡ cos θ + i sin θ, e−iθ ≡ cos θ − i sin θ


1 iθ 1
e + e− iθ e iθ − e− iθ
 
cos θ ≡ sin θ ≡
2 2i

Using these results we can redraft an expression of the form


an cos nθ + bn sin nθ
in terms of complex exponentials.
(This expression, with θ = ω0 t, is of course the nth harmonic of a trigonometric Fourier series.)

Task
Using the results from the Key Point 8 (with nθ instead of θ) rewrite
an cos nθ + bn sin nθ
in complex exponential form.

First substitute for cos nθ and sin nθ with exponential expressions using Key Point 8:
Your solution

Answer
We have
an inθ bn
e + e− inθ e inθ − e− inθ
 
an cos nθ = bn sin nθ =
2 2i
so
an inθ  bn
e + e− inθ + e inθ − e− inθ

an cos nθ + bn sin nθ =
2 2i

56 HELM (2015):
Workbook 23: Fourier Series
®

1
Now collect the terms in e inθ and in e− inθ and use the fact that = −i:
i
Your solution

Answer
We get
   
1 bn inθ 1 bn − inθ
an + e + an − e
2 i 2 i
1 i 1 1
or, since = 2 =−i (an − ibn )e inθ + (an + ibn )e− inθ .
i i 2 2

Now write this expression in more concise form by defining


1 1
cn = (an − ibn ) which has complex conjugate c∗n = (an + ibn ).
2 2
Write the concise complex exponential expression for an cos nθ + bn sin nθ:
Your solution

Answer
an cos nθ + bn sin nθ = cn e inθ + c∗n e− inθ

Clearly, we can now rewrite the trigonometric Fourier series


∞ ∞
a0 X a0 X
cn e inω0 t + c∗n e− inω0 t

+ (an cos nω0 t + bn sin nω0 t) as + (3)
2 n=1
2 n=1

A neater, and particularly concise, form of this expression can be obtained as follows:
a0
Firstly write = c0 (which is consistent with the general definition of cn since b0 = 0).
2
The second term in the summation
X ∞
c∗n e− inω0 t = c∗1 e− iω0 t + c∗2 e−2 iω0 t + . . .
n=1

can be written, if we define c−n = c∗n = 12 (an + ibn ), as


−∞
X
− iω0 t −2 iω0 t −3 iω0 t
c−1 e + c−2 e + c−3 e + ... = cn e inω0 t
n=−1


X −∞
X ∞
X
Hence (3) can be written c0 + cn e inω0 t + cn e inω0 t or in the very concise form cn e inω0 t .
n=1 n=−1 n=−∞

HELM (2015): 57
Section 23.6: The Complex Form
The complex Fourier coefficients cn can be readily obtained as follows using (1) and (2) for an , bn .
Firstly
Z T
a0 1 2
c0 = = f (t) dt (4)
2 T − T2
For n = 1, 2, 3, . . . we have
Z T Z T
1 1 2 1 2
cn = (an − ibn ) = f (t)(cos nω0 t − i sin nω0 t) dt i.e. cn = f (t)e− inω0 t dt (5)
2 T − T2 T − T2

Also for n = 1, 2, 3, . . . we have


Z T
1 1 2
c−n = c∗n = (an + ibn ) = f (t)e inω0 t dt
2 T − T2

This last expression is equivalent to stating that for n = −1, −2, −3, . . .
Z T
1 2
cn = f (t)e− inω0 t dt (6)
T − T2
The three equations (4), (5), (6) can thus all be contained in the one expression
Z T
1 2
cn = f (t)e− inω0 t dt for n = 0, ±1, ±2, ±3, . . .
T − T2
The results of this discussion are summarised in the following Key Point.

Key Point 9
Fourier Series in Complex Form
A function f (t) of period T has a complex Fourier series
∞ Z T
X 1 2
f (t) = cn e inω0 t
where cn = f (t)e− inω0 t dt
n=−∞
T −2 T

For the special case T = 2π, so that ω0 = 1, these formulae become particularly simple:
∞ Z π
X 1
f (t) = cn e int
cn = f (t)e− int dt.
n=−∞
2π −π

58 HELM (2015):
Workbook 23: Fourier Series
®

3. Properties of the complex Fourier coefficients


Using properties of the trigonometric Fourier coefficients an , bn we can readily deduce the following
results for the cn coefficients:
a0
1. c0 = is always real.
2
2. Suppose the periodic function f (t) is even so that all bn are zero. Then, since in the complex
form the bn arise as the imaginary part of cn , it follows that for f (t) even the coefficients cn
(n = ±1, ±2, . . .) are wholly real.

Task
If f (t) is odd, what can you deduce about the Fourier coefficients cn ?

Your solution

Answer
Since, for an odd periodic function the Fourier coefficients an (which constitute the real part of cn )
are zero, then in this case the complex coefficients cn are wholly imaginary.

3. Since
Z T
1 2
cn = f (t)e− inω0 t dt
T − T2

then if f (t) is even, cn will be real, and we have two possible methods for evaluating cn :
 
T T
(a) Evaluate the integral above as it stands i.e. over the full range − , . Note
2 2
carefully that the second term in the integrand is neither an even nor an odd function so
the integrand itself is
( even function) × ( neither even nor odd function) = neither even nor odd function.
2 T /2
Z
Thus we cannot write cn = f (t)e− inω0 t dt
T 0
(b) Put e− inω0 t = cos nω0 t − i sin nω0 t so
f (t)e− inω0 t = f (t) cos nω0 t − if (t) sin nω0 t = ( even)( even) − i( even)( odd)
= ( even) − i( odd).
Z T
2 2 an
Hence cn = f (t) cos nω0 t dt = .
T 0 2
T
4. If f (t + ) = −f (t) then of course only odd harmonic coefficients cn (n = ±1, ±3, ±5, . . .)
2
will arise in the complex Fourier series just as with trigonometric series.

HELM (2015): 59
Section 23.6: The Complex Form
Example 4
Find the complex Fourier series of the saw-tooth wave shown in Figure 24:

f (t)

-T T 2T t

Figure 24

Solution
We have
At
f (t) = 0<t<T f (t + T ) = f (t)
T

The period is T in this case so ω0 = .
T
Looking at the graph of f (t) we can say immediately

(a) the Fourier series will contain a constant term c0


A
(b) if we imagine shifting the horizontal axis up to the signal can be written
2
A
f (t) = + g(t), where g(t) is an odd function with complex Fourier coefficients that
2
are purely imaginary.
A
Hence we expect the required complex Fourier series of f (t) to contain a constant term and
2
complex exponential terms with purely imaginary coefficients. We have, from the general theory,
and using 0 < t < T as the basic period for integrating,
1 T At − inω0 t A T − inω0 t
Z Z
cn = e dt = 2 te dt
T 0 T T 0
We can evaluate the integral using parts:
T T Z T
te− inω0 t
Z 
− inω0 t 1
te dt = + e− inω0 t dt
0 (− inω0 )
0 inω 0 0
T
T e inω0 T

1 − inω0 t
= − e
(− inω0 ) ( inω0 )2 0

60 HELM (2015):
Workbook 23: Fourier Series
®

Solution (contd.)

But ω0 = so
T
e− inω0 T = e− in2π = cos 2nπ − i sin 2nπ
= 1−0 i=1

Hence the integral becomes


T 1
e− inω0 T − 1


− inω0 ( inω0 )2

Hence
 
A T iA
cn = 2 = n = ±1, ±2, . . .
T − inω0 2πn
Note that
iA − iA
c−n = = = c∗n as it must
2π(−n) 2πn
Z T
1 At A
Also c0 = dt = as expected.
T 0 T 2
Hence the required complex Fourier series is

A iA X e inω0 t
f (t) = +
2 2π n=−∞ n
n6=0

which could be written, showing only the constant and the first two harmonics, as
e− i2ω0 t e i2ω0 t
 
A − iω0 t iω0 t
f (t) = ... − i − ie + π + ie + i + ... .
2π 2 2

The corresponding trigonometric Fourier series for the function can be readily obtained from this
complex series by combining the terms in ±n, n = 1, 2, 3, . . .
For example this first harmonic is
A  A
− ie− iω0 t + ie iω0 t = {− i(cos ω0 t − i sin ω0 t) + i(cos ω0 t + i sin ω0 t)}
2π 2π
A A
= (−2 sin ω0 t) = − sin ω0 t
2π π
Performing similar calculations on the other harmonics we obtain the trigonometric form of the
Fourier series

A A X sin nω0 t
f (t) = − .
2 π n=1 n

HELM (2015): 61
Section 23.6: The Complex Form
Task
Find the complex Fourier series of the periodic function:
f (t) = et −π <t<π

f (t + 2π) = f (t)

f (t)

−π π 3π t

Firstly write down an integral expression for the Fourier coefficients cn :


Your solution

Answer
We have, since T = 2π, so ω0 = 1
Z π
1
cn = et e− int dt
2π −π

Now combine the real exponential and the complex exponential as one term and carry out the
integration:
Your solution

Answer
We have
π π
1 e(1− in)t
Z 
1 1 1
(1− in)t
e(1− in)π − e−(1− in)π

cn = e dt = =
2π −π 2π (1 − in) −π 2π (1 − in)

62 HELM (2015):
Workbook 23: Fourier Series
®

Now simplify this as far as possible and write out the Fourier series:
Your solution

Answer
e(1− in)π = eπ e− inπ = eπ (cos nπ − i sin nπ) = eπ cos nπ

e−(1− in)π = e−π e inπ = e−π cos nπ


1 1 sinh π (1 + in)
Hence cn = (eπ − e−π ) cos nπ = cos nπ
2π (1 − in) π (1 + n2 )
Note that the coefficients cn n = ±1, ±2, . . . have both real and imaginary parts in this case as the
function being expanded is neither even nor odd.
sinh π (1 − in) sinh π (1 − in)
Also c−n = 2
cos(−nπ) = cos nπ = c∗n as required.
π (1 + (−n) ) π (1 + n2 )
sinh π
This includes the constant term c0 = . Hence the required Fourier series is
π

sinh π X (1 + in) int
f (t) = (−1)n e since cos nπ = (−1)n .
π n=−∞ (1 + n2 )

HELM (2015): 63
Section 23.6: The Complex Form
4. Parseval’s theorem
This is essentially a mathematical theorem but has, as we shall see, an important engineering in-
terpretation particularly in electrical engineering. Parseval’s theorem states that if f (t) is a periodic
function with period T and if cn (n = 0, ±1, ±2, . . .) denote the complex Fourier coefficients of f (t),
then
Z T ∞
1 2
2
X
f (t) dt = |cn |2 .
T −2 T
n=−∞

In words the theorem states that the mean square value of the signal f (t) over one period equals the
sum of the squared magnitudes of all the complex Fourier coefficients.

Proof of Parseval’s theorem.


Assume f (t) has a complex Fourier series of the usual form:
∞  
X
inω0 t 2π
f (t) = cn e ω0 =
n=−∞
T

where
Z T
1 2
cn = f (t)e− inω0 t dt
T − T2

Then
X X
f 2 (t) = f (t)f (t) = f (t) cn e inω0 t = cn f (t)e inω0 t
Hence
Z T Z T
1 2
2 1 2 X
f (t) dt = cn f (t)e inω0 t dt
T − T2 T − T2
Z T
1X 2
= cn f (t)e inω0 t dt
T − T2
X
= cn c∗n


X
= |cn |2
n=−∞

which completes the proof.


Parseval’s theorem can also be written in terms of the Fourier coefficients an , bn of the trigonometric
Fourier series. Recall that
a0 an − ibn an + ibn
c0 = cn = n = 1, 2, 3, . . . cn = n = −1, −2, −3, . . .
2 2 2
so
2a2n + b2n
|cn | = n = ±1, ±2, ±3, . . .
4
so

64 HELM (2015):
Workbook 23: Fourier Series
®

∞ ∞
X
2 a20 X a2n + b2n
|cn | = +2
n=−∞
4 n=1
4

and hence Parseval’s theorem becomes


Z T ∞
1 2
2 a20 1 X 2
f (t)dt = + (a + b2n ) (7)
T − T2 4 2 n=1 n
The engineering interpretation of this theorem is as follows. Suppose f (t) denotes an electrical signal
(current or voltage), then from elementary circuit theory f 2 (t) is the instantaneous power (in a 1
ohm resistor) so that
Z T
1 2
f 2 (t) dt
T − T2
is the energy dissipated in the resistor during one period.
Now a sinusoid wave of the form
A cos ωt ( or A sin ωt)
A2 A2
has a mean square value so a purely sinusoidal signal would dissipate a power in a 1 ohm
2 2
resistor. Hence Parseval’s theorem in the form (7) states that the average power dissipated over 1
period equals the sum of the powers of the constant (or d.c.) components and of all the sinusoidal
(or alternating) components.

Task
The triangular signal shown below has trigonometric Fourier series

π 4 X cos nt
f (t) = − .
2 π n=1 n2
( odd n)

[This was deduced in the Task in Section 23.3, page 39.]

f (t)


€  t


X 1 π4
Use Parseval’s theorem to show that = .
n=1
n4 96
(n odd)

HELM (2015): 65
Section 23.6: The Complex Form
First, identify a0 , an and bn for this situation and write down the definition of f (t) for this case:

Your solution

Answer
a0 π
We have =
2 2
4

 − 2
 n = 1, 3, 5, . . .
an = nπ

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

bn = 0 n = 1, 2, 3, 4, . . .
Also
f (t) = |t| −π <t<π

f (t + 2π) = f (t)

Now evaluate the integral on the left hand side of Parseval’s theorem and hence complete the problem:

Your solution

66 HELM (2015):
Workbook 23: Fourier Series
®

Answer
We have f 2 (t) = t2 so
Z T Z π  π
1 2
2 1 2 1 t3 π2
f (t) dt = t dt = =
T − T2 2π −π 2π 3 −π 3
The right-hand side of Parseval’s theorem is
∞ ∞
a20 X 2 π 2 1 X 16
+ an = +
4 n=1
4 2 n=1 n4 π 2
(n odd)

Hence
∞ ∞ ∞
π2 π2 8 X 1 8 X 1 π2 X 1 π4
= + 2 ∴ = ∴ = .
3 4 π n=1 n4 π 2 n=1 n4 12 n=1
n4 96
(n odd) (n odd) (n odd)

Exercises
Obtain the complex Fourier series for each of the following functions of period 2π.

1. f (t) = t −π ≤t≤π

2. f (t) = t 0 ≤ t ≤ 2π

3. f (t) = et −π ≤t≤π

Answers
X (−1)n
1. i eint (sum from −∞ to ∞ excluding n = 0).
n
X1
2. π + i eint (sum from −∞ to ∞ excluding n = 0).
n
sinh π X (1 + in) int
3. (−1)n e (sum from −∞ to ∞).
π (1 + n2 )

HELM (2015): 67
Section 23.6: The Complex Form
An Application of  

Fourier Series 23.7 

Introduction
In this Section we look at a typical application of Fourier series. The problem we study is that of a
differential equation with a periodic (but non-sinusoidal) forcing function. The differential equation
chosen models a lightly damped vibrating system.

' $
• know how to obtain a Fourier series

• be competent to use complex numbers


Prerequisites
• be familiar with the relation between the
Before starting this Section you should . . .
exponential function and the trigonometric
functions
&
 %


Learning Outcomes • solve a linear differential equation with a


periodic forcing function using Fourier series
On completion you should be able to . . .
 

68 HELM (2015):
Workbook 23: Fourier Series
®

1. Modelling vibration by differential equation


Vibration problems are often modelled by ordinary differential equations with constant coefficients.
For example the motion of a spring with stiffness k and damping constant c is modelled by
d2 y dy
m 2
+ c + ky = 0 (1)
dt dt
where y(t) is the displacement of a mass m connected to the spring. It is well-known that if c2 < 4mk,
usually referred to as the lightly damped case, then
y(t) = e−αt (A cos ωt + B sin ωt) (2)
i.e. the motion is sinusoidal but damped by the negative exponential term. In (2) we have used the
notation
c 1 √
α= ω= 4km − c2 to simplify the equation.
2m 2m
The values of A and B depend upon initial conditions.
The system represented by (1), whose solution is (2), is referred to as an unforced damped har-
monic oscillator.
A lightly damped oscillator driven by a time-dependent forcing function F (t) is modelled by the
differential equation
d2 y dy
m 2
+ c + ky = F (t) (3)
dt dt
The solution or system response in (3) has two parts:

(a) A transient solution of the form (2),


(b) A forced or steady state solution whose form, of course, depends on F (t).

If F (t) is sinusoidal such that


F (t) = A sin(Ωt + φ) where Ω and φ are constants,
then the steady state solution is fairly readily obtained by standard techniques for solving differential
equations. If F (t) is periodic but non-sinusoidal then Fourier series may be used to obtain the steady
state solution. The method is based on the principle of superposition which is actually applicable
to any linear (homogeneous) differential equation. (Another engineering application is the series
LCR circuit with an applied periodic voltage.)
The principle of superposition is easily demonstrated:-
Let y1 (t) and y2 (t) be the steady state solutions of (3) when F (t) = F1 (t) and F (t) = F2 (t)
respectively. Then
d2 y1 dy1
m 2
+c + ky1 = F1 (t)
dt dt
d2 y2 dy2
m 2 +c + ky2 = F2 (t)
dt dt
Simply adding these equations we obtain
d2 d
m 2 (y1 + y2 ) + c (y1 + y2 ) + k(y1 + y2 ) = F1 (t) + F2 (t)
dt dt

HELM (2015): 69
Section 23.7: An Application of Fourier Series
from which it follows that if F (t) = F1 (t) + F2 (t) then the system response is the sum y1 (t) + y2 (t).
This, in its simplest form, is the principle of superposition. More generally if the forcing function is
N
X
F (t) = Fn (t)
n=1

N
X
then the response is y(t) = yn (t) where yn (t) is the response to the forcing function Fn (t).
n=1

Returning to the specific case where F (t) is periodic, the solution procedure for the steady state
response is as follows:
Step 1: Obtain the Fourier series of F (t).
Step 2: Solve the differential equation (3) for the response yn (t) corresponding to the n th har-
monic in the Fourier series. (The response yo to the constant term, if any, in the Fourier
series may have to be obtained separately.)
Step 3: Superpose the solutions obtained to give the overall steady state motion:
N
X
y(t) = y0 (t) + yn (t)
n=1

The procedure can be lengthy but the solution is of great engineering interest
r because if the frequency
k
of one harmonic in the Fourier series is close to the natural frequency of the undamped system
m
then the response to that harmonic will dominate the solution.

2. Applying Fourier series to solve a differential equation


The following Task which is quite long will provide useful practice in applying Fourier series to a
practical problem. Essentially you should follow Steps 1 to 3 above carefully.

Task
The problem is to find the steady state response y(t) of a spring/mass/damper
system modelled by
d2 y dy
m 2
+ c + ky = F (t) (4)
dt dt
where F (t) is the periodic square wave function shown in the diagram.

F (t)
F0

−t0 t0 t

− F0

70 HELM (2015):
Workbook 23: Fourier Series
®

Step 1: Obtain the Fourier series of F (t) noting that it is an odd function:

Your solution

Answer
The calculation is similar to those you have performed earlier in this Workbook.
2π π
Since F (t) is an odd function and has period 2t0 so that ω = = , it has Fourier coefficients:
2t0 t0

2 to
 
nπt
Z
bn = F0 sin dt n = 1, 2, 3, . . .
t0 0 t0
   t
2F0 t0 nπt 0
= − cos
t0 nπ t0 0
4F0
(
2F0 n odd
= (1 − cos nπ) = nπ
nπ 0 n even

4F0 X sin nωt
so F (t) = (where the sum is over odd n only).
π n=1 n

Step 2(a):
Since each term in the Fourier series is a sine term you must now solve (4) to find the steady state
response yn to the n th harmonic input: Fn (t) = bn sin nωt n = 1, 3, 5, . . .

From the basic theory of linear differential equations this response has the form

yn = An cos nωt + Bn sin nωt (5)

where An and Bn are coefficients to be determined by substituting (5) into (4) with F (t) = Fn (t).
Do this to obtain simultaneous equations for An and Bn :

HELM (2015): 71
Section 23.7: An Application of Fourier Series
Your solution

Answer
We have, differentiating (5),

yn0 = nω(−An sin nωt + Bn cos nωt)


yn00 = (nω)2 (−An cos nωt − Bn sin nωt)

from which, substituting into (4) and collecting terms in cos nωt and sin nωt,
(−m(nω)2 An + cnωBn + kAn ) cos nωt + (−m(nω)2 Bn − cnωAn + kBn ) sin nωt = bn sin nωt
Then, by comparing coefficients of cos nωt and sin nωt, we obtain the simultaneous equations:
(k − m(nω)2 )An + c(nω)Bn = 0 (6)
−c(nω)An + (k − m(nω)2 )Bn = bn (7)

Step 2(b):
Now solve (6) and (7) to obtain An and Bn :

Your solution

72 HELM (2015):
Workbook 23: Fourier Series
®

Answer
cωn bn
An = − (8)
(k − mωn2 )2 + ωn2 c2
(k − mωn2 )bn
Bn = (9)
(k − mωn2 )2 + ωn2 c2
where we have written ωn for nω as the frequency of the n th harmonic

It follows that the steady state response yn to the n th harmonic of the Fourier series of the forcing
function is given by (5). The amplitudes An and Bn are given by (8) and (9) respectively in terms of
the systems parameters k, c, m, the frequency ωn of the harmonic and its amplitude bn . In practice
it is more convenient to represent yn in the so-called amplitude/phase form:
yn = Cn sin(ωn t + φn ) (10)
where, from (5) and (10),
An cos ωn t + Bn sin ωn t = Cn (cos φn sin ωn t + sin φn cos ωn t).
Hence
Cn sin φn = An Cn cos φn = Bn
so
An cωn
tan φn = = (11)
Bn (mωn2 − k)2
p bn
Cn = A2n + Bn2 = p (12)
(mωn2 − k)2 + ωn2 c2
Step 3:
Finally, use the superposition principle, to state the complete steady state response of the system to
the periodic square wave forcing function:
Your solution

Answer

X X
y(t) = yn (t) = Cn (sin ωn t + φn ) where Cn and φn are given by (11) and (12).
n=1 n=1
(n odd)

4F0 1
In practice, since bn = it follows that the amplitude Cn also decreases as . However, if one of
nπ r n
k
the harmonic frequencies say ωn0 is close to the natural frequency of the undamped oscillator
m
then that particular frequency harmonic will dominate in the steady state response. The particular
value ωn0 will, of course, depend on the values of the system parameters k and m.

HELM (2015): 73
Section 23.7: An Application of Fourier Series
NOTES  
Index for Workbook 23

Amplitude 4 Odd function 31-35


Angular frequency 5 Orthogonality properties 13-16
Argument 54
Parseval’s theorem 64
Complex form of Fourier series 53-67 Periodic functions 3, 9-29
Convergence of Fourier series 40-45 Phase 54
Pi 43-45
Differential equation 69
Dirichlet conditions 41 Saw-tooth wave 6, 25, 31, 60
Square wave 6, 11, 20, 22, 29, 31
Euler’s relation 54-56 37, 42, 70
Even function 31-35
Triangular wave 7, 38, 39, 65
Fourier coefficients 10, 14, 18, 24
Frequency 5 Vibration 69
Function - odd 31-35
- even 31-35 Waves - saw-tooth 6, 25, 31, 60
- square 6, 11, 20, 22, 29
Half-range Fourier series 46-52 31, 37, 42, 70
Harmonic oscillator 69 - triangular 7, 38, 39, 65
Harmonics 6
EXERCISES
Modelling vibrating system 69 29, 45, 52, 67

You might also like