You are on page 1of 9

FACULTY OF MATHEMATICAL STUDIES

MATHEMATICS FOR PART I ENGINEERING

Lectures

MODULE 23 FOURIER SERIES

1. Periodic signals
2. Whole-range Fourier series
3. Even and odd functions

1. Periodic signals
Fourier series are used in many areas of engineering, and most of you will discuss the method again in your
second year mathematics units. We consider here Fourier series expansions of periodic functions, i.e.
functions which repeat themselves exactly at regular intervals. Two examples are shown below.

.......... ........... .......... ..........


... ..... ... .... ... .... ... .....
... ... ... ... ... ... ... ...
.... ... ... ... ... ... ... ...
. ... .. ... .. ... .. ...
.. ... .. ... ... ... ..
. .. .
...........................................................................................................................................................................................................................................................................
.
. .
. . .
... . .... . ... .
. ... ..
... ... .. .
. ... ..
... ..
.
...
. .
.
..
...
. ..
. .
. .
...
.. ... ... ... .
...
... ..... ... ... ... ... ... ...
.... ... ... .... ... .... ... ....
.... ........ ......... ........

Figure 1(a)

.... .... ...... .... .... .....


.... ... .... ... .... .. .... ... .... ... ... ...
.... .. .... .. ... .. .... .. .... .. .... ..
... .... ... .... .... .... .... .... .... ..... ... ....
..
. .... ... .
...... ... .
..... ... .
....
. ... ...... .
. ......
. ...
. ... .... ... .... ... ..... ... ..... ... .. ...
.... . .. ... .... ... ...... ... ....... ...
.... .... ...... ... .....
... ....
.... ....... ....... ... .... .. .
....................................................................................................................................................................................................................................................................................
.
.. .
... .
.. .. . .
..
.
t
Figure 1(b)
Def. A function f is periodic of period T (T > 0) if and only if f (t + T ) = f (t) for all t.
Therefore the period T is defined as the time interval required for one complete fluctuation.
Hence f (t) = cos t is periodic with period 2π since

f (t + 2π) = cos(t + 2π) = cos t = f (t) for all t.

N.B. If f is periodic with period T , then clearly from the graphs, or from repeated use of the definition, f
is also periodic with periods 2T, 3T, . . . – you should choose the minimum period of the function to be its
period.

Ex 1. Determine whether the following functions are periodic and, if so, determine the periods:-

(i) f (t) = sin(2t), (ii) f (t) = cos( 3 t), (iii) f (t) = cos t + sin(2t).

(i) f (t) = sin(2t) is periodic with period π since

f (t + π) = sin 2(t + π) = sin(2t + 2π) = sin 2t = f (t) for all t.


√ √
(ii) f (t) = cos( 3 t) is periodic with period 2π/ 3 since
    
2π √ 2π √ √
f t+ √ = cos 3 t+ √ = cos( 3 t + 2π) = cos( 3 t) = f (t) for all t.
3 3

–1–
(iii) (more complicated)
cos t has periods 2π, 4π, 6π, . . .
sin 2t has periods π, 2π, 3π, . . .
and clearly the minimum period for the sum of these quantities is the smallest number that appears in both
lists of periods. In this example clearly T = 2π.

The function f (t) = cos t + cos( 2 t) would be even more difficult, since

cos t has periods 2π, 4π, 6π, . . .


√ 2π 4π 6π
cos( 2 t) has periods √ , √ , √ , . . .
2 2 2

Since the
√multiplicative factors of π in the periods
√ for cos t are whole numbers but the corresponding factors
for cos( 2 t) are irrational √
(always involving 2) there is no number that appears in both lists. Hence the
function f (t) = cos t + cos( 2 t) is NOT periodic (it never repeats itself), despite its comparatively simple
form.
More generally, we can say that the sum of two or more cosine waves will be periodic only when the ratios
of all pairs of periods form rational numbers (ratios of integers).

Sine wave Let us recall definitions linked to a sine wave

