0% found this document useful (0 votes)
604 views40 pages

Chapter 12 A

1) The document discusses Fourier's 1807 paper proposing that any function can be represented as the sum of trigonometric functions, known as a Fourier series. 2) Fourier's idea launched major developments in mathematics, forcing reconsideration of the definition of a function and foundations of the subject. 3) Fourier analysis has applications in fields like signal analysis and data compression by decomposing signals into frequency components.

Uploaded by

Elisa Guglielmo
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)
604 views40 pages

Chapter 12 A

1) The document discusses Fourier's 1807 paper proposing that any function can be represented as the sum of trigonometric functions, known as a Fourier series. 2) Fourier's idea launched major developments in mathematics, forcing reconsideration of the definition of a function and foundations of the subject. 3) Fourier analysis has applications in fields like signal analysis and data compression by decomposing signals into frequency components.

Uploaded by

Elisa Guglielmo
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/ 40

C H A P T E R

12
Fourier Series
I n 1807, the French mathematician and physicist Joseph Fourier submitted a paper
on heat conduction to the Academy of Sciences of Paris. In this paper Fourier made
the claim that any function f .x / can be expanded into an infinite sum of trigonometric
functions,
1
X
f .x / D C Tak cos.kx / C bk sin.kx /U;  x  :
a0
for 
2 k D1

The paper was rejected after it was read by some of the leading mathematicians of
his day. They objected to the fact that Fourier had not presented much in the way of
proof for this statement, and most of them did not believe it.
In spite of its less than glorious start, Fourier’s paper was the impetus for major
developments in mathematics and in the application of mathematics. His ideas forced
mathematicians to come to grips with the definition of a function. This, together
with other metamathematical questions, caused nineteenth-century mathematicians
to rethink completely the foundations of their subject, and to put it on a more rigorous
foundation. Fourier’s ideas gave rise to a new part of mathematics, called harmonic
analysis or Fourier analysis. This, in turn, fostered the introduction at the end of
the nineteenth century of a completely new theory of integration, now called the
Lebesgue integral.
The applications of Fourier analysis outside of mathematics continue to multiply.
One important application pertains to signal analysis. Here, f .x / could represent
the amplitude of a sound wave, such as a musical note, or an electrical signal from a
CD player or some other device (in this case x represents time and is usually replaced
by t). The Fourier series representation of a signal represents a decomposition of
this signal into its various frequency components. The terms sin kx and cos kx
712
12.1 Computation of Fourier Series 713

oscillate with numerical frequency1 of k =2 . Signals are often corrupted by noise,
which usually involves the high-frequency components (when k is large). Noise can
sometimes be filtered out by setting the high-frequency coefficients (the ak and bk
when k is large) equal to zero.
Data compression is another increasingly important problem. One way to ac-
complish data compression uses Fourier series. Here the goal is to be able to store or
transmit the essential parts of a signal using as few bits of information as possible.
The Fourier series approach to the problem is to store (or transmit) only those ak and
bk that are larger than some specified tolerance and discard the rest. Fortunately, an
important theorem (the Riemann–Lebesgue Lemma, which is our Theorem 2.10) as-
sures us that only a small number of Fourier coefficients are significant, and therefore
the aforementioned approach can lead to significant data compression.

12.1 Computation of Fourier Series


The problem that we wish to address is the one faced by Fourier. Suppose that f .x /
is a given function on the interval T ;  U. Can we find coefficients, an and bn , so
that
a0 X
1
f .x / D C [an cos nx C bn sin nx] ; for   x   ? (1.1)
2 n D1

Notice that, except for the term a0 =2, the series is an infinite linear combination of the
basic terms sin nx and cos nx for n a positive integer. These functions are periodic
with period 2= n, so their graphs trace through n periods over the interval T ;  U.
Figure 1 shows the graphs of cos x and cos 5x, and Figure 2 shows the graphs of
sin x and sin 5x. Notice how the functions become more oscillatory as n increases.

1 1

x x
−π π −π π

−1 −1

Figure 1 The graphs of cos x Figure 2 The graphs of sin x


and cos 5x. and sin 5x.

The orthogonality relations


Our task of finding the coefficients an and bn for which (1.1) is true is facilitated by
the following lemma. These orthogonality relations are one of the keys to the whole
theory of Fourier series.

1
Be sure you know the difference between angular frequency, k in this case, and numerical frequency. It
is explained in Section 4.1.
714 Chapter 12 Fourier Series

LEMMA 1.2 Let p and q be positive integers. Then we have the following orthogonality relations.
Z  Z 
sin px d x D cos px d x D0 (1.3)
 
Z 
sin px cos qx d x D0 (1.4)