...
.......
f
.. ......
.................... ..
.... ........... ...
............. ....... ....... .............. ....... ....... ....... ....... ....... ....... ....... ....... ....... ..........
f sin φ
0 .........
.. ....
.. ..
..
....
... .. ... .. .
... .. ... ... ..
... ....
... ... .
...
... ... ..
...
..
.
.
...
. .
.... . .
.............................................................................................................................................................................................................................................................................................................
.... ... .. ....
.
−φ/ω 0 ...
...
...
...
...
.
..
.....
2π/ω t
... ... ..
... ... ... ..
... .... ...
... .... ...... ....
..... ....
... ...... ...
... ....................... ..
.. ..

Figure 2
Consider f (t) = f0 sin(ωt + φ) = f0 sin(2πνt + φ), shown above, where
f0 is amplitude,
ω is the circular (or angular) frequency in radians/unit time,
ν is frequency in cycles/unit time (Hertz )
φ is phase angle with respect to time origin in radians.
The period of above sine wave is 1/ν = 2π/ω seconds.
A positive phase angle φ shifts waveform to the left (a lead) and a negative phase angle moves waveform to
the right (a lag).

2. Whole range Fourier series


Fourier analysis decomposes a ‘complicated’ periodic wave shape into a sum of sine and cosine waves.
Suppose
X∞     
1 2πnt 2πnt
f (t) = a0 + an cos + bn sin , (1)
2 n=1
T T

where f (t) is a periodic function of period T and an and bn are the (constant) Fourier coefficients of
f (t), defined by
Z  
2 +T /2 2πnt
an = f (t) cos dt , n = 0, 1, 2 . . . , (2)
T −T /2 T

–2–
Z +T /2  
2 2πnt
bn = f (t) sin dt , n = 1, 2, 3 . . . . (3)
T −T /2 T

Equations (1), (2) and (3) appear on the Formula Sheet. (N.B. a0 and an (for n > 0) are defined by the
same integral (2), but a0 must always be calculated separately since form of integral changes when n = 0).
Equations (1)–(3) also appear in the Data Book but in a slightly different form since that book assumes the
function has period 2L (get familiar with the equations you must use).

Is the form (1) reasonable? Does the infinite sum converge?


Well, given a periodic function f (t) if we calculate its Fourier coefficients using the integrals (2) and (3),
and then write
X∞     
1 2πnt 2πnt
f (t) ∼ a0 + an cos + bn sin , (4)
2 n=1
T T

where the series on the RHS of (4) is called the whole-range Fourier series of f (t), it can be proved that
the infinite series in (4) does converge, under certain conditions, for a wide variety of functions. Sufficient
conditions for convergence, known as the Dirichlet conditions, are stated below.

If f (t) is a periodic function with period T and


(i) is piecewise continuous in the interval −T /2 < t < +T /2 (i.e. it is bounded in the interval and is
continuous in the interval except at a finite number of points),
(ii) has only a finite number of maxima and minima in the interval,
" #
1
then the Fourier series converges at a point t0 to the value lim f (t) + lim− f (t) .
2 t→t+ 0 t→t0

The value written above represents the average of the left and right hand limits of f at t0 (see Figure 3).
Obviously, at all points t at which the function f (t) is continuous, the left and right-hand limits of f are
the same, so the Fourier series converges to f (t).

.
...... f
..........
...
....
..
... ..
... ......
...... ....
... ....... .
... .
...
.........
.
.. .
... ......... ....
. .
. ...
...
...
.............
.
................................
..
...
value of Fourier series at t0
... ....
. ...
.
...
... × . ..
.... .......
..............
...........
... ......... .
.......................................................................................................................................................................................................................................................................
.
. .
.
... . .
......
..
. .
0 ...
...
t .... 0 ............
. ....... t
... .
......
... .............
... ..
....
..
.
Figure 3

N.B. The symbol ∼ is used in equation (4) to show that f (t) is not necessarily equal to the series on the
right (as above discussion shows).
Ex 2. Find the Fourier series of the function defined by

−1 , − 12 T ≤ t < 0
f (t) =
+1 , 0 ≤ t < 12 T
f (t + T ) = f (t) .

–3–
For this function (shown in Figure 4)

f..
.......
.........
....
..
....
..
...
........................................... 1 ............................................. ..........................................
....
.... .. .. .. ..
. .. .... .. ..
..
.... .... ... .... ....
...
. . . .
..................................................................................................................................................................................................................................................................................................................................
.
T .... T
.... −
....
2
0 ...
...
....
2
.... t
.... .... .. .... ..
. . .... . ..
.
.
... ...
. .. .. ..
....................................... .
−1
.......................................... .
...
.........................................
.

....
..

Figure 4

Z Z (Z Z +T /2 )
+T /2
2 2 +T /2 2 0
a0 = f (t) cos(0) dt = f (t) dt = (−1) dt + (+1) dt
T −T /2 T −T /2 T −T /2 0
    
2 0 2 T2 2 T 2 T
= [−t]− T + [t]0 = 0− + −0 = 0;
T 2 T T 2 T 2

Z   (Z   Z T /2   )
+T /2 0
2 2πnt 2 2πnt 2πnt
an = f (t) cos dt = (−1) cos dt + (+1) cos dt
T −T /2 T T −T /2 T 0 T
( 0  T )
2 sin(2πnt/T ) sin(2πnt/T ) 2
= − +
T (2πn/T ) − T (2πn/T ) 0
2

1 1
= {− sin 0 − (− sin(−πn)) + sin(πn) − sin 0} = (− sin(πn) + sin(πn)) = 0 ;
πn πn

Z   (Z   Z T /2   )
+T /2 0
2 2πnt 2 2πnt 2πnt
bn = f (t) sin dt = (−1) sin dt + (+1) sin dt
T −T /2 T T −T /2 T 0 T
( 0  T )
2 cos(2πnt/T ) cos(2πnt/T ) 2
= + −
T (2πn/T ) − T (2πn/T ) 0
2

1 2 2
= {cos 0 − cos(−πn) − cos(πn) + cos 0} = {1 − cos(πn)} = {1 − (−1)n } .
πn πn πn

In the calculation of bn the result cos(nπ) = (−1)n has been used, since cos(nπ) alternates between −1
and +1 for all integer n.
When n is even, (−1)n = +1 and hence bn = 0.
2 4
When n is odd then (−1)n = −1, and bn = (1 − (−1)) = .
nπ nπ
Thus
4 4
b1 = , b2 = 0, b3 = , b4 = 0, . . .
π 3π
and if ω0 = 2π/T we obtain
 
4 1 1
f (t) ∼ sin(ω0 t) + sin(3ω0 t) + sin(5ω0 t) + · · · .
π 3 5

–4–
Partial sums
Def. The mth partial sum Sm (t) is the sum of a Fourier series up to the terms in sin(2πmt/T ) and
cos(2πmt/T ).
m
X
For the Fourier series in Ex 2 it follows that Sm (t) = bn sin(nω0 t) so that
n=1
 
4 4 1
S1 (t) = sin ω0 t S3 (t) = sin ω0 t + sin 3ω0 t
π π 3
 
4 1 1
S5 (t) = sin ω0 t + sin 3ω0 t + sin 5ω0 t
π 3 5

At t = 0, a point of discontinuity of the original function, all terms in the calculated Fourier series are zero
so the total sum is also zero. This illustrates the result that the Fourier series is convergent at t = 0 to
 
1 1
lim f (t) + lim f (t) = [1 + (−1)] = 0 .
2 t→0+ t→0− 2

3. Even and odd functions


In Ex 2 the Fourier coefficients were calculated directly from the integral definitions. In that example, and
many others, calculations can be simplified by using properties of the function f (t).
Recall
a function f (t) is even if f (−t) = f (t);
a function f (t) is odd if f (−t) = −f (t).
For example,
f (t) = cos t is even since f (−t) = cos(−t) = cos t = f (t),
f (t) = sin t is odd since f (−t) = sin(−t) = − sin t = −f (t).
Note that the product of two even functions f and g is even, since f (−t) g(−t) = f (t) g(t);
the product of two odd functions f and g is even, since f (−t) g(−t) = (−f (t)) (−g(t)) = f (t) g(t) but
the product of an odd function f with an even function g is odd , since
f (−t) g(−t) = (−f (t)) g(t) = −f (t) g(t).

The crucial results concern the integrals of odd and even functions. From the definitions of these functions,
or from their graphs, it is easily seen that
Z a
if f (t) is odd then f (t) dt = 0;
−a
Z a Z a
if f (t) is even then f (t) dt = 2 f (t) dt .
−a 0
These integral results are illustrated below:

...
......
f ...
.......
f
......... .........
..
.... .... ....... .. ....
... ..... .... .... ... ... ...
... ... .. .. ... ... .. ..
... .... ....
. ... .... ... .
... ....
. .. ....
... ... .. ... ... ... ....
... .... ... ... ...
... ... .... ...
... ..
..... ... ... .... ... .... ...
... .. ... ... .... . ...
. ...
−a ... A.
......
.
.
....
.
.
... .
A ...
.....
....... ....
.
.
.....
..
.
.
...
. A ... .
........................................................................................................... ..............................................................................................
.
. .
...
...
...
.................................................................................... .. ................................................................................................
.
. ......
.. .
. . . ...
...
...
...
.
...
... ..
... .
......
.
0 .
.
.
.
a .
t −a 0 ..
... a .
t
−A
...
... ..
....
.
.....
. .
.
.
....
...
... ... ...
... ..... ...
... ...
. . . ...
.... .... ...
....... ...
.
Figure 5(a) Figure 5(b)

–5–
Figure 4 shows that the function in Ex 2 is odd, and so use of the above integral results would have simplified
the calculation of the an and bn , in an analogous way to their use in the example below.

Ex 3. Determine the Fourier series expansion of the function f (t) defined by:

 −1 if −π ≤ t < −π/2,
f (t) = +1 if −π/2 ≤ t < π/2, and f (t + 2π) = f (t) for all t.

−1 if π/2 ≤ t < π,

f (t) is shown on Figure 6 – clearly function is even with period T = 2π (or 2L = 2π, if you are using the
Data Book).

....
.......
f
........
..
..1
........................................ .......................................... .......................................
.... . .. ... .. .... ...
...
... ... ... ... ... ... ...
. . . ... . . .
. .
....................................................................................................................................................................................................................................................................................................................................
−3π −2π ... ...
−π ...
0 ....
... ...
π 2π ...
.

...
.
t
. . . ... . . .
.. ... . ... .. . .
..................................... ....................................... ....... ........................................ ......................................
−1 ...
....
.

Figure 6

Using the general form for the Fourier coefficients, with T = 2π (or L = π),
Z +π   Z +π
2 2nπt 1
bn = f (t) sin dt = f (t) sin(nt) dt.
2π −π 2π π −π

Since f (t) is even and sin(nt) is odd, the product of these functions is odd and hence the integral is zero,
i.e. bn = 0.
For the coefficient a0 ,
Z +π Z +π
2 1
a0 = f (t) cos(0) dt = f (t) dt,
2π −π π −π

and since f (t) is even it is possible to rewrite the latter to give


Z (Z Z )
+π +π/2 π
2 2
a0 = f (t) dt = 1 dt + (−1) dt
π 0 π 0 π/2
2 n π/2 π
o 2 nπ   π o
= [t]0 + [−t]π/2 = + −π − − = 0.
π π 2 2

Turning to the coefficients an ,


Z +π   Z +π
2 2nπt 1
an = f (t) cos dt = f (t) cos(nt) dt.
2π −π 2π π −π