(
; if p D q
Z 
cos px cos qx d x D 0; if p 6 D q
(1.5)

(
; if p D q
Z 
sin px sin qx d x D 0; if p 6D q (1.6)


We will leave the proof of these identities for the exercises.

Computation of the coefficients


The orthogonality relations enable us to find the coefficients an and bn in (1.1).
Suppose we are given a function f that can be expressed as
1
X
f .x / D C Tak cos kx C bk sin kx U
a0
(1.7)
2 k D1

on the interval T ;  U. To find a0 , we simply integrate the series (1.7) term by term.
Using the orthogonality relation (1.3), we see that
Z 
f .x / d x D a0 : (1.8)


To find an for n  1, we multiply both sides of (1.7) by cos nx and integrate


term by term, getting
!
Z  Z  1
X
f .x / cos nx d x D a0
2
C Tak cos kx C bk sin kx U cos nx d x
  k D1
Z 
D a0
2
cos nx d x

1
X
Z  (1.9)
C ak cos kx cos nx d x
k D1 
1
X
Z 
C bk sin kx cos nx d x :
k D1 

Using the orthogonality relations in Lemma 1.2, we see that all the terms on the
right-hand side of (1.9) are equal to zero, except for
Z 
an cos nx cos nx d x D an  :

12.1 Computation of Fourier Series 715

Hence, equation (1.9) becomes


Z 
f .x / cos nx d x D an  ; for n  1;


so, including equation (1.8), 2


Z 
an D 1 f .x / cos nx d x ; for n  0: (1.10)

To find bn , we multiply equation (1.7) by sin nx and then integrate. By reasoning
similar to the computation of an , we obtain
Z 
bn D 1 f .x / sin nx d x ; for n  1. (1.11)


Definition of Fourier series


If f is a piecewise continuous function on the interval T ;  U, we can compute the
coefficients an and bn using (1.10) and (1.11). Thus we can define the Fourier series
for any such function.

DEFINITION 1.12 Suppose that f is a piecewise continuous function on the


interval T ;  U. With the coefficients computed using (1.10) and (1.11) , we
define the Fourier series associated to f by
1
X
f .x /  C C bn sin nx] :
a0
[an cos nx (1.13)
2 n D1

The finite sum


N
X
S N .x / D C C bn sin nx]
a0
[an cos nx (1.14)
2 n D1

is called the partial sum of order N for the Fourier series in (1.13). We say that
the Fourier series converges at x if the sequence of partial sums converges at x as
N ! 1: We use the symbol  in (1.13) because we cannot be sure that the series
converges. We will explore the question of convergence in the next section, and we
will see in Theorem 2.3 that for functions that are minimally well behaved, the 
can be replaced by an equals sign for most values of x.

EXAMPLE 1.15 ◆ Find the Fourier series associated with the function
(
0; for   x < 0,
f .x / D
 x ; for 0  x  :

2
We used the expression a0 =2 instead of a0 for the constant term in the Fourier series (1.7) so formulas
like equation (1.10) would be true for n D 0 as well as for larger n.
716 Chapter 12 Fourier Series

We compute the coefficient a0 using (1.8) or (1.10). We have

Z  Z 
a0 D 1
f .x / d x D 1
. x/ dx D 2 :
 0

For n  1, we use (1.10), and integrate by parts to get


Z  Z 
an D 1 f .x / cos nx d x D 1 . x / cos nx d x
 0
Z 
D n1 . x / d sin nx
0
 Z 

D 1
n
. x / sin nx C 1
n
sin nx d x
0 0

D 1
n 
2
.1 cos n /:

Thus, since cos n  D . 1/n , the even numbered coefficients are a2n D 0, and the
odd numbered coefficients are a2nC1 D 2=T.2n C 1/2 U for n  0:
We compute bn using (1.11). Again we integrate by parts to get

Z  Z 
bn D 1
f .x / sin nx d x D 1
. x / sin nx d x
 0
Z 
D 1
n 0
. x / d cos nx
 Z 

D 1
n
. x / cos nx
1
n 0
cos nx d x
0
|an| and |bn|
D n1 :

The magnitude of the coefficients is plotted in Figure 3, with jan j in black and
1 jbn j in blue. Notice how the coefficients decay to 0. The Fourier series for f is
1 1
 X cos.2n C 1/x X
f .x /  C 2 C sin nx
:
.2n C 1/2
(1.16)
0 n 4 n
0 10 20 30 n D0 n D1 ◆
Figure 3 The Fourier coefficients
for the function in Example 1.15. Let’s examine the experimental evidence for convergence of the Fourier series
in Example 1.15. The partial sums of orders 3, 30, and 300 for the Fourier series
in Example 1.15 are shown in Figures 4, 5, and 6, respectively. In these figures
the function f is plotted in black and the partial sum in blue. The evidence of
these figures is that the Fourier series converges to f .x /, at least away from the
discontinuity of the function at x D 0:
12.1 Computation of Fourier Series 717
π
π π

0 0 0
x x x
−π 0 π −π 0 π −π 0 π

Figure 4 The partial sum of Figure 5 The partial sum of Figure 6 The partial sum of
order 3 for the function in order 30 for the function in order 300 for the function in
Example 1.15. Example 1.15. Example 1.15.

Fourier series on a more general interval


It is very natural to consider functions defined on T ;  U when studying Fourier
series because in applications the argument x is frequently an angle. However,
in other applications (such as heat transfer and the vibrating string) the argument
represents a length. In such a case it is more natural to assume that x is in an interval
of the form T L ; L U. It is a matter of a simple change of variable to go from T ;  U
to a more general integral.
Suppose that f .x / is defined for L  x  L : Then the function F . y / D
f . L y =/ is defined for   y   . For F we have the Fourier series defined in
Definition 1.20. Using the formula y D  x = L, the coefficients an are given by
Z 
an D 1 F . y / cos ny d y

Z   
D 1
f
Ly

cos ny d y

Z L
n x
D L1 f .x / cos
L
dx:
L

The formula for bn is derived similarly. Thus equations (1.10) and (1.11) are the
special case for L D  of the following more general result.
P1
THEOREM 1.17 If f .x / D a0 =2 C n D1 Tan cos.n  x = L / C bn sin.n  x = L /U for L  x  L, then
Z L
n x
an D 1
L
f .x / cos
L
d x ; for n  0; (1.18)
L
Z L
n x
bn D 1
L
f .x / sin
L
d x ; for n  1: (1.19)
L

Keep in mind that Theorem 1.17 only shows that if f can be expressed as a
Fourier series, then the coefficients an and bn must be given by the formulas in (1.18)
and (1.19). The theorem does not say that an arbitrary function can be expanded into
a convergent Fourier series.
718 Chapter 12 Fourier Series

The special case when n D 0 in (1.18) deserves special attention. Since cos 0 D
1, it says
Z L
a0 D 1
L
f .x / d x :
L

Thus a0 =2 is the average of f over the interval T L ; L U:


We will also extend Definition 1.12 to functions defined on the interval T L ; L U.

DEFINITION 1.20 Suppose that f is a piecewise continuous function on the


interval T L ; L U. With the coefficients computed using (1.18) and (1.19), we
define the Fourier series associated to f by
1 h 
X n x  
n  x i
f .x /  C C
a0
an cos bn sin : (1.21)
2 n D1
L L

Even and odd functions


The computation of the Fourier coefficients can often be facilitated by taking note
of the symmetries of the function f .

DEFINITION 1.22 A function f .x / defined on an interval L  x  L is


said to be even if f . x / D f .x / for L  x  L, and odd if f . x / D f .x /
for L  x  L.
The graph of an even function is symmetric about the y-axis as shown in Figure 7.
Examples include f .x / D x 2 and f .x / D cos x. The graph of an odd function is
symmetric about the origin as shown in Figure 8. Examples include f .x / D x 3 and
f .x / D sin x.

f(x) f(x)

f(−a) = −f(a)

−a a a
x x
−L 0 L −L −a 0 L

f(−a) = f(a)

Figure 7 The graph of an Figure 8 The graph of an odd


even function. function.

The following properties follow from the definition.

PROPOSITION 1.23 Suppose that f and g are defined on the interval L  x  L.


1. If both f and g are even, then f g is even.
12.1 Computation of Fourier Series 719

2. If both f and g are odd, then f g is even.


3. If f is even and g is odd, then f g is odd.
4. If f is even, then
Z L Z L
f .x / d x D2 f .x / d x :
L 0

5. If f is odd, then
Z L
f .x / d x D 0:
L

We will leave the proof for the exercises. If we remember that the integral of f
computes the algebraic area under the graph of f , parts 4 and 5 of Proposition 1.23
can be seen in Figures 7 and 8.

The Fourier coefficients of even and odd functions


Parts 4 and 5 of Proposition 1.23 simplify the computation of the Fourier coefficients
of a function that is either even or odd. For example, if f is even, then, since
sin.n  x = L / is odd, f .x / sin.n  x = L / is odd by part 3 of Proposition 1.23, and by
part 5,
Z
1 L n x
bn D f .x / sin d x D 0:
L L L
Consequently, no computations are necessary to find bn . Using similar reasoning,
we see that f .x / cos.n  x = L / is even, and therefore
Z L Z L
n x n x
an D L1 f .x / cos
L
dx D L2 f .x / cos
L
dx:
L 0

Frequently integrating from 0 to L is simpler than integrating from L to L.


Just the opposite occurs for an odd function. In this case the an are zero and the
bn can be expressed as an integral from 0 to L. We will leave this as an exercise. We
summarize the preceding discussion in the following theorem.

THEOREM 1.24 Suppose that f is piecewise continuous on the interval T L ; L U.


1. If f .x / is an even function, then its associated
P Fourier series will involve only
the cosine terms. That is, f .x /  a0 =2 C n1D1 an cos.n  x = L / with
Z L
n x
an D 2
L
f .x / cos
L
dx; for n  0:
0

2. If f .x / is an odd function, thenP


its associated Fourier series will involve only
the sine terms. That is, f .x /  1 n D1 bn sin.n  x = L / with

Z L
n x
bn D L2 f .x / sin
L
dx; for n  1:
0
720 Chapter 12 Fourier Series

Let’s look at another example of a Fourier series.

EXAMPLE 1.25 ◆ Find the Fourier series associated to the function f .x / D x on   x  .


The function f is odd, so according to Theorem 1.24 its Fourier series will
involve only the sine terms. The coefficients are
Z 
bn D 2
x sin.nx / d x :
0

Using integration by parts, we obtain


 Z  
1/nC1
|bn |
 cos n 
bn D
2
n
C 1
n
cos n  x d x D 2. n
:
0

Thus, the Fourier series of f .x / D x on the interval T ;  U is


1
1
X . 1/nC1
f .x /  2 sin nx : (1.26)
n D1
n

0 n
0 10 20 30
The magnitude of the coefficients is plotted in Figure 9. The an are not shown,
Figure 9 The Fourier coefficients since they are all equal to 0. The partial sums of orders 5, 11, and 51 for the Fourier
for the function in Example 1.25. series in (1.26) are shown in Figures 10, 11, and 12 respectively. In these figures
the function f .x / D x is plotted in black and the partial sum in blue. These figures
provide evidence that the Fourier series converges to f .x /, at least on the open
interval . ; /. At x D  every term in the series is equal to 0. Therefore the
series converges to 0 at  , but not to f ./ D  .

π π π

0 0 0
x x x
−π 0 π −π 0 π −π 0 π

−π −π
−π

Figure 10 The partial sum of Figure 11 The partial sum of Figure 12 The partial sum of
order 5 for f (x) = x. order 11 for f (x) = x. order 51 for f (x) = x.

EXAMPLE 1.27 ◆ Compute the Fourier series for the saw-tooth wave f graphed in Figure 13 on the
interval T 1; 1U.
The graph in Figure 13 on the interval T 1; 1U consists of two lines with slope
C2 and 2 respectively. The formula for f on the interval 1x  1 is given by
(
1 C 2x ; if 1  x  0;
f .x / D
1 2x ; if 0  x  1:
12.1 Computation of Fourier Series 721
1

0
x
−3 −2 −1 0 1 2 3

−1

Figure 13 A saw-tooth shaped wave.

The function f is even and is periodic with period 2.


Since f is an even function, we see using Theorem 1.24 that only the cosine
terms appear in the Fourier series, and the coefficients are given by
Z 1
an D2 .1 2x / cos.n  x / d x ; for n  0:
0

For n D 0 we can compute the integral by observation,


Z 1
a0 D2 .1 2x / d x D 0:
0

For n > 0; we use integration by parts to obtain


Z 1
an D2 .1 2x / cos.n  x / d x D n 24 2 .1 cos n /:
0

Since cos n  D. 1/n , we see that

|an | a2n D0 and a2nC1 D .2n C81/2  2 ; for n  0:


1
Thus we have
1
8 X
f .x /  cos..2n C 1/ x /:
1

 2
n D0
.2n C 1/2
The magnitude of the coefficients is plotted in Figure 14. The bn are not shown,
since they are all equal to 0. Notice how fast the coefficients decay to 0, in comparison
0 n to those in Figures 3 and 9. The graph of the partial sum of order 3,
0 10 20 30  
S3 . x / D C
8 1
Figure 14 The Fourier cos  x cos 3 x ;
coefficients for the function in 2 9
Example 1.27. is shown in Figure 15. The sum of these two terms gives a pretty accurate approxima-
tion of the saw-tooth wave. This reflects the fact that the coefficients decay rapidly,
as shown in Figure 14. The partial sum of order 9 is plotted in Figure 16. Notice
that the poorest approximation occurs at the “corners” of the graph of the saw-tooth.
This is where the function fails to be differentiable, and these facts are connected.

EXAMPLE 1.28 ◆ Find the Fourier series of the function f .x / D sin 3x C 2 cos 4x on the interval
T ;  U.
722 Chapter 12 Fourier Series
1

0
x
−3 −1 1 3

−1

Figure 15 The partial sum of order 3 for the saw-tooth


function.

0
x
−3 −1 1 3

−1

Figure 16 The partial sum of order 9 for the saw-tooth


function.

Since f is already given as a sum of sines and cosines, no work is needed. The
Fourier series of f is just sin 3x C 2 cos 4x. This example illustrates an important
point. According to Theorem 1.17, the Fourier coefficients of a function are uniquely
determined by the function. Thus, by inspection, b3 D 1, a4 D 2 and all other
coefficients are equal to 0. By uniqueness, these are the same values as would have
been obtained by computing the integrals in Theorem 1.17 for the an and bn . ◆

EXAMPLE 1.29 ◆ Find the Fourier series of the function f .x / D sin2 x on the interval T ;  U.
In this example, f is not explicitly given as a linear combination of sines and
cosines, so there is some work to do. However, if we use the trigonometric identity

sin2 x D 12 .1 cos 2x /;

the right side is the desired Fourier series, since it is a finite linear combination of
terms of the form cos nx. ◆

................
EXERCISES
In Exercises 1–6 expand the given function in a Fourier series valid on the interval
  x   . Plot the function and two partial sums of your choice over the interval
  x   . Plot the same partial sums over the interval 3  x  3 .
1. f .x / D j sin x j
2. f .x / D jx j
12.1 Computation of Fourier Series 723
(
0;   x < 0;
3. f .x / D
x ; 0  x  :
(
0;   x < 0;
4. f .x / D
sin x ; 0  x  :
5. f .x / D x cos x
6. f .x / D x sin x

In Exercises 7–16 find the Fourier series for the indicated function on the indicated
interval. Plot the function and two partial sums of your choice over the interval.
(
1 C x ; for 1  x  0,
7. f .x / D on T 1; 1U
1; for 0 < x  1

8. f .x / D 4 x 2 on T 2; 2U
9. f .x / D x 3 on T 1; 1U
10. f .x / D sin x cos2 x on T ;  U
(
0; for 1  x  0,
11. f .x / D on T 1; 1U
x 2 ; for 0 < x  1
(
sin  x =2; for 2  x  0,
12. f .x / D on T 2; 2U
0; for 0 < x  2
(
cos  x ; for 1  x  0,
13. f .x / D on T 1; 1U
1; for 0 < x  1
(
1 C x ; for 1  x  0,
14. f .x / D on T 1; 1U
1 x ; for 0 < x  1
(
2 C x; for 2  x  0,
15. f .x / D on T 2; 2U
2 C x ; for 0 < x  2
(
2; for 2  x  0,
16. f .x / D on T 2; 2U
2 x ; for 0 < x  2

17. Expand the function f .x / D x 2 in a Fourier series valid on the interval  


x   . Plot both f and the partial sum S N for N D 1; 3; 5; 7. Observe how
the graphs of the partial sums approximate the graph of f . Plot the same graphs
over the interval 2  x  2 .
18. Expand the function f .x / D x 2 in a Fourier series valid on the interval 1 
x  1. Plot both f and the partial sum S N for N D 1; 3; 5; 7. Observe how the
graphs of the partial sums approximate the graph of f . Plot the same graphs
over the interval 2  x  2.
724 Chapter 12 Fourier Series

In Exercises 19–22 determine if the function f is even, odd, or neither.


19. f .x / D j sin x j
20. f .x / D x C 3x 3
21. f .x / D e x
22. f .x / D x C x2
23. Use the addition formulas for sin and cos to show that

cos cos D 12 Tcos. / C cos. C /U;

sin sin D 12 Tcos. / cos. C /U;

sin cos D 12 Tsin. / C sin. C /U:


24. Prove Lemma 1.2. Hint: Use Exercise 23.
25. Complete the derivation of equation 1.11 for the coefficient bn :
26. Prove parts 1, 2, and 3 of Proposition 1.23.
27. Prove parts 4 and 5 of Proposition 1.23.
28. Prove part 2 of Theorem 1.24.
29. From Theorem 1.24, the Fourier series of an odd function consists only of sine-
terms. What additional symmetry conditions on f will imply that the sine
coefficients with even indices will be zero? Give an example of a function
satisfying this additional condition.
30. Suppose that f is a function which is periodic with period T and differentiable.
Show that f 0 is also periodic with period T .
31. Suppose that f is a function defined on R. Show that there is an odd function
f odd and an even function f even such that f .x / D f odd.x / C f even .x / for all x.

12.2 Convergence of Fourier Series


Suppose that f is a piecewise continuous function on the interval T L ; L U; and that
1 h
X  n x   n  x i
f .x /  C C bn sin
a0
an cos (2.1)
2 n D1
L L

is its associated Fourier series. Two questions arise immediately whenever an infinite
series is encountered. The first question is, does the series converge? The second
question arises if the series converges. Can we identify the sum of the series?
In particular, does the Fourier series of a function f converge at x to f .x / or to
something else? These are the questions we will address in this section.3
3
Theorem 1.17 does not answer this question, since it assumes that f .x / equals its Fourier series and
then describes what the Fourier coefficients have to be.
12.2 Convergence of Fourier Series 725

Fourier Series and periodic functions


The partial sums of the Fourier series in (2.1) have the form
N h
X  n x   n  x i
S N .x / D C C bn sin
a0
an cos : (2.2)
2 n D1
L L

The function S N .x / is a finite linear combination of the trigonometric functions


cos.n  x = L / and sin.n  x = L /, each of which is periodic with period 2L.4 Hence
for every N the partial sum S N is a function that is periodic with period 2L. Conse-
quently, if the partial sums converge at each point x, the limit function must also be
periodic with period 2L :
Let’s consider again the function f .x / D x, which we treated in Example 1.25.
f .x / is defined for all real numbers x, and it is not periodic. We found that its Fourier
series on the interval [ ;  ] is
1
X . 1/nC1
2 sin nx :
n D1
n

The partial sums of this series are all periodic with period 2 . Therefore, if the
Fourier series converges, the limit function will be periodic with period 2 . Thus
the limit cannot be equal to f .x / D x everywhere. The evidence from the graphs of
the partial sums in Figures 10, 11, and 12 of the previous section indicates that the
series does converge to f .x / D x on the interval . ; /. Since the limit must be
2 -periodic, we expect that the limit is closely related to the periodic extension of
f .x / D x from the interval . ; /. The situation is illustrated in Figure 1, which
shows the partial sum of order 5 over 3 periods. The periodic extension of f .x / D x
is shown plotted in black.
Since it will appear repeatedly, let’s denote the periodic extension of a function
f .x / defined on an interval T L ; L U by f p .x /. Usually it is easier to understand
the periodic extension of a function graphically than it is to give an understandable
formula for it. This is illustrated for f .x / D x in Figure 1. However, for the record,
the formula for the periodic extension5 is
f p .x / D f .x 2kL / for .2k 1/ L < x  .2k C 1/ L :
You will notice that f p is periodic with period 2L :
To get a feeling for whether or not the Fourier series of f .x / D x converges
to its periodic extension f p , we graph both f p and the partial sum of order 21 in
Figure 2. Note that the graph of S21 (the blue curve) is close to the graph of f p
except at the points of discontinuity of f p , which occur at the odd multiples of :
The accuracy of the approximation of f p .x / by S21.x / gets worse as x gets closer

4
We studied periodic functions in Section 5.5, but let’s refresh our memory. A function g .x / is periodic
with period T if g .x C T / D g .x / for all x. Notice that every integral multiple of a period is also a period.
The smallest period of cos.n  x = L / and sin.n  x = L / is 2L = n, so n  .2L = n / D 2L is also a period. Thus
each function in the partial sum SN in (2.2) is periodic with period 2L.
5
Notice we use less than (<) at the lower endpoint of each interval and less than or equal () at the upper
endpoint. A choice is necessary to avoid having two values at the endpoints. This is not the only possible
choice, but it is as good as any.
726 Chapter 12 Fourier Series
π

0
x
−3π −π π 3π

−π

Figure 1 The partial sum of order 5 for the series in


Example 1.25 over three periods.

0
x
−3π −π π 3π

−π

Figure 2 The partial sum of order 21 for the series in


Example 1.25 over three periods.

to a point of discontinuity. This is necessary, simply because each partial sum is a


continuous function, while f p is not. Furthermore, we see that S N ./ D 0 for all
N . Hence the Fourier series converges to 0 at  , and not to f p ./ D : The same
phenomenon occurs at x D .2k C 1/ for any integer k, and these are the points of
discontinuity of f p .
We will see these considerations reflected in our convergence theorem.

Piecewise continuous functions


Suppose that f is a function defined in an interval I. We define the right-hand and
left-hand limits of f at a point x 0 to be

f .x 0C / D lim f .x / and f .x 0 / D lim f .x /:


x ! x 0C x !x0

The function f is continuous at x 0 if and only if both limits exist and f .x 0C / D


f .x 0 / D f .x 0 /:
In Section 5.1, we defined a function f to be piecewise continuous if it has
only finitely many points of discontinuity in any finite interval, and if both the left-
and right-hand limits exist at every point of discontinuity. Thus, for a piecewise
continuous function the left- and right-hand limits exist everywhere.
You will notice that the periodic extension f p of f .x / D x on the interval
T ;  U that we saw in Example 1.25 is piecewise continuous. The points of
discontinuity for f p are at .2k C 1/ , the odd integral multiples of  . We have
f p .T.2k C 1/ UC/ D  and f p .T.2k C 1/ U / D  . In fact, if f is any function
that is continuous on the interval T L ; L U, then the periodic extension f p is piece-
12.2 Convergence of Fourier Series 727

wise continuous on all of R, and its only possible points of discontinuity are the odd
multiples of L.
We will say that the function f has left-hand derivative at x 0 if the left-hand
limit f .x 0 / exists and the limit

f .x / f .x 0 /
lim /
x !x0 x x0

exists. Similarly, we will say that f has right-hand derivative at x 0 if f .x 0C / exists


and the limit
f .x / f .x 0C /
lim
x ! x 0C x x0

exists. If f is differentiable at x 0 , then f has left- and right-hand derivatives there


and both are equal to f 0 .x 0 /:
For an example, we consider again the periodic extension f p of f .x / D x on
the interval T ;  U. The left- and right-hand derivatives exist at every point and
are equal to 1, even at the points of discontinuity. Another example is the saw-tooth
wave in Example 1.27. Notice that the saw-tooth function is continuous everywhere,
but fails to be differentiable where x is an integer. However, at these points the left-
and right-hand derivatives of the saw-tooth wave exist.

Convergence
Since a Fourier series converges to a periodic function, we may as well assume
from the beginning that the function f is already periodic. If, as was the case in
Example 1.25, we are given a function that is not periodic, then it is necessary to
look at the periodic extension of the function.
We are now in a position to state our main theorem on the convergence of Fourier
series. A proof is beyond the scope of this text, but one can be found in any advanced
book on Fourier series.

THEOREM 2.3 Suppose f .x / is a piecewise continuous function that is periodic with period 2L.
If the left- and right-hand derivatives of f exist at x 0 then the Fourier series for f
converges at x 0 to
f .x 0C / C f .x 0 /
:
2

If f is continuous at x 0 , then f .x 0C / D f .x 0 / D f .x 0 /, so assuming that the


left- and right-hand derivatives of f exist at x 0 , Theorem 2.3 concludes that the
Fourier series converges at x 0 to f .x 0 /.
Theorem 2.3 assumes the existence of the left- and right-hand derivatives of f
only at the point x 0 , and concludes that the Fourier series converges only at x 0 . This
indicates that it is only the smoothness of f near x 0 that affects the convergence
there. However, in most of the examples that we will consider, the left- and right-
hand derivatives will exist everywhere. We will consider this special case in the next
corollary.
728 Chapter 12 Fourier Series

COROLLARY 2.4 Suppose f .x / is a piecewise continuous function that is periodic with period 2L.
Suppose in addition that f has left- and right-hand derivatives at every point.

1. At every point x 0 where f is continuous the Fourier series for f converges to


f . x 0 /.
2. At every point x 0 where f is not continuous the Fourier series for f converges
to
f .x 0C / C f .x 0 /
: (2.5)
2

EXAMPLE 2.6 ◆ We have verified that the hypothesis of Corollary 2.4 holds for the periodic extension
f p of f .x / D x on   x   . Show that the conclusion of Corollary 2.4 holds
at any point of discontinuity.
The points of discontinuity are .2k C 1/ , the odd integral multiples of  . We
have f p .T.2k C 1/ UC / D  and f p .T.2k C 1/ U / D  . Therefore,
f p .T.2k C 1/ UC / C f p .T.2k C 1/ U /
2
D 0:
We have also seen that the Fourier series of f is
1
X . 1/nC1
2 sin nx :
n D1
n

When x D .2k C 1/ every term in the series is equal to 0. Hence the series converges
to 0, so the conclusion of Theorem 2.5 is valid at x D .2k C 1/ . ◆

EXAMPLE 2.7 ◆ Let f .x / D


x 2 on the interval 1  x  1. Without computing the Fourier
coefficients, explicitly describe the sum of the Fourier series of f for all x.6
Of course, f .x / D x 2 is not periodic. Therefore, we must consider its periodic
extension, f p , graphed in black in Figure 3. Note that f p is continuous everywhere,
and it is differentiable except at the odd integers, x D 2k C 1. At these points the
left- and right-hand derivatives exist. Thus the left- and right-hand derivatives exist
everywhere, and Corollary 2.4 implies that its Fourier series converges to f p .x / for
all x. ◆

EXAMPLE 2.8 ◆ Consider the function


8
>
< 1; for 1  x  0,
f .x / D 0; for x D 0,
>
:
1; for 0 < x  1:
Find the Fourier series for f , and describe the sum of its Fourier series.
6
The computation of this series is Exercise 18 in Section 1.
12.2 Convergence of Fourier Series 729
1

0
x
−3 −1 1 3

Figure 3 The partial sum S5 (x) for the function in


Example 2.7.

Since f is only defined over the interval T 1; 1U, we are really looking at the
Fourier series of its periodic extension f p , shown plotted in black in Figure 4. For
obvious reasons, f p is called the square wave. Since f (and f p ) is an odd function,
Theorem 1.24 says that only the sine terms are present in the Fourier series, and that
the coefficients are
Z 1 Z 1
bn D2 f .x / sin n  x d x D2 sin n  x d x D 2
n
T. 1/n 1 U:
0 0

Hence
b2n D0 and b2nC1 D .2n C4 1/ :
The Fourier series associated to f p (and to f ) is
1
4X
f p .x /  sin.2n C 1/ x :
1
 nD0 2n C 1
(2.9)

The function f p is piecewise continuous, with discontinuities at all of the integers.


In addition, its left- and right-hand derivatives exist everywhere. Thus, the Fourier
series converges to f p .x / if x is not an integer. If x D k is an integer, the series
converges to
f p .k C / C f p .k / 1 C . 1/
2
D 2
D 0:
In fact, each term of the Fourier series in (2.9) is equal to 0 when x D k is an integer.
The partial sum of the Fourier series of order 11 is shown plotted in Figure 4. ◆

Gibb’s phenomenon
Suppose that the piecewise continuous function f has a discontinuity at x 0 , but that
the left- and right-hand derivatives of f exist at x 0 . As Theorem 2.3 points out, the
Fourier series of f converges at x 0 to T f .x 0C / C f .x 0 /U=2. However, if you look
closely at the graphs of the partial sums near the points of discontinuity in Figures 1,
2, and 4, we see that the graph of the partial sum overreaches the graph of the function
on each side of the discontinuity. This effect is called Gibb’s phenomenon.
To examine Gibb’s phenomenon a little more deeply, let’s look at the graphs of
some high order partial sums for the square wave. The partial sums S301 and S601
730 Chapter 12 Fourier Series

0
x
−3 −1 1 3

−1

Figure 4 The partial sum S11 (x) for the square wave in
Example 2.8.

1 1

0 0
x x
−0.01 0.01 −0.01 0.01

−1 −1

Figure 5 The partial sum Figure 6 The partial sum


S301 (x) for the square wave. S601 (x) for the square wave.

are plotted in Figures 5 and 6, but only for 0:01  x  0:01; so that we may
see the overrun clearly. Notice that both partial sums display the overrun that is
characteristic of Gibb’s phenomenon. In the two cases the amount of the overrun is
approximately the same, but for the higher order sum the duration is smaller.
It can be proved that whenever a function f satisfies the hypotheses of Theo-
rem 2.3, but has a discontinuity at x 0 , the graphs of the partial sums of the Fourier
series display Gibb’s phenomenon near x 0 . Furthermore, the ratio of the length
of the interval between the upper peak and the lower peak of the partial sum to
j f .x0C/ f .x0 /j is approximately 1:179 in every case.
The Riemann–Lebesgue Lemma
Notice that in every example we have considered, the Fourier coefficients approach 0
as the frequency gets large. This is demonstrated, in particular, in Figures 3, 9, and 14
in Section 1. These examples are typical of the behavior of Fourier coefficients, as
the next theorem, known as the Riemann-Lebesgue lemma, shows.

THEOREM 2.10 Suppose f is a piecewise continuous function on the interval a  x  b. Then


Z b Z b
lim
k !1
f .x / cos kx d x D klim
!1
f .x / sin kx d x D 0:
a a

As we will see in Section 5, this theorem has important applications. Basically,


this theorem states that any given signal can be approximated very well by a few
dominant Fourier coefficients because most of the Fourier coefficients are near zero.
12.2 Convergence of Fourier Series 731

The intuitive reason behind this theorem is that as k gets very large, sin kx and
cos kx oscillate much more rapidly than does f (see Figures 1 and 2 in Section 1).
If k is large, f .x / is nearly constant on two adjacent periods of sin kx or cos kx. The
integral over each period is almost zero, since the areas above and below the x-axis
almost cancel.

Interpretation of the Fourier coefficients


Suppose that f is a function that satisfies the hypotheses of Corollary 2.4. Then
f .x / is equal to its Fourier series

1 h
X  n x   n  x i
f .x / D C C bn sin
a0
an cos ; (2.11)
2 n D1
L L

except at those points where f is not continuous. Let’s look more closely at the nth
summand, which we can rewrite in terms of its amplitude and phase7 as
 n x   n x   n x 
f n .x / D an cos C bn sin D An cos n ; (2.12)
L L L
p
where An D an2 C bn2 and tan n D bn =an : We see that f n .x /, defined in (2.12), is
an oscillation with amplitude An and frequency8 !n D n = L : We will call f n the
component of f at frequency !n D n = L : Notice that !n D n !1 , where !1 D = L,
so all of the frequencies are integer multiples of the fundamental frequency !1 .
We can interpret Corollary 2.4 as saying that any function that satisfies its hy-
potheses is an infinite linear combination of oscillatory components at frequencies
that are integer multiples of the fundamental
p frequency. The component of f at
frequency !n has amplitude An D an2 C bn2 . The amplitude is a numerical measure
of the importance of the component in the Fourier expansion. By the Riemann–
Lebesgue lemma, the Fourier coefficients decay to 0 as n increases, so the amplitudes
An do as well. As a result, the components at the smaller frequencies dominate the
Fourier series in (2.11). This fact is illustrated by the plots of the magnitudes of the
coefficients in Figures 3, 9, and 14 in Section 1.

Fourier coefficients for periodic functions


In this section we have been looking at periodic functions, since it is only such
functions that can be the sums of Fourier series. It is worth pointing out that for a
periodic function with period 2L, the coefficients can be computed by an integral
over any interval of length 2L. More precisely, we have the following:

7
See Section 4.4.
8
This is an angular frequency. Remember that we are using angular frequencies instead of numerical
frequencies unless otherwise stated.
732 Chapter 12 Fourier Series

PROPOSITION 2.13 Suppose that f is a piecewise continuous function that is periodic with period 2L.
Then for any c the Fourier coefficients for f are given by
Z cC2L
n x
an D L1 f .x / cos
L
dx; for n  0;
c
Z cC2L
n x
bn D 1
L
f .x / sin
L
dx; for n  1:
c

We will leave the proof to the exercises.


................
EXERCISES
In Exercises 1–6 determine if the function f is periodic or not. If it is periodic, find
the smallest positive period.
1. f .x / D j sin x j
2. f .x / D cos 3 x
3. f .x / D x
4. f .x / D sin.x / C cos.x =2/
5. f .x / D x 2
6. f .x / D e x

In Exercises 7–14 find the sum of the Fourier series for indicated function at every
point in R without computing the series. Each of these is an exercise in Section 1.
Although that is not very important, the reference is included in parentheses.
(
0;   x < 0;
7. f .x / D on T ;  U (See Exercise 1.3)
x; 0  x  
(
0;   x < 0;
8. f .x / D on T ;  U (See Exercise 1.4)
sin x ; 0  x  
(
1 C x ; for 1  x  0
9. f .x / D on T 1; 1U (See Exercise 1.7)
1; for 0 < x  1

10. f .x / D 4 x 2 on T 2; 2U (See Exercise 1.8)


11. f .x / D x 3 on T 1; 1U (See Exercise 1.9)
(
0; for 1  x  0;
12. f .x / D on T 1; 1U (See Exercise 1.11)
x 2 ; for 0 < x  1
(
sin  x =2; for 2  x  0,
13. f .x / D on T 2; 2U (See Exercise 1.12)
0; for 0 < x  2
12.2 Convergence of Fourier Series 733
(
2; for 2  x  0,
14. f .x / D on T 2; 2U (See Exercise 1.16)
2 x ; for 0 < x  2
15. Compute the Fourier series for the function f .x / D jx j on the interval T ;  U:
(See Exercise 1.2.) Use the result and Theorem 2.3 to show that
1
X  2
1
.2n C 1/ 2
D 8
:
n D0

16. Compute the Fourier series for the function f .x / D x 2 on the interval T ;  U:
(See Example 2.7.) Use the result and Theorem 2.3 to show that
1 1
. 1/nC1
D 12 D 6 :
X 2 X 1 2
and
n D1
n2 n D1
n2

17. Compute the Fourier series for the function f .x / D x 4 on the interval T ;  U:
Use the result, Theorem 2.3, and Exercise 16 to show that
1 1
. 1/nC1 
D 90 :
X 4 X 4

n4
D 7120 and
1
n4
n D1 n D1

18. Expand the function


8
<0;
> 1 < x  1=2;
f .x / D 1; 1=2 < x  1=2;
>
:
0; 1=2 < x  1;

in a Fourier series valid on the interval 1  x  1. Plot the graph of f and the
partial sums of order N for N D 5; 10; 20; and 40, as in Exercise 17 in Section
1. Notice how much slower the series converges to f in this example than in
Exercise 17 in Section 1. What accounts for the slow rate of convergence in this
example?
19. Expand the function f .x / D er x in a Fourier series valid for   x   . For
the case r D 1=2, plot the partial sums of orders N D 10; 20; and 30 of the
Fourier series along with the graph of f p over the intervals   x   and
2  x  2 .
20. Use the previous exercise to compute the Fourier coefficients for the function
f .x / D sinh x D .e x e x /=2 and f .x / D cosh.x / D .e x C e x /=2 over the
interval   x   .
21. Use Theorem 2.3 to determine the sum of the Fourier series of the function f
defined in Exercise 18 for each x in the interval 1  x  1.
22. Suppose that f is periodic with period T and differntiable. Show that f 0 is also
periodic with period T .
734 Chapter 12 Fourier Series

23. Suppose that f is periodic with period T . Show that


Z b CT Z a CT
f .x / d x D f .x / d x
b a

for any a and b. Use this result to prove Proposition 2.13.


24. Suppose that f is periodic with period T . Define
Z x
F .x / D f .y/ d y:
0
RT
Show that if 0 f .y/ d y D 0, then F is periodic with period T . (Hint: Use
Exercise 23.)

12.3 Fourier Cosine and Sine Series


In this section we will examine the possibility of finding Fourier series of the forms
1
X n x
f .x / D bn sin ; for 0  x  L;
n D1
L

and
1
X n x
f .x / D C for 0  x  L:
a0
an cos ;
2 n D1
L

The basic idea behind our method comes from Theorem 1.24.

Fourier cosine series


According to Theorem 1.24, the Fourier series of an even function contains only
fe (x) cosine terms. If the function f .x / is defined only for 0  x  L, we extend it to
L  x  0 as an even function. The even extension of f is defined by
2
(
f .x /; if 0  x  L,
f e .x / D
1 f . x /; if L  x < 0:

f(x) = ex 0 For the function f .x / D e x on the interval T0; 1U, the even extension f e is plotted in
x blue in Figure 1.
Since the function f e is an even function defined on T L ; L U, Theorem 1.24 tells
−1 0 1

Figure 1 The even extension of us that its Fourier series has the form
f (x ) = e x . 1 
X n x 
f e .x /  C  x  L;
a0
an cos ; for L (3.1)
2 n D1
L

where Z L 
n x 
an D 2
L
f e .x / cos
L
dx; for n  0:
0
12.3 Fourier Cosine and Sine Series 735

Since f e .x / D f .x / for 0  x  L, this formula becomes


Z L 
n x 
an D L2 f .x / cos
L
dx; for n  0: (3.2)
0

Furthermore, if we restrict ourselves to the interval T0; L U, where f e .x / D f .x /,


we can write
1
X  n x 
f .x /  C for 0  x  L;
a0
an cos ; (3.3)
2 n D1
L

with the coefficients given by (3.2). The series in (3.3), with the coefficients given
in (3.2), is called the Fourier cosine series for f on the interval T0; L U.

EXAMPLE 3.4 ◆ Find the Fourier cosine series for f .x / D e x on the interval T0; 1U:
|an | The coefficients in (3.2) become
Z 1
 
an D2 e x cos n  x d x D 1 C 2n 2 2 . 1 /n e 1 :
0

1 This evaluation can be done by direct computation, by looking the integral up in an


integral table, or by using a computer and a symbolic algebra program. The magni-
tude of these coefficients is plotted in Figure 2. Notice how quickly the coefficients
decay to 0. The Fourier series is
0 n
0 10 1
X . 1/n e
Figure 2 The Fourier cosine ex  .e 1/ C 2
1C n2 
1
2
cos n  x
coefficients for f (x) = e x . n D1 (3.5)
2 .e C 1 / 2.e 1/
 .e 1/
1 C 2
cos  x C 1 C 4 2
cos 2 x C:::
on the interval T0; 1U:
The partial sum S3.x / is plotted in blue in Figure 3. The black curve in Figure 3
is the periodic extension of the even extension of the function f .x / D e x . We will
call this the even periodic extension of f , and we will denote it by f ep . Since, in
this case, f ep is continuous and satisfies the hypotheses of Corollary 2.4, the Fourier
series converges everywhere to f ep .x /. ◆

2 Fourier sine series


x
f(x) = e In a similar manner, a function f can be expanded in a series which involves only
0 sine terms. Again motivated by Theorem 1.24, we consider the odd extension of f ,
x
−1 0 1 which is defined by
8
< f .x /;
> if 0 < x  L ;
f o .x / D if x D 0;
−2
fo (x) 0;
>
:
f . x /; if L  x < 0:
Figure 4 The odd extension of
f (x ) = e x . The odd extension of f .x / D e x is plotted in blue in Figure 4. Since the function f o
736 Chapter 12 Fourier Series

0
x
−3 −2 −1 0 1 2 3

Figure 3 The partial sum S3 of the Fourier cosine series for


f (x) = e x plotted over three periods.

is an odd function defined on T L ; L U, Theorem 1.24 tells us that its Fourier series
has only sine terms. Proceeding as before, we find that
1
X
f .x /  bn sin nx ; for 0 < x  L; (3.6)
n D1
where Z L 
n x 
bn D L2 f .x / sin
L
d x ; for n  1: (3.7)
0
The series in (3.6), with the coefficients given in (3.7), is called the Fourier sine
series for f on the interval T0; L U.

EXAMPLE 3.8 ◆ Find the Fourier sine series for f .x / D e x on the interval T0; 1U:
The coefficients in (3.7) become

D 2n 1T1C n.2 12 / eU :
Z 1 n
bn D2 e x sin n  x d x
0
This evaluation can be done by direct computation, by looking the integral up in an
integral table, or by using a computer and a symbolic algebra program. Thus we
have
X1 2n  T1 . 1/n eU
ex  sin n  x
n D1
1 C n 2 2
(3.9)
2.e C 1/ 4.e 1/ 6.e C 1/
 1 C  2 sin  x 1 C 4 2 sin 2 x C 1 C 9 2 sin 3 x C : : :

0
x
−3 −2 −1 0 1 2 3

−2

Figure 6 The partial sum S3 of the Fourier sine series for


f (x) = e x plotted over three periods.
12.3 Fourier Cosine and Sine Series 737

|bn | on the interval T0; 1U: The magnitude of the coefficients is plotted in Figure 5. Notice
that the sine coefficients do not decay nearly as rapidly as do the cosine coefficients
1 in Figure 2. The partial sum of order 3 is plotted in blue in Figure 6. It is inter-
esting to compare this figure with Figure 3. The black curve in Figure 6 is the odd
periodic extension of f .x / D e x , which we denote by f op . In this case f op satis-
fies the hypotheses of Corollary 2.4 and fails to be continuous only at the integers.
Consequently, the Fourier sine series converges to f op .x / everywhere except at the
integers. ◆
0 n Note that while we used the even and odd extensions of f ( f e and f o ) to help
0 10
derive the cosine and sine expansions, the formulas for an and bn involve only the
Figure 5 The Fourier sine function f on the interval T0; L U. This is reflected by the fact that the cosine and sine
coefficients for f (x) = e x . expansions converge to f only on .0; L /. Outside this interval the cosine and sine
expansions converge to f ep and f op , respectively. Examples 3.4 and 3.8 illustrate
these facts, but another example might help to put things into perspective.

EXAMPLE 3.10 ◆ Find the complete Fourier series for f .x / D e x on the interval T 1; 1U:
From (1.10) we have
Z 1
e 1=e
an D e x cos n  x d x D. 1 /n
1 C n2 2
; for n  0;
1

while from (1.11) we have


Z 1
n .e 1=e/
bn D e x sin n  x d x D. 1/nC1
1 C n2 2
; for n  1.
1

Again there are several ways to verify this. Hence the complete Fourier series for e x
on T 1; 1U is
|an| and |bn|

 ( 1 )

C 1 .C n12/ 2 [cos n  x
X n
2 ex D e
1
e
1
2
n  sin n  x] : (3.11)
n D1

1 The magnitude of the coefficients is plotted in Figure 7, with jan j in black and
jbn j in blue. The partial sum ofxorder 3 is plotted in blue Figure 8.
0 n The periodic extension of e satisfies the hypotheses of Corollary 2.4 and fails to
0 10 be continuous only at the odd integers. Consequently, the Fourier series converges
Figure 7 The coefficients of the to the periodic extension everywhere except at the odd integers. ◆
complete Fourier series for f (x) = Now we have three Fourier series that converge to f .x / D e x on the interval
e x. .0; 1/. The first in (3.5) contains only cosine terms. The second in (3.9) contains only
sine terms. The third in (3.11) contains both sine and cosine terms. It is interesting
to compare graphs of the partial sums in Figures 3, 6, and 8. The difference between
the three is what happens outside of the interval .0; 1/. The cosine series converges
to f ep , the even periodic extension of f . The sine series converges to f op , the odd
periodic extension of f , except at the integers. And, finally, the full Fourier series
converges to f p , the periodic extension of f , except at the odd integers.
Of course, the same three series can be considered for any piecewise continuous
function defined on an interval of the form T L ; L U.
738 Chapter 12 Fourier Series

x
−3 −2 −1 0 1 2 3

Figure 8 The partial sum S3 of the complete Fourier series


for f (x) = e x plotted over three periods.
................
EXERCISES
In exercises 1–4 sketch the graph of the odd extension of the function f . Also sketch
the graph of the odd periodic extension with period 2 over three periods.
1. f .x / D 1 x
2. f .x / D 1 2x
3. f .x / D x 2
1
4. f .x / D x 2 2

In exercises 5–8 sketch the graph of the even extension of the function f . Also
sketch the graph of the even periodic extension with period 2 over three periods.
5. f .x / D 1 x
6. f .x / D 1 2x
7. f .x / D x 2
1
8. f .x / D x 2 2

In Exercises 9 – 20 expand the given function in a Fourier cosine series valid on the
interval 0  x   . Plot the function and two partial sums of your choice over the
interval 0  x   . Plot the same partial sums and the function the series converges
to over the interval 3  x  3 .
9. f .x / D x
10. f .x / D sin x
11. f .x / D cos x
12. f .x / D 1
13. f .x / D  x
14. f .x / D x 2

15. f .x / D x 3
16. f .x / D x 4
12.3 Fourier Cosine and Sine Series 739
(
1; 0  x < =2;
17. f .x / D
0; =2  x  
(
x; 0  x < =2;
18. f .x / D
=2; =2  x  
19. f .x / D x cos x
20. f .x / D x sin x

In Exercises 21 – 32 expand the given function in a Fourier sine series valid on the
interval 0  x   . Plot the function and two partial sums of your choice over the
interval 0  x   . Plot the same partial sums and the function the series converges
to over the interval 3  x  3 .
21. Same as Exercise 9
22. Same as Exercise 10
23. Same as Exercise 11
24. Same as Exercise 12
25. Same as Exercise 13
26. Same as Exercise 14
27. Same as Exercise 15
28. Same as Exercise 16
29. Same as Exercise 17
30. Same as Exercise 18
31. Same as Exercise 19
32. Same as Exercise 20
33. Show that the functions cos.n  x = L /, n D 0 ; 1; 2; : : : are orthogonal on the
interval T0; L U. This means that
Z L
cos.n  x = L / cos. p  x = L / d x D 0; if p 6D n :
0
Hint: Use Exercise 23.
34. Show that the functions sin.n  x = L /, n D 1; 2; 3; : : : are orthogonal on the
interval T0; L U. This means that
Z L
sin.n  x = L / sin. p  x = L / d x D 0; if p 6D n :
0
Hint: Use Exercise 23.
35. Show that Z 1
cos.2n  x / sin.2k  x / d x D 0:
0
740 Chapter 12 Fourier Series

Hint: Use Exercise 23.


36. If f .x / is continuous on the interval 0  x  L, show that its even periodic
extension is continuous everywhere. Does this statement hold for the odd peri-
odic extension? What additional condition(s) is (are) necessary to ensure that
the odd periodic extension is everywhere continuous?

12.4 The Complex Form of a Fourier Series


If the piecewise continuous function f is periodic with period 2L, then its Fourier
series is
1
a0 X h  n x   n  x i
f .x /  C an cos C bn sin ; (4.1)
2 n D1
L L
where the coefficients are given by
Z L  n x 
an D 1
L
f .x / cos
L
d x ; for n  0; and
L
Z  (4.2)
L
n x 
bn D 1
L
f .x / sin
L
d x ; for n  1:
L

Sometimes it is useful to express the Fourier series in complex form using the complex
exponentials, einx for n D 0; 1; 2; : : : . This is possible because of the close
connection between the complex exponentials and the trigonometric functions. We
explored this connection in the appendix to this book and in Section 4.3. The most
important facts to know about the complex exponential are Euler’s formula
eiy D cos y C i sin y ; (4.3)
which defines the exponential, and that all of the familiar properties of the real
exponential remain true for the complex exponential.
If we write down Euler’s formula with y replaced by y, we get
e iy
D cos y i sin y : (4.4)
Solving (4.3) and (4.4) for cos y and sin y, we see that

D e C2 e
iy iy iy iy
cos y and sin y De 2i
e
: (4.5)

Let’s substitute these expressions into the Fourier series (4.1). The nth term in the
sum is the component of f at the frequency !n D n = L, and it becomes

n x  
n x 
f n .x / D an cos C bn sin
L L
 
D2 e
an in x = L
Ce in  x = L
C b2in ein x =L e in  x = L
(4.6)
D an 2 i bn ein x =L C an C2 i bn e in x =L
D n ein x =L C n e in x =L ;
12.4 The Complex Form of a Fourier Series 741

where we have substituted

n D an 2
i bn
and n D an C2 i bn ; for n  1. (4.7)

We will also write the constant term as f 0 .x / D 0 D a0 =2: Separating the positive
and negative terms, the Fourier series can be written as
1
X
f .x /  n ein x = L : (4.8)
nD 1
Notice that by (4.6), the component of f at frequency !n D n = L is given by
f n .x / D n ei !n x C n e i !n x : As a result, when we talk in terms of low frequency
components we have to consider the coefficients n and n for small values of n.
We can use (4.2) to express the coefficients n in terms of the function f . For
example, for n  1 we have

n D an 2
i bn
Z L h  n x   n  x i
D 1
2L
f .x / cos
L
i sin
L
dx
L
Z L
D 1
2L
f .x /e in  x = L
dx:
L

The corresponding formulas for n D 0 and for n < 0 can be computed in the same
way, and we discover that
Z L
n D 1
2L
f .x /e in  x = L
dx; for all n. (4.9)
L

It is important to notice that while n is the coefficient of ein x = L in the Fourier


series (4.8), it is e in x = L which appears in the integral in (4.9).
The series (4.8), with the coefficients computed using (4.9), is called the com-
plex Fourier series for the function f . There are several differences between the
Fourier series involving cosines and sines, given in Definition 1.20, and the Fourier
series using complex exponentials presented here. First, the complex Fourier series
involves a sum from n D 1 to n D 1, rather than a sum from n D 0 to n D 1.
Next, for the complex Fourier series, there is one succinct formula (4.9) for the
Fourier coefficients, rather than the two separate formulas for an and bn in (1.18)
and (1.19). For this reason, and also because computations using exponentials are
easier than those using trigonometric functions, many scientists and engineers prefer
to use the complex version of the Fourier series.

EXAMPLE 4.10 ◆ Find the complex Fourier series for the function f .x / D e x on the interval T 1; 1U:
This is the function we examined in Examples 3.4, 3.8, and 3.10. For this
function it is much easier to compute the complex Fourier coefficients than the real
742 Chapter 12 Fourier Series

ones. The nth coefficient is


Z 1
|αn | n D 1
2
ex e in  x
dx
1
Z 1
1
D 1
2
e.1 in / x
dx
1
 1 in  
D 2.1 1
i n /
e e 1Cin
. 1/n
n
D 2.1 i n /
.e 1=e/:
−10 0 10

Figure 1 The coefficients of the The last identity follows since ein D e in D . 1/n :
complex Fourier series for f (x) = The magnitude of the coefficients is plotted in Figure 1. Notice that we included
e x. negative indices. The complex Fourier series is
1
1=e X . 1/n in x
ex e 2 1 i n
e for 1x  1: ◆
nD 1

Relation between the real and complex Fourier series


We derived the complex Fourier series from the real series. In doing so we found that
the complex coefficients can be computed from the real coefficients using (4.7). In
turn, we can solve these relationships for the real coefficients in terms of the complex
coefficients, getting

a0 D 2 0 ; an D n C n ; and bn D i . n n /; for n  1: (4.11)

These equations simplify somewhat if the function f is real valued. In that case
f .x / D f .x /; so
Z L Z L
n D 2L1 f .x /e in  x = L dx D 2L1 f .x /  e in  x = L dx
L L
Z L
D 2L1 f .x /ein x = L d x D n :
L

Consequently, if f is real valued,

an D n C n D 2 Re n and bn D i . n n / D 2 Im n :

EXAMPLE 4.12 ◆ Compute the coefficients of the real Fourier series for the function f .x / D e x on the
interval T 1; 1U:
We computed the complex coefficients in Example 4.10 and found that

n D 2.1. 1/n
i n /
.e 1=e/:
12.5 The Discrete Fourier Transform and the FFT 743

Since the function is real valued, we can use (4.11) to find that

an D 2 Re n D . 1/n .e 1=e/
1 C n2 2
and

. 1/nC1n .e 1=e/


bn D 2 Im n D 1 C n2 2
: ◆

................
EXERCISES
1. Show that the complex Fourier coefficients for an even, real-valued function are
real. Show that the complex Fourier coefficients for an odd, real-valued function
are purely imaginary (i.e., their real parts are zero).

In Exercises 2–11 find the complex Fourier series for the given function on the
interval T ;  U.
2. f .x / D x
3. f .x / D jx j
(
1;   x < 0;
4. f .x / D
1; 0x 
(
0;   x < 0;
5. f .x / D
1; 0  x  

6. f .x / D x 2
7. f .x / D ebx
8. f .x / D x 3
9. f .x / D  x
10. f .x / D j cos x j
11. f .x / D j sin x j
12. Two complex valued function f and g are said to be orthogonal on the inter-
Rb
val Ta ; bU if a f .x /g .x / d x D 0: Show that The functions ei px and eiq x are
orthogonal on T ;  U if p and q are different integers.
13. Use the P
method of proof of Theorem 1.17, and Exercise 12 to show that if
f .x / D n1D 1 n einx for   x   , then

Z 
n D 21 f .x /e inx
dx:

744 Chapter 12 Fourier Series

12.5 The Discrete Fourier Transform and the FFT


Suppose that f .t / is piecewise continuous for 0  t  2 .9 Then
1
X
Z 2
f .t /  k eikt ; where k D 21 f .t /e ikt
dt : (5.1)
kD 1 0

The Fourier coefficients k are often too difficult to compute exactly. In such a case
it is useful to approximate the coefficients using a numerical integration technique
such as the trapezoid rule.
We remind you that for a function F defined on the interval T0; 2 U, the trapezoid
R 2
rule for approximating the integral 0 F .t / dt with step size h D 2= N is
Z 2  
F .t / dt  h F .0/ C F .h / C F .2h / C    C F .. N 1 /h / C
1 1
F .N h/ :
0 2 2
If F .t / is 2 -periodic, then F .0/ D F .2/ D F . N h /, and the preceding formula
becomes
Z 2
2 X
N 1
X N 1
F .t / dt h F . j h/ D
N j D0
F .2 j = N /:
0 j D0

Applying this formula to the integral for the Fourier coefficient in (5.1), we get
Z 2 N 1
X
k D 21 f .t /e ikt
dt  N1 f .2 j = N /e 2 i j k= N : (5.2)
0 j D0

Let’s set
yj D f .2 j = N / and w D e 2 i = N :
Then w De 2 i = N
, and the approximation becomes
N 1
1 X
k  N j D0
y jw jk: (5.3)

The sum on the right side of equation (5.3) involves the discrete values y j D
f .2 j = N /. The values of f .t / for t 6 D 2 j = N are ignored. It is a common
occurrence in the digital age to replace a time dependent function with such a discrete
sample of that function. For example, f .t / may represent a music signal that we want
to transmit over the internet. The internet, or any other computer network, allows
only discrete signals, so to transmit the music we replace the continuous signal f .t /
with the discrete sample y j D f .2 j = N / for j D 0; 1; 2; : : :; N 1:
In many digital applications signals arise that are not represented by a continuous
function at all. Instead, they arise as discrete values y j at a discrete set of times t j .
Such a signal is illustrated in Figure 1. Here, the horizontal axis represents time,
which has been divided into many small time intervals.
9
In most applications of the material in this section, the function f represents a time dependent signal.
Consequently, we will use t instead of x as the independent variable.
12.5 The Discrete Fourier Transform and the FFT 745

The discrete Fourier transform


Even for discrete signals such as that illustrated in Figure 1, it is often useful to
consider the transform we found in equation (5.3). We will assume that the signal
is an infinite sequence y D f y j j 1 < j < 1g that is periodic with period N ,
meaning that y N C j D y j for all j . Wherever the sequence yk comes from, the
t

transform on the right-hand side of (5.3) is important.

DEFINITION 5.4 Let y D f y j g be a sequence of complex numbers that is


Figure 1 A discrete signal. periodic with period N . The discrete Fourier transform of y is the sequence
y D fb
b yk g, where
N 1
X N
X1
b
yk D y j e 2 ikj = N D y j w jk; for 1 < k < 1: (5.5)
j D0 j D0

For the last expression in (5.5) we use the notation w D e2 i =N , so that w D
e 2 i = N .

An important property of w D e2 i = N is that w N D e2 i D 1: Of course, it


follows that w N D 1. From this we see that
N
X1 N
X1 N
X1
yk C N
b D yjw j .k C N /
D yjw wjk jN
D y jw jk D byk :
j D0 j D0 j D0

Thus the discrete Fourier transform is also periodic of period N .


Let’s look back at equation (5.3), where we used the trapezoid rule to approx-
imate k , the kth Fourier coefficient of the function f . Using (5.5), we can now
write (5.3) as
k  k :
by
(5.6)
N
It follows from the Riemann–Lebesgue lemma that k ! 0 as k ! 1. On
the other hand, the sequence b yk is periodic. This implies that (5.3) is not a good
approximation for large k. In fact, The trapezoid rule algorithm used to approximate
the integral in (5.2) loses accuracy as the integrand f .t /eikt becomes more oscillatory
as the frequency (and index) k increases. Therefore we would expect equation (5.3)
to provide a good approximation only for k that are relatively small compared to N .
There is another, related factor to consider. We have previously talked of the
importance of the low frequency components of a function. When we use the complex
Fourier series, this means that we include both k and k for small values of k.
By (5.6) and the periodicity of the sequence b y,

k  byNk D by NN k :
Therefore, when considering small frequency components while using the discrete
Fourier transform, we must include both b
yk and b
y N k for small nonnegative values
of the index k.
746 Chapter 12 Fourier Series

EXAMPLE 5.7 ◆ Use the discrete Fourier transform to compute approximately the first 64 Fourier
coefficients of the function

f .t / D e t 2 =10
[sin 2t C 2 cos 4t C 0:4 sin t sin 10t]
on the interval T0; 2 U.
f(t) The function f is plotted in Figure 2. Because of the terms involving sin 2t and
cos 4t, we would expect that the Fourier coefficients of order 2 and 4 would be large.
With N D 64; we set y j D f .2 j = N / for 0  j  N 1. Then we use the fast
2

Fourier transform function in Matlab to compute the discrete Fourier transform b y.


The magnitude of the byk is plotted in Figure 3. Indeed, the coefficients corresponding
0
0 π 2π
t to k D 4 and k D 60 D N 4 are the largest. Notice how the coefficients with index
k and N k are largest for small k. Thus the coefficients corresponding to small
frequency components dominate. ◆
−2

Figure 2 The function in Now let’s look at (5.5) and restrict ourselves to k D 0; 1; : : : ; N 1. The kth
Example 5.7. yk as a linear combination of f y j j 0  j  N 1g: These N
equation expresses b
equations can be expressed as the single matrix equation

0 1 0 10 1
b
y0 1 1 1  1 y0
B
B b
y1 C
C
B
B1 w w2  wN 1 C CB
B
y1 C
C
B
B b
B
y2
C
C
B
CDB1
B
w2 w4  C
w 2. N 1/ C
CB
B
B y2
C
C:
C (5.8)
B :: C B :: :: :: ::: :: C B :: C
 : A  : : : : A : A
b
yN 1 1 wN 1
w 2. N 1/
 w . N 1/2
yN 1

|yˆk|
It will be useful to use vector notation. We will set

y D . y0 ; y1 ; : : : ; y N
/T ;
20
1 and
y D .b
b y0 ; b
y1 ; : : : ; b
y N 1 /T :

With this notation, equation (5.8) becomes


0 k
0 32 63

Figure 3 The discrete Fourier b


y D Fy; (5.9)
transform of the discretization of
the function in Example 5.7. where
0 1
1 1 1  1
B
B1 w w2  wN 1 C C
B C
F DB
B
1 w2 w4 : : : w 2. N 1/ C : (5.10)
B :: :: :: ::: :: C C
 : : : : A
1 wN 1
w 2. N 1/
 w . N 1/2
12.5 The Discrete Fourier Transform and the FFT 747

The inverse discrete Fourier transform


Equation (5.8) gives the formula for computing the discrete Fourier coefficients in
terms of the original discrete signal. Many applications require the reverse oper-
ation, the computation of the original discrete signal, yk , from its discrete Fourier
coefficients, b
yk . Therefore, we would like to solve for the yk in equation (5.8) or,
equivalently, we need to find the inverse of the matrix F in (5.10).
Computing the inverse of F is somewhat difficult, so we will simply give the
result. Consider the complex conjugate of F
0 1
1 1 1  1
B
B1 w w2  wN 1 C C
B
F DB
B
1 w2 w4  C
w 2. N 1/ C :
B :: :: :: ::: :: C C
 : : : : A
1 wN 1
w 2. N 1/
 w . N 1/2

Direct computation shows that

FF D NI or F 1
D N1 F :
The computation of F  F is not too difficult. For example, when N D 3,
0 10 1
1 1 1 1 1 1
FF D 1 w w 2 A
1 w w2 A :
1 w2 w 4
1 w2 w4
An explicit computation shows that this matrix product is 3I . For example, the
.2; 1/-entry of this matrix product is
w3
1 C w C w2 D 11 D 0;
w
since w 3 D 1: On the other hand, the .2; 2/-entry is
1 C jw j2 C jw j4 D 3:
We summarize this discussion in the next theorem.

THEOREM 5.11 The original signal y j , j D 0; : : : ; N 1, can be computed from its discrete Fourier
yk , k D 0; : : : ; N 1, using
transform, b
N 1
X
yj D N1 yk w
b
jk
; for 1 < j < 1:
k D0

We can write this in matrix form as

yD
1
y:
Fb (5.12)
N
748 Chapter 12 Fourier Series

Noise filtering
Practical applications of this theorem are numerous. We will mention two. The
first involves filtering noise from a signal. When a signal is transmitted, it is often
corrupted by interference from background radiation or other sources. The corrupted
part of the signal is called noise. In many applications, the noise appears with a certain
frequency range that is different from the dominant frequencies of the original signal.
To filter out noise, a discrete Fourier transform of the signal is computed using (5.8).
Then, the Fourier coefficients, b yk , corresponding to the noisy, undesirable frequencies
are set equal to zero. The signal is then recomputed from the new Fourier coefficients
using equation (5.12). Since the frequency components corresponding to the noise
have been removed, the resulting signal should contain much less noise than the
original.
Frequently, noise occurs at relatively high frequencies. Suppose that we add the
noise term N .t / D 2 sin.50t / to the function in Example 5.7. The resulting signal
is g .t / D f .t / C N .t /; and it is plotted in Figure 4. It is difficult to see that the
signal of interest is the function f .t / plotted in Figure 2. We set y j D g .2 j = N / for
0  j  N 1, with N D 256, and take the discrete Fourier transform. The result
is plotted in Figure 5. Notice the large terms at k D 50 and k D 206 D N 50: To
eliminate the high frequency noise, we “zero out” the high frequency coefficients by
setting b yk D 0 for 13  k  N 13 D 243; and compute the inverse transform. The
resulting function is plotted in blue in Figure 6, while the original function f is plotted
in black. The graphical comparison shows that we have effectively recovered the
wanted signal from the noisy one. The most significant difference occurs at the two
endpoints. This is a result of Gibb’s phenomenon. Since f p , the periodic extension
of f , is not continuous, we have to expect this.

|yˆk|
g(t)
2 2

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

k
−2 0 128 255 −2

Figure 4 A signal in the Figure 5 The discrete Fourier Figure 6 The result of filtering
presence of high frequency transform of the noisy signal. out the high frequencies.
noise.

Data compression
A second application involves data compression. The goal is to store or transmit
a signal using the fewest possible bits of data. One way to accomplish this is to
store or transmit only the dominant Fourier coefficients of a given signal. In view
of the Riemann–Lebesgue Lemma, Theorem 2.10, only a finite number of Fourier
coefficients are dominant, since these coefficients get very small as the frequency
12.5 The Discrete Fourier Transform and the FFT 749

gets large. Thus, a compression routine can be implemented in a three-step process.


f(t) First, we compute the discrete Fourier coefficients using equation (5.8). Then we set
2 all of the small Fourier coefficients equal to zero, storing only the dominant Fourier
coefficients. Finally, to recover the compressed signal, use equation (5.12). What
constitutes “small” depends on the application and the tolerance for error. There is
0 t a trade-off between the number of Fourier coefficients that are set equal to zero and
0 π 2π the accuracy of the compressed signal. The larger the amount of compression, the
more coefficients that are set equal to zero, and the greater the difference between
−2
the compressed signal and the original signal.
As an example, we set all coefficients for the function in Example 5.7 equal to
Figure 7 The result of removing 0 that were smaller than 1=10 of the largest coefficient. This resulted in 21 nonzero
small coefficients. coefficients. Again we computed the inverse transform, and plotted the result in blue
in Figure 7. The function f .t / is plotted in black. The comparison shows that there
is loss, but not a great deal.

The fast Fourier transform


Calculating the discrete Fourier transform using equation (5.5) or (5.8) involves lots
of computations. Computing each b yk using (5.5) requires the sum of N products of
two numbers. We will call the combination of a multiplication and an addition a
multiply-add, and we will refer to it as an MA. Thus computing each b yk requires N
MAs. Computing the complete discrete Fourier transform means computing b yk for
0  k  N 1: This requires N 2 MAs.
The computation can be speeded up using the multiplicative nature of N . Sup-
pose that N D pq, where the factors p and q are both bigger than 1. The index in the
sum in (5.5) can be written as j D p C , where 0   q 1 and 0   p 1:
In terms of and , the sum in (5.5) becomes the double sum
p 1q 1 p 1 q 1
!
X X X X
b
yk D y pC w . p C /k
D y pC w pk
w k : (5.13)
D0 D0 D0 D0

We will isolate the inner sum by setting


q 1
X
b
y ;k D y pC w pk : (5.14)
D0

Then (5.13) becomes


p 1
X
b
yk D y ;k w
b
k
; for 0  k N 1: (5.15)
D0

The idea is to compute b y ;k first using (5.14), and then compute the Fourier
transform using (5.15). The savings in the computation comes from realizing that
y ;k is periodic in k with period q. To see this, we first remember that w N D 1 and
b
N D pq. Then we have
q 1 q 1
X X
y ;kCq
b D y pC w p .kCq /
D y pC w pk D by ;k :
D0 D0
750 Chapter 12 Fourier Series

Thus we only need to compute b y ;k for 0   p 1 and 0  k  q 1. Since


computing each b y ;k requires q MAs, computing all of them requires pq  q D pq 2 D
N q MAs. Now computing the N components of the Fourier transform using (5.15)
requires N p additional MAs, for a total of N . p C q /. If N , p, and q are all large
numbers, the sum p C q is much smaller than the product N D pq.
The process outlined in the previous paragraph can be iterated if N has more
factors. If N D p1  p2  : : :  pn , the number of MAs required is reduced to
N . p1 C p2 C  C pn /. This algorithm for computing the discrete Fourier transform
is called the fast Fourier transform (FFT). Clearly the FFT works best if N has a
large number of very small factors, the best being when N is a power of 2. This
is the most commonly used case. When N D 2 L the FFT can compute the Fourier
coefficients with only about N  2L D 2N log2 N MAs. For example, if N D 210 D
1024, the FFT requires only about 20,000 MAs versus the one million or so that
are required using (5.8). The savings get more impressive as N gets larger. A
similar FFT routine exists for computing the inverse discrete Fourier transform. The
mathematical computer programs Matlab, Mathematica, and Maple all have built-in
commands for the FFT and inverse FFT.

................
EXERCISES
All of these exercises are designed to be done with a mathematical computer program
such as Matlab, Maple, or Mathematica.
1. Consider the function
f .t / D e t 2 =10
.cos 2t C 2 sin 4t C 0:4 cos 2t cos 40t / :
For what values of n would you expect the Fourier coefficients to be largest?
Why? Compute the coefficients numerically through n D 50 and see if you are
right. (You can use a fast Fourier transform algorithm with N D 256 to do this if
you wish.) Plot the partial sum of the Fourier series of order n D 6 and compare
with the plot of the original f .x /.
2. Consider the function
g .t / D e t 2 =8
[cos 2t C 2 sin 4t C 0:4 cos 2t cos 10t] ;
for 0  t  2: Compute numerically the partial sum of the Fourier series of
order N D 25. Zero out any coefficients that have absolute value smaller than
10% of the maximum. Plot the resulting series and compare with the original
function g .t /. Try experimenting with different tolerances (other than 10%).
3. Show that if y D f ym g is a sequence of real numbers that is periodic with period
N and by is the discrete Fourier transform of y, then the complex conjugate of b ym
is b
y N m . (As a result, when m is small relative to N , b
y N m has to be considered
a low frequency coefficient, since it is equal to the conjugate of b ym , which is
approximately equal to the conjugate of the mth Fourier coefficient.)

The next three problems require the use of the fast Fourier transform on a computer
(e.g., Maple or Matlab’s FFT routine).
12.5 The Discrete Fourier Transform and the FFT 751

4. Filtering Let

f .t / D e t 2 =10
.sin.2t / C 2 cos.4t / C 0:4 sin.t / sin.50t // :
Discretize f by setting yk D f .2k =256/; for k D 0 : : : 255. Use the fast
Fourier transform to compute b yk for 0  k  255. According to Exercise 3, the
low-frequency coefficients are b y0 : : : b y256 m : : : b
ym and b y255 for some low value
of m. Filter out the high-frequency terms by setting b yk D 0 for m  k  255 m
with m D 6. Apply the inverse fast Fourier transform to this new set of b yk to
compute the yk (now filtered); plot the new values of yk and compare with the
original function. Experiment with other values of m.
5. Compression Let tol D 0:01. In Exercise 4, if jb yk j < tol  M, where M D
max0k255 jbyk j, set b
yk equal to zero. Apply the inverse fast Fourier transform
to this new set of byk to compute the yk . Plot the new values of yk and compare
with the original function. Experiment with other values of tol. Keep track of
the percentage of Fourier coefficients that have been filtered out. Matlab’s sort
command is useful for finding a value for tol in order to filter out a specified
percentage of coefficients.
6. Repeat the previous two exercises over the interval 0  t  1 with the function
f .t / D 52t 4 C 100t 3 49t 2 C 2 C N .100.t 1=3//
C N .200.t 2=3//
where N .t / D te t2
:

You might also like