Both f (t) and cos(nt) are even, so the product is even and hence
Z (Z Z π )
+π +π/2
2 2
an = f (t) cos(nt) dt = 1. cos(nt) dt + (−1) cos(nt) dt
π 0 π 0 π/2
( π/2  π )
2 sin nt sin nt
= −
π n 0 n π/2
2 n  nπ   nπ o 4  nπ 
= sin − sin 0 − sin(nπ) + sin = sin .
πn 2 2 πn 2
–6–
Now (
 nπ  0 if n is even,
sin = +1 if n = 1, 5, 9 . . .,
2
−1 if n = 3, 7, 11 . . .,
so 
0 if n is even,
4
an = πn if n = 1, 5, 9 . . .,
− 4
if n = 3, 7, 11 . . .,
πn

and, combining together these results, gives the final solution



X    
2nπt 4 1 1
f (t) ∼ an cos = cos t − cos(3t) + cos(5t) − · · · .
n=1
2π π 3 5

Graphs of sums of various numbers of non-zero terms in this solution (i.e. the partial sums S2n−1 ) are shown
on the next page.
The figures show that the series becomes closer to the given function f (t) as more terms are included, but
there will always remain considerable error in the vicinity of a discontinuity no matter how many terms you
use. In trying to achieve the infinite slope at the discontinuity, the partial sum actually overshoots. These
additional peaks become of vanishingly small width as the number of terms increases (see the figures), but
the overshoot itself does not reduce to zero. This result is known as Gibbs’ phenomenon. In the case of
the square wave in Ex 3 the smallest magnitude of the overshoot is about 9%.

Justification of formulae in Fourier series Finally we ‘justify’ the Fourier series formulae. The ‘proofs’
involve orthogonality relations which will now be stated and proved:
Z T /2    
2πmt 2πnt
Result 1 cos sin dt = 0, for all m and n . (5)
−T /2 T T
   
2πmt 2πnt
(5) holds because cos is even, sin is odd, hence the product is odd and the above integral
T T
is zero.
Z T /2    
2πmt 2πnt
Result 2 cos cos dt = 0, for all m 6= n . (6)
−T /2 T T
On the LHS of (6) both cosine functions are even, so the product is even. The integral on the LHS can
therefore be expressed
Z T /2    
2πmt 2πnt
2 cos cos dt .
0 T T
On using the trigonometric identities on the Formula sheet, or in the Data Book, the above integral becomes
Z T /2     Z T /2   
2πmt 2πnt 2π(m + n)t 2π(m − n)t
2 cos cos dt = cos + cos dt
0 T T 0 T T
 T /2
sin(2π(m + n)t/T ) sin(2π(m − n)t/T )
= +
2π(m + n)/T 2π(m − n)/T 0
= 0, since sin(m − n)π = sin(m + n)π = 0 .

Using a very similar method (which is not given here) it can be shown that
Z T /2    
2πmt 2πnt
Result 3 sin sin dt = 0, for all m 6= n . (7)
−T /2 T T

–7–
Figures for this page to come

–8–
The case m = n for the integrals in (6) and (7) need to be treated separately:
Z T /2  
2πmt T
Result 4 cos2 dt = , m 6= 0. (8)
−T /2 T 2

To prove the latter


Z T /2   Z T /2   Z T /2   
2πmt 2πmt 4πmt
cos2 dt = 2 cos2 dt = 1 + cos dt
−T /2 T 0 T 0 T
 T /2
sin (4πmt/T ) T
= t+ dt = , since sin 2πm = sin 0 = 0.
4πm/T 0 2

Using an analogous argument it can be shown that


Z T /2  
2 2πmt T
Result 5 sin dt = , m 6= 0. (9)
−T /2 T 2

The relations (5) to (9) can be used to justify the expressions for the Fourier coefficients as follows.
The general formulae for Fourier series were stated earlier, equations (1) to (4). Multiply both sides of (1)
2
by the quantity cos(2πmt/T ) and integrate from −T /2 to T /2 to give
T
Z T /2   Z T /2  
2 2πmt 2 a0 2πmt
f (t) cos dt = cos dt
T −T /2 T T −T /2 2 T

" ( Z     )#
X 2 T /2 2πmt 2πnt
+ an cos cos dt (10)
n=1
T −T /2 T T

" ( Z     )#
X 2 T /2 2πmt 2πnt
+ bn cos sin dt .
n=1
T −T /2 T T

Relation (5) implies that the third integral on the RHS of (10) is always zero.
When m = 0 then the first integral on RHS of (10) is 6= 0, but the second integral = 0.
Z
2 T /2
Hence a0 = f (t) dt .
T −T /2
When m 6= 0, the first integral on RHS of (10) is zero but, using (6) and (8), the second integral is non-zero
Z  
2 T /2 2πmt
only when m = n. It follows that am = f (t) cos dt .
T −T /2 T
2
In a similar way, on multiplying (1) by sin(2πmt/T ) and integrating, we can show
Z T /2   T
2 2πmt
bm = f (t) sin dt .
T −T /2 T
[Dirichlet conditions are needed to ensure the convergence of the various integrals, and the legitimacy of
interchanging the orders of integration and summation which has been used in writing down (10).]

rec/01lfs

–9–