0% found this document useful (0 votes)
5 views36 pages

Fourier Trigonometric Series

The document discusses Fourier trigonometric series, which are used to represent functions in terms of sine and cosine functions. It explains the foundational concepts of Fourier analysis, including the heat and wave equations, and how these relate to the representation of periodic functions. The goal is to determine the frequency content of a signal by finding combinations of sines and cosines that sum to the given function.

Uploaded by

shrikris
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)
5 views36 pages

Fourier Trigonometric Series

The document discusses Fourier trigonometric series, which are used to represent functions in terms of sine and cosine functions. It explains the foundational concepts of Fourier analysis, including the heat and wave equations, and how these relate to the representation of periodic functions. The goal is to determine the frequency content of a signal by finding combinations of sines and cosines that sum to the given function.

Uploaded by

shrikris
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/ 36

2

Fourier Trigonometric Series

"Profound study of nature is the most fertile source of mathematical discoveries."


As noted in the Introduction, Joseph
Joseph Fourier (1768-1830) Fourier (1768-1830) and others studied
trigonometric series solutions of the heat
and wave equations.
2.1 Introduction to Fourier Series The temperature, u( x, t), of a one dimen-
sional rod of length L satisfies the heat
equation,
∂u ∂2 u
= k 2.
We will now turn to the study of trigonometric series. You have seen ∂t ∂x
that functions have series representations as expansions in powers of x, or The general solution, which satisfies the
conditions u(0, t) = 0 and u( L, t) = 0, is
x − a, in the form of Maclaurin and Taylor series. Recall that the Taylor given by
series expansion is given by ∞
nπx −n2 π2 kt/L2
u( x, t) = ∑ bn sin L
e .
∞ n =0
f (x) = ∑ cn ( x − a)n , If the initial temperature is given by
n =0 u( x, 0) = f ( x ), one has to satisfy the con-
dition
where the expansion coefficients are determined as ∞
nπx
f (x) = ∑ bn sin L
.
f (n) ( a ) n =0
cn = .
n! The height, u( x, t), of a one dimensional
vibrating string of length L satisfies the
From the study of the heat equation and wave equation, Fourier showed wave equation,
that there are infinite series expansions over other functions, such as sine ∂2 u ∂2 u
= c2 2 .
functions. We now turn to such expansions and in the next chapter we will ∂t 2 ∂x
find out that expansions over special sets of functions are not uncommon in The general solution, which satisfies the
fixed ends u(0, t) = 0 and u( L, t) = 0, is
physics. But, first we turn to Fourier trigonometric series.
given by
We will begin with the study of the Fourier trigonometric series expan- ∞
nπct nπx
sion

u( x, t) = ∑ An cos L
sin
L
a0 nπx nπx n =1
f (x) = + ∑ an cos + bn sin . nπct nπx
2 n =1
L L + Bn sin
L
sin
L
.

We will find expressions useful for determining the Fourier coefficients If the initial profile and velocity are
given by u( x, 0) = f ( x ) and ut ( x, 0) =
{ an , bn } given a function f ( x ) defined on [− L, L]. We will also see if the g( x ), respectively, then one has to satisfy
resulting infinite series reproduces f ( x ). However, we first begin with some the conditions

basic ideas involving simple sums of sinusoidal functions. nπx
f ( x ) = u( x, 0) = ∑ An sin L
There is a natural appearance of such sums over sinusoidal functions in n =1

music. A pure note can be represented as and



nπc nπx
y(t) = A sin(2π f t),
g( x ) = ut ( x, 0) = ∑ L
Bn sin
L
.
n =1
38 fourier and complex analysis

y(t)
where A is the amplitude, f is the frequency in Hertz (Hz), and t is time in
2
seconds. The amplitude is related to the volume of the sound. The larger
0 the amplitude, the louder the sound. In Figure 2.1 we show plots of two
such tones with f = 2 Hz in the top plot and f = 5 Hz in the bottom one.
−2
In these plots you should notice the difference due to the amplitudes and
the frequencies. You can easily reproduce these plots and others in your
0 1 2 3
favorite plotting utility.
t
As an aside, you should be cautious when plotting functions, or sampling
(a) y(t) = 2 sin(4π f t)
data. The plots you get might not be what you expect, even for a simple sine
y(t) function. In Figure 2.2 we show four plots of the function y(t) = 2 sin(4πt).
In the top left, you see a proper rendering of this function. However, if you
2 use a different number of points to plot this function, the results may be sur-
0
prising. In this example we show what happens if you use N = 200, 100, 101
points instead of the 201 points used in the first plot. Such disparities are
−2 not only possible when plotting functions, but are also present when collect-
ing data. Typically, when you sample a set of data, you only gather a finite
0 1 2 3 amount of information at a fixed rate. This could happen when getting data
t
on ocean wave heights, digitizing music, and other audio to put on your
(b) y(t) = sin(10π f t)
computer, or any other process when you attempt to analyze a continuous
Figure 2.1: Plots of y(t) = A sin(2π f t)
on [0, 5] for f = 2 Hz and f = 5 Hz.
signal.

Figure 2.2: Problems can occur while y(t)=2 sin(4 π t) for N=201 points y(t)=2 sin(4 π t) for N=200 points
plotting. Here we plot the func- 4 4
tion y(t) = 2 sin 4πt using N =
201, 200, 100, 101 points. 2 2
y(t)

y(t)

0 0

−2 −2

−4 −4
0 1 2 3 4 5 0 1 2 3 4 5
Time Time
y(t)=2 sin(4 π t) for N=100 points y(t)=2 sin(4 π t) for N=101 points
4 4

2 2
y(t)

y(t)

0 0

−2 −2

−4 −4
0 1 2 3 4 5 0 1 2 3 4 5
Time Time

Next, we consider what happens when we add several pure tones. After
all, most of the sounds that we hear are, in fact, a combination of pure tones
with different amplitudes and frequencies. In Figure 2.3 we see what hap-
pens when we add several sinusoids. Note that as one adds more and more
tones with different characteristics, the resulting signal gets more compli-
cated. However, we still have a function of time. In this chapter we will ask,
fourier trigonometric series 39

“Given a function f (t), can we find a set of sinusoidal functions whose sum y(t)
converges to f (t)?” 2
Looking at the superpositions in Figure 2.3, we see that the sums yield
0
functions that appear to be periodic. This is not unexpected. We recall that a
periodic function is one in which the function values repeat over the domain −2
of the function. The length of the smallest part of the domain which repeats
is called the period. We can define this more precisely: A function is said to 0 1 2 3
be periodic with period T if f (t + T ) = f (t) for all t and the smallest such t
positive number T is called the period. (a) Sum of signals with frequencies
For example, we consider the functions used in Figure 2.3. We began with f = 2 Hz and f = 5 Hz.
y(t) = 2 sin(4πt). Recall from your first studies of trigonometric functions
y(t)
that one can determine the period by dividing the coefficient of t into 2π to
get the period. In this case we have
2
2π 1
T= = . 0
4π 2
Looking at the top plot in Figure 2.1 we can verify this result. (You can −2
count the full number of cycles in the graph and divide this into the total
time to get a more accurate value of the period.) 0 1 2 3
In general, if y(t) = A sin(2π f t), the period is found as t
(b) Sum of signals with frequencies
2π 1
T= = . f = 2 Hz, f = 5 Hz, and f = 8 Hz.
2π f f
Of course, this result makes sense, as the unit of frequency, the hertz, is also Figure 2.3: Superposition of several si-
nusoids.
defined as s−1 , or cycles per second.
Returning to Figure 2.3, the functions y(t) = 2 sin(4πt), y(t) = sin(10πt),
and y(t) = 0.5 sin(16πt) have periods of 0.5s, 0.2s, and 0.125s, respectively. y(t)
2
Each superposition in Figure 2.3 retains a period that is the least common
multiple of the periods of the signals added. For both plots, this is 1.0 s 0
= 2(0.5) s = 5(.2) s = 8(.125) s.
−2
Our goal will be to start with a function and then determine the ampli-
tudes of the simple sinusoids needed to sum to that function. We will see
0 1 2 3
that this might involve an infinite number of such terms. Thus, we will be
t
studying an infinite series of sinusoidal functions.
(a) Plot of each function.
Secondly, we will find that using just sine functions will not be enough
either. This is because we can add sinusoidal functions that do not neces- y(t)
sarily peak at the same time. We will consider two signals that originate
at different times. This is similar to when your music teacher would make 2
sections of the class sing a song like “Row, Row, Row Your Boat” starting at
slightly different times. 0

We can easily add shifted sine functions. In Figure 2.4 we show the −2
functions y(t) = 2 sin(4πt) and y(t) = 2 sin(4πt + 7π/8) and their sum.
Note that this shifted sine function can be written as y(t) = 2 sin(4π (t + 0 1 2 3
7/32)). Thus, this corresponds to a time shift of −7/32. t
So, we should account for shifted sine functions in the general sum. Of (b) Plot of the sum of the functions.
course, we would then need to determine the unknown time shift as well
Figure 2.4: Plot of the functions y(t) =
as the amplitudes of the sinusoidal functions that make up the signal, f (t).
2 sin(4πt) and y(t) = 2 sin(4πt + 7π/8)
and their sum.
40 fourier and complex analysis

While this is one approach that some researchers use to analyze signals,
there is a more common approach. This results from another reworking of
We should note that the form in the the shifted function.
lower plot of Figure 2.4 looks like a sim- Consider the general shifted function
ple sinusoidal function for a reason. Let

y1 (t) = 2 sin(4πt), y(t) = A sin(2π f t + φ). (2.1)


y2 (t) = 2 sin(4πt + 7π/8).
Then, Note that 2π f t + φ is called the phase of the sine function and φ is called
the phase shift. We can use the trigonometric identity (2.9) for the sine of
y1 + y2 = 2 sin(4πt + 7π/8) + 2 sin(4πt)
= 2[sin(4πt + 7π/8) + sin(4πt)]
the sum of two angles1 to obtain
 
7π 7π
= 4 cos sin 4πt + . y(t) = A sin(2π f t + φ)
16 16
1
Recall the identities (2.9) and (2.10)
= A sin(φ) cos(2π f t) + A cos(φ) sin(2π f t). (2.2)

sin( x + y) = sin x cos y + sin y cos x, Defining a = A sin(φ) and b = A cos(φ), we can rewrite this as
cos( x + y) = cos x cos y − sin x sin y.
y(t) = a cos(2π f t) + b sin(2π f t).

Thus, we see that the signal in Equation (2.1) is a sum of sine and cosine
functions with the same frequency and different amplitudes. If we can find
a and b, then we can easily determine A and φ:
p b
A= a2 + b2 , tan φ = .
a
We are now in a position to state our goal:

Goal - Fourier Analysis

Given a signal f (t), we would like to determine its frequency content by


finding out what combinations of sines and cosines of varying frequencies
and amplitudes will sum to the given function. This is called Fourier
Analysis.

2.2 Fourier Trigonometric Series

As we have seen in the last section, we are interested in finding


representations of functions in terms of sines and cosines. Given a function
f ( x ) we seek a representation in the form

a0
f (x) ∼ + ∑ [ an cos nx + bn sin nx ] . (2.3)
2 n =1

Notice that we have opted to drop the references to the time-frequency form
of the phase. This will lead to a simpler discussion for now and one can
always make the transformation nx = 2π f n t when applying these ideas to
applications.
The series representation in Equation (2.3) is called a Fourier trigonomet-
ric series. We will simply refer to this as a Fourier series for now. The set
fourier trigonometric series 41

of constants a0 , an , bn , n = 1, 2, . . . are called the Fourier coefficients. The y(t)


constant term is chosen in this form to make later computations simpler, 1.5
though some other authors choose to write the constant term as a0 . Our
goal is to find the Fourier series representation given f ( x ). Having found 1
the Fourier series representation, we will be interested in determining when
the Fourier series converges and to what function it converges. 0.5

From our discussion in the last section, we see that The Fourier series is
periodic. The periods of cos nx and sin nx are 2π n . Thus, the largest period, 0 10 20
T = 2π, comes from the n = 1 terms and the Fourier series has period 2π. t
This means that the series should be able to represent functions that are (a) Plot of function f (t).
periodic of period 2π.
While this appears restrictive, we could also consider functions that are y(t)
1.5
defined over one period. In Figure 2.5 we show a function defined on [0, 2π ].
In the same figure, we show its periodic extension. These are just copies of
1
the original function shifted by the period and glued together. The extension
can now be represented by a Fourier series and restricting the Fourier series
0.5
to [0, 2π ] will give a representation of the original function. Therefore, we
will first consider Fourier series representations of functions defined on this
interval. Note that we could just as easily considered functions defined on 0 10 20
[−π, π ] or any interval of length 2π. We will consider more general intervals t

later in the chapter. (b) Periodic extension of f (t).

Figure 2.5: Plot of the function f (t) de-


Fourier Coefficients fined on [0, 2π ] and its periodic exten-
sion.
Theorem 2.1. The Fourier series representation of f ( x ) defined on [0, 2π ], when
it exists, is given by Equation (2.3) with Fourier coefficients

1 2π
Z
an = f ( x ) cos nx dx, n = 0, 1, 2, . . . ,
π 0
1 2π
Z
bn = f ( x ) sin nx dx, n = 1, 2, . . . . (2.4)
π 0
These expressions for the Fourier coefficients are obtained by considering
special integrations of the Fourier series. We will now derive the an integrals
in Equation (2.4).
We begin with the computation of a0 . Integrating the Fourier series term
by term in Equation (2.3), we have
Z 2π Z 2π Z 2π ∞
a0
0
f ( x ) dx =
0 2
dx +
0
∑ [an cos nx + bn sin nx] dx. (2.5)
n =1

We will assume that we can integrate the infinite sum term by term. Then Evaluating the integral of an infinite se-
we will need to compute ries by integrating term by term depends
on the convergence properties of the se-
Z 2π
a0 a0 ries.
dx = (2π ) = πa0 ,
0 2 2
sin nx 2π
Z 2π  
cos nx dx = = 0,
0 n 0
− cos nx 2π
Z 2π  
sin nx dx = = 0. (2.6)
0 n 0
42 fourier and complex analysis

2
Note that a20 is the average of f ( x ) over From these results we see that only one term in the integrated sum does not
the interval [0, 2π ]. Recall from the first
semester of calculus, that the average of vanish, leaving
Z 2π
a function defined on [ a, b] is given by
f ( x ) dx = πa0 .
1
Z b 0
f ave = f ( x ) dx.
b−a a This confirms the value for a0 .2
For f ( x ) defined on [0, 2π ], we have Next, we will find the expression for an . We multiply the Fourier series in
1
Z 2π
a0 Equation (2.3) by cos mx for some positive integer m. This is like multiplying
f ave = f ( x ) dx = .
2π 0 2 by cos 2x, cos 5x, etc. We are multiplying by all possible cos mx functions
for different integers m all at the same time. We will see that this will allow
us to solve for the an ’s.
We find the integrated sum of the series times cos mx is given by
Z 2π Z 2π
a0
f ( x ) cos mx dx = cos mx dx
0 0 2
Z 2π ∞
+
0
∑ [an cos nx + bn sin nx] cos mx dx.
n =1
(2.7)

Integrating term by term, the right side becomes


Z 2π Z 2π
a0
f ( x ) cos mx dx =cos mx dx
0 2 0
∞  Z 2π Z 2π 
+ ∑ an
0
cos nx cos mx dx + bn sin nx cos mx dx .
0
n =1
(2.8)
R 2π
We have already established that 0 cos mx dx = 0, which implies that the
first term vanishes.
Next we need to compute integrals of products of sines and cosines. This
requires that we make use of some of the well known trigonometric. For
quick reference, we list these here.

Useful Trigonometric Identities

sin( x ± y) = sin x cos y ± sin y cos x (2.9)


cos( x ± y)
= cos x cos y ∓ sin x sin y (2.10)
1
sin2 x = (1 − cos 2x ) (2.11)
2
1
cos2 x = (1 + cos 2x ) (2.12)
2
1
sin x sin y = (cos( x − y) − cos( x + y)) (2.13)
2
1
cos x cos y = (cos( x + y) + cos( x − y)) (2.14)
2
1
sin x cos y = (sin( x + y) + sin( x − y)) (2.15)
2
R 2π
We first want to evaluate 0 cos nx cos mx dx. We do this using the prod-
uct identity (2.14). In case you forgot how to derive this identity, we will
fourier trigonometric series 43

quickly review the derivation. Using the identities (2.10), we have

cos( A + B) = cos A cos B − sin A sin B,


cos( A − B) = cos A cos B + sin A sin B.

Adding these equations,

2 cos A cos B = cos( A + B) + cos( A − B).

We can use this result with A = mx and B = nx to complete the integra-


tion. We have
Z 2π Z 2π
1
cos nx cos mx dx = [cos(m + n) x + cos(m − n) x ] dx
0 2 0
1 sin(m + n) x sin(m − n) x 2π
 
= +
2 m+n m−n 0
= 0. (2.16)

There is one caveat when doing such integrals. What if one of the de-
nominators m ± n vanishes? For this problem, m + n 6= 0, as both m and n
are positive integers. However, it is possible for m = n. This means that the
vanishing of the integral can only happen when m 6= n. So, what can we do
about the m = n case? One way is to start from scratch with our integration.
(Another way is to compute the limit as n approaches m in our result and
use L’Hopital’s Rule. Try it!)
R 2π
For n = m we have to compute 0 cos2 mx dx. This can also be handled
using a trigonometric identity. Using the half angle formula, Equation (2.12),
with θ = mx, we find
Z 2π Z 2π
1
cos2 mx dx = (1 + cos 2mx ) dx
0 2 0
 2π
1 1
= x+ sin 2mx
2 2m 0
1
= (2π ) = π. (2.17)
2
To summarize, we have shown that

Z 2π
(
0, m 6= n,
cos nx cos mx dx = (2.18)
0 π, m = n.

This holds true for m, n = 0, 1, . . . . [Why did we include m, n = 0?] When


we have such a set of functions, they are said to be an orthogonal set over the
integration interval. A set of (real) functions {φn ( x )} is said to be orthogonal
Rb
on [ a, b] if a φn ( x )φm ( x ) dx = 0 when n 6= m. Furthermore, if we also have
Rb
that a φn2 ( x ) dx = 1, these functions are called orthonormal. Definition of an orthogonal set of func-
The set of functions {cos nx }∞ n=0 is orthogonal on [0, 2π ]. Actually, the set
tions and orthonormal functions.

is orthogonal on any interval of length 2π. We can make them orthonormal



by dividing each function by π, as indicated by Equation (2.17). This is
sometimes referred to as normalization of the set of functions.
44 fourier and complex analysis

The notion of orthogonality is actually a generalization of the orthogonal-


Rb
ity of vectors in finite dimensional vector spaces. The integral a f ( x ) f ( x ) dx
is the generalization of the dot product, and is called the scalar product of
f ( x ) and g( x ), which are thought of as vectors in an infinite dimensional
vector space spanned by a set of orthogonal functions. We will return to
these ideas in the next chapter.
Returning to the integrals in equation (2.8), we still have to evaluate
R 2π
0 sin nx cos mx dx. We can use the trigonometric identity involving prod-
Identity (2.15) is found from adding the ucts of sines and cosines, Equation (2.15). Setting A = nx and B = mx, we
identities find that
Z 2π
sin( A + B) = sin A cos B + sin B cos A, 1 2π
Z
sin( A − B) = sin A cos B − sin B cos A.
sin nx cos mx dx = [sin(n + m) x + sin(n − m) x ] dx
0 2 0
1 − cos(n + m) x − cos(n − m) x 2π
 
= +
2 n+m n−m 0
= (−1 + 1) + (−1 + 1) = 0. (2.19)
So,
Z 2π
sin nx cos mx dx = 0. (2.20)
0

For these integrals we should also be careful about setting n = m. In this


special case, we have the integrals
1 − cos 2mx 2π
Z 2π
1 2π
Z  
sin mx cos mx dx = sin 2mx dx = = 0.
0 2 0 2 2m 0
Finally, we can finish evaluating the expression in Equation (2.8). We
have determined that all but one integral vanishes. In that case, n = m. This
leaves us with Z 2π
f ( x ) cos mx dx = am π.
0
Solving for am gives
1 2π
Z
am = f ( x ) cos mx dx.
π 0
Since this is true for all m = 1, 2, . . . , we have proven this part of the theorem.
The only part left is finding the bn ’s This will be left as an exercise for the
reader.
We now consider examples of finding Fourier coefficients for given func-
tions. In all of these cases, we define f ( x ) on [0, 2π ].
Example 2.1. f ( x ) = 3 cos 2x, x ∈ [0, 2π ].
We first compute the integrals for the Fourier coefficients:
1 2π
Z
a0 = 3 cos 2x dx = 0,
π 0
1 2π
Z
an = 3 cos 2x cos nx dx = 0, n 6= 2,
π 0
Z 2π
1
a2 = 3 cos2 2x dx = 3,
π 0
1 2π
Z
bn = 3 cos 2x sin nx dx = 0, ∀n.
π 0
fourier trigonometric series 45

The integrals for a0 , an , n 6= 2, and bn are the result of orthogonality. For a2 , the
integral can be computed as follows:

1 2π
Z
a2 = 3 cos2 2x dx
π 0
Z 2π
3
= [1 + cos 4x ] dx
2π 0
 2π

3  1 
= x + sin 4x = 3. (2.21)
 
2π |4 {z }

 
This term vanishes! 0

Therefore, we have that the only nonvanishing coefficient is a2 = 3. So there is


one term and f ( x ) = 3 cos 2x.

Well, we should have known the answer to the last example before doing
all of those integrals. If we have a function expressed simply in terms of
sums of simple sines and cosines, then it should be easy to write the Fourier
coefficients without much work. This is seen by writing out the Fourier
series,

a0
f (x) ∼ + ∑ [ an cos nx + bn sin nx ] .
2 n =1
a0
= + a1 cos x + b1 sin x + + a2 cos 2x + b2 sin 2x + . . . . (2.22)
2
For the last problem, f ( x ) = 3 cos 2x. Comparing this to the expanded
Fourier series, one can immediately read off the Fourier coefficients without
doing any integration. In the next example, we emphasize this point.

Example 2.2. f ( x ) = sin2 x, x ∈ [0, 2π ].


We could determine the Fourier coefficients by integrating as in the last example.
However, it is easier to use trigonometric identities. We know that

1 1 1
sin2 x = (1 − cos 2x ) = − cos 2x.
2 2 2
There are no sine terms, so bn = 0, n = 1, 2, . . . . There is a constant term, implying 2
a0 /2 = 1/2. So, a0 = 1. There is a cos 2x term, corresponding to n = 2, so
a2 = − 12 . That leaves an = 0 for n 6= 0, 2. So, a0 = 1, a2 = − 21 , and all other 1
Fourier coefficients vanish.
0
(
1, 0 < x < π, π 2π
Example 2.3. f ( x ) = . x
−1, π < x < 2π,
−1
This example will take a little more work. We cannot bypass evaluating any
integrals this time. As seen in Figure 2.6, this function is discontinuous. So, we
−2
will break up any integration into two integrals, one over [0, π ] and the other over
Figure 2.6: Plot of discontinuous func-
[π, 2π ]. tion in Example 2.3.

Z 2π
1
a0 = f ( x ) dx
π 0
46 fourier and complex analysis

1 π 1 2π
Z Z
= dx + (−1) dx
π 0 π π
1 1
= (π ) + (−2π + π ) = 0. (2.23)
π π

1 2π
Z
an = f ( x ) cos nx dx
π 0
Z π Z 2π 
1
= cos nx dx − cos nx dx
π 0 π
" π  2π #
1 1 1
= sin nx − sin nx
π n 0 n π
= 0. (2.24)

1 2π
Z
bn = f ( x ) sin nx dx
π 0
Z π Z 2π 
1
= sin nx dx − sin nx dx
π 0 π
" π  2π #
1 1 1
= − cos nx + cos nx
π n 0 n π
 
1 1 1 1 1
= − cos nπ + + − cos nπ
π n n n n
2
= (1 − cos nπ ). (2.25)

Often we see expressions involving
cos nπ = (−1)n and 1 ± cos nπ = 1 ±
We have found the Fourier coefficients for this function. Before inserting them
(−1)n . This is an example showing how
to re-index series containing cos nπ. into the Fourier series (2.3), we note that cos nπ = (−1)n . Therefore,
(
0, n even,
1 − cos nπ = (2.26)
2, n odd.

So, half of the bn ’s are zero. While we could write the Fourier series representation
as
4 ∞ 1
π n∑
f (x) ∼ sin nx,
=1 n
n odd

we could let n = 2k − 1 in order to capture the odd numbers only. The answer can
be written as
4 ∞ sin(2k − 1) x
π k∑
f (x) = ,
=1
2k − 1

Having determined the Fourier representation of a given function, we


would like to know if the infinite series can be summed; i.e., does the series
converge? Does it converge to f ( x )? We will discuss this question later in
the chapter after we generalize the Fourier series to intervals other than for
x ∈ [0, 2π ].
fourier trigonometric series 47

2.3 Fourier Series over Other Intervals

In many applications we are interested in determining Fourier series


representations of functions defined on intervals other than [0, 2π ]. In this
section, we will determine the form of the series expansion and the Fourier
coefficients in these cases.
The most general type of interval is given as [ a, b]. However, this often
is too general. More common intervals are of the form [−π, π ], [0, L], or
[− L/2, L/2]. The simplest generalization is to the interval [0, L]. Such in-
tervals arise often in applications. For example, for the problem of a one-
dimensional string of length L, we set up the axes with the left end at x = 0
and the right end at x = L. Similarly for the temperature distribution along
a one dimensional rod of length L we set the interval to x ∈ [0, 2π ]. Such
problems naturally lead to the study of Fourier series on intervals of length
L. We will see later that symmetric intervals, [− a, a], are also useful.
Given an interval [0, L], we could apply a transformation to an interval
of length 2π by simply rescaling the interval. Then we could apply this
transformation to the Fourier series representation to obtain an equivalent t x
one useful for functions defined on [0, L]. 0 L 0 2π
We define x ∈ [0, 2π ] and t ∈ [0, L]. A linear transformation relating these Figure 2.7: A sketch of the transforma-
tion between intervals x ∈ [0, 2π ] and
intervals is simply x = 2πt L as shown in Figure 2.7. So, t = 0 maps to x = 0 t ∈ [0, L].
and t = L maps to x = 2π. Furthermore, this transformation maps f ( x ) to
a new function g(t) = f ( x (t)), which is defined on [0, L]. We will determine
the Fourier series representation of this function using the representation
for f ( x ) from the last section.
Recall the form of the Fourier representation for f ( x ) in Equation (2.3):

a0
f (x) ∼ + ∑ [ an cos nx + bn sin nx ] . (2.27)
2 n =1
Inserting the transformation relating x and t, we have
∞  
a0 2nπt 2nπt
g(t) ∼ + ∑ an cos + bn sin . (2.28)
2 n =1
L L
This gives the form of the series expansion for g(t) with t ∈ [0, L]. But, we
still need to determine the Fourier coefficients.
Recall that
1 2π
Z
an = f ( x ) cos nx dx.
π 0
We need to make a substitution in the integral of x = 2πt L . We also will need
to transform the differential, dx = 2πL dt. Thus, the resulting form for the
Fourier coefficients is
Z L
2 2nπt
an = g(t) cos dt. (2.29)
L 0 L
Similarly, we find that
Z L
2 2nπt
bn = g(t) sin dt. (2.30)
L 0 L
48 fourier and complex analysis

We note first that when L = 2π, we get back the series representation
that we first studied. Also, the period of cos 2nπt
L is L/n, which means that
the representation for g(t) has a period of L corresponding to n = 1.
At the end of this section, we present the derivation of the Fourier series
representation for a general interval for the interested reader. In Table 2.1
we summarize some commonly used Fourier series representations.

Table 2.1: Special Fourier Series Repre-


sentations on Different Intervals Fourier Series on [0, L]
∞  
a0 2nπx 2nπx
f (x) ∼ + ∑ an cos + bn sin . (2.31)
2 n =1
L L

2 L 2nπx
Z
an = f ( x ) cos dx. n = 0, 1, 2, . . . ,
L 0 L
Z L
2 2nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.32)
L 0 L

Fourier Series on [− L2 , L2 ]
∞  
a0 2nπx 2nπx
f (x) ∼ + ∑ an cos + bn sin . (2.33)
2 n =1
L L

L
2 2nπx
Z
2
an = f ( x ) cos dx. n = 0, 1, 2, . . . ,
L − L2 L
Z L
2 2 2nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.34)
L − L2 L

Fourier Series on [−π, π ]



a0
f (x) ∼ + ∑ [ an cos nx + bn sin nx ] . (2.35)
2 n =1

1 π
Z
an = f ( x ) cos nx dx. n = 0, 1, 2, . . . ,
π −π
1
Z π
bn = f ( x ) sin nx dx. n = 1, 2, . . . . (2.36)
π −π
Integration of even and odd functions
over symmetric intervals, [− a, a]. At this point we need to remind the reader about the integration of even
Even Functions. and odd functions on symmetric intervals.
We first recall that f ( x ) is an even function if f (− x ) = f ( x ) for all x.
One can recognize even functions as they are symmetric with respect to the
y-axis as shown in Figure 2.8.
If one integrates an even function over a symmetric interval, then one has
that Z a Z a
f ( x ) dx = 2 f ( x ) dx. (2.37)
−a 0
One can prove this by splitting off the integration over negative values of x,
fourier trigonometric series 49

using the substitution x = −y, and employing the evenness of f ( x ). Thus,

Z a Z 0 Z a
y( x )
f ( x ) dx = f ( x ) dx + f ( x ) dx
−a −a 0
Z 0 Z a
= − f (−y) dy + f ( x ) dx
a 0
Z a Z a
= f (y) dy + f ( x ) dx −a x a
0 0
Z a
= 2 f ( x ) dx. (2.38)
0 Figure 2.8: Area under an even function
on a symmetric interval, [− a, a].
This can be visually verified by looking at Figure 2.8.
A similar computation could be done for odd functions. f ( x ) is an odd
function if f (− x ) = − f ( x ) for all x. The graphs of such functions are sym- Odd Functions.
metric with respect to the origin, as shown in Figure 2.9. If one integrates
an odd function over a symmetric interval, then one has that
Z a
f ( x ) dx = 0. (2.39)
−a

Example 2.4. Let f ( x ) = | x | on [−π, π ] We compute the coefficients, beginning


as usual with a0 . We have, using the fact that | x | is an even function,
y( x )
1 π
Z
a0 = | x | dx −a
π −π a
x
2
Z π
= x dx = π (2.40)
π 0

We continue with the computation of the general Fourier coefficients for f ( x ) =


| x | on [−π, π ]. We have
Figure 2.9: Area under an odd function
on a symmetric interval, [− a, a].
1 π 2 π
Z Z
an = | x | cos nx dx = x cos nx dx. (2.41)
π −π π 0

Here we have made use of the fact that | x | cos nx is an even function.
In order to compute the resulting integral, we need to use integration by parts ,
Z b b Z b
u dv = uv − v du,
a a a

1
R
by letting u = x and dv = cos nx dx. Thus, du = dx and v = dv = n sin nx.
Continuing with the computation, we have

2 π
Z
an = x cos nx dx.
π 0
 
2 1 1 π
π Z
= x sin nx − sin nx dx
π n 0 n 0
 π
2 1
= − − cos nx
nπ n 0
2 n
= − 2 (1 − (−1) ). (2.42)
πn
50 fourier and complex analysis

Here we have used the fact that cos nπ = (−1)n for any integer n. This leads
to a factor (1 − (−1)n ). This factor can be simplified as
(
n 2, n odd,
1 − (−1) = (2.43)
0, n even.
4
So, an = 0 for n even and an = − πn 2 for n odd.
Computing the bn ’s is simpler. We note that we have to integrate | x | sin nx from
x = −π to π. The integrand is an odd function and this is a symmetric interval.
So, the result is that bn = 0 for all n.
Putting this all together, the Fourier series representation of f ( x ) = | x | on
[−π, π ] is given as
π 4 ∞ cos nx
π n∑
f (x) ∼ − . (2.44)
2 =1 n2
n odd
While this is correct, we can rewrite the sum over only odd n by re-indexing. We
let n = 2k − 1 for k = 1, 2, 3, . . . . Then we only get the odd integers. The series
can then be written as

π 4 cos(2k − 1) x
f (x) ∼
2

π ∑ (2k − 1)2
. (2.45)
k =1

Throughout our discussion we have referred to such results as Fourier


representations. We have not looked at the convergence of these series.
Here is an example of an infinite series of functions. What does this series
sum to? We show in Figure 2.10 the first few partial sums. They appear to
be converging to f ( x ) = | x | fairly quickly.
Even though f ( x ) was defined on [−π, π ], we can still evaluate the Fourier
series at values of x outside this interval. In Figure 2.11, we see that the rep-
resentation agrees with f ( x ) on the interval [−π, π ]. Outside this interval,
we have a periodic extension of f ( x ) with period 2π.
Another example is the Fourier series representation of f ( x ) = x on
[−π, π ] as left for Problem 7. This is determined to be

(−1)n+1
f (x) ∼ 2 ∑ n sin nx. (2.46)
n =1

As seen in Figure 2.12, we again obtain the periodic extension of the


function. In this case, we needed many more terms. Also, the vertical parts
of the first plot are nonexistent. In the second plot, we only plot the points
and not the typical connected points that most software packages plot as
the default style.
Example 2.5. It is interesting to note that one can use Fourier series to obtain
sums of some infinite series. For example, in the last example, we found that

(−1)n+1
x∼2 ∑ n sin nx.
n =1
π
Now, what if we chose x = 2?
Then, we have

(−1)n+1
 
π nπ 1 1 1
=2∑ sin = 2 1− + − +... .
2 n =1
n 2 3 5 7
fourier trigonometric series 51

Figure 2.10: Plot of the first partial sums


of the Fourier series representation for
f ( x ) = | x |.
N=1 N=2

2.5 2.5
2.0 2.0
1.5 1.5
1.0 1.0

.5 .5
x x
–3. –2. –1. 0. 1. 2. 3. –3. –2. –1. 0. 1. 2. 3.

N=3 N=4
3.0 3.0
2.5 2.5
2.0 2.0
1.5 1.5
1.0 1.0
.5 .5
x x
–3. –2. –1. 0. 1. 2. 3. –3. –2. –1. 0. 1. 2. 3.

Figure 2.11: Plot of the first 10 terms


of the Fourier series representation for
f ( x ) = | x | on the interval [−2π, 4π ].
3

2.5

1.5

0.5

–6 –4 –2 0 2 4 6 8 10 12
x

Figure 2.12: Plot of the first 10 terms


and 200 terms of the Fourier series rep-
resentation for f ( x ) = x on the interval
[−2π, 4π ]. N = 10

3.
2.
1.
0.0. x
–6. –4. –2. 2. 4. 6. 8. 10. 12.
–1.
–2.
–3.

N = 200

3.
2.
1.
0.0. x
–6. –4. –2. 2. 4. 6. 8. 10. 12.
–1.
–2.
–3.
52 fourier and complex analysis

This gives a well known expression for π:


 
1 1 1
π = 4 1− + − +... .
3 5 7

2.3.1 Fourier Series on [ a, b]

A Fourier series representation is also possible for a general interval,


This section can be skipped on first read- t ∈ [ a, b]. As before, we just need to transform this interval to [0, 2π ]. Let
ing. It is here for completeness and the
end result, Theorem 2.2 provides the re- t−a
sult of the section. x = 2π .
b−a
Inserting this into the Fourier series (2.3) representation for f ( x ), we obtain
∞ 
2nπ (t − a) 2nπ (t − a)

a0
g(t) ∼ + ∑ an cos + bn sin . (2.47)
2 n =1
b−a b−a

Well, this expansion is ugly. It is not like the last example, where the
transformation was straightforward. If one were to apply the theory to
applications, it might seem to make sense to just shift the data so that a = 0
and be done with any complicated expressions. However, some students
enjoy the challenge of developing such generalized expressions. So, let’s see
what is involved.
First, we apply the addition identities for trigonometric functions and
rearrange the terms.
∞ 
2nπ (t − a) 2nπ (t − a)

a0
g(t) ∼ + ∑ an cos + bn sin
2 n =1
b−a b−a
∞   
a0 2nπt 2nπa 2nπt 2nπa
= + ∑ an cos cos + sin sin
2 n =1
b−a b−a b−a b−a
 
2nπt 2nπa 2nπt 2nπa
+ bn sin cos − cos sin
b−a b−a b−a b−a
∞   
a0 2nπt 2nπa 2nπa
= + ∑ cos an cos − bn sin
2 n =1
b−a b−a b−a
 
2nπt 2nπa 2nπa
+ sin an sin + bn cos . (2.48)
b−a b−a b−a

Defining A0 = a0 and

2nπa 2nπa
An ≡ an cos − bn sin
b−a b−a
2nπa 2nπa
Bn ≡ an sin + bn cos , (2.49)
b−a b−a
we arrive at the more desirable form for the Fourier series representation of
a function defined on the interval [ a, b].
∞  
A0 2nπt 2nπt
g(t) ∼ + ∑ An cos + Bn sin . (2.50)
2 n =1
b−a b−a
fourier trigonometric series 53

We next need to find expressions for the Fourier coefficients. We insert


the known expressions for an and bn and rearrange. First, we note that
under the transformation x = 2π bt− a
− a , we have
Z 2π
1
an = f ( x ) cos nx dx
π 0
Z b
2 2nπ (t − a)
= g(t) cos dt, (2.51)
b−a a b−a
and
Z 2π
1
bn = f ( x ) cos nx dx
π 0
Z b
2 2nπ (t − a)
= g(t) sin dt. (2.52)
b−a a b−a
Then, inserting these integrals in An , combining integrals, and making use
of the addition formula for the cosine of the sum of two angles, we obtain
2nπa 2nπa
An ≡ an cos − bn sin
b−a b−a
Z b
2nπ (t − a) 2nπ (t − a)
 
2 2nπa 2nπa
= g(t) cos cos − sin sin dt
b−a a b−a b−a b−a b−a
Z b
2 2nπt
= g(t) cos dt. (2.53)
b−a a b−a
A similar computation gives
Z b
2 2nπt
Bn = g(t) sin dt. (2.54)
b−a a b−a
Summarizing, we have shown that:

Theorem 2.2. The Fourier series representation of f ( x ) defined on


[ a, b] when it exists, is given by
∞  
a0 2nπx 2nπx
f (x) ∼ + ∑ an cos + bn sin . (2.55)
2 n =1
b−a b−a

with Fourier coefficients

2 b
Z
2nπx
an = f ( x ) cos dx. n = 0, 1, 2, . . . ,
b−a a b−a
Z b
2 2nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.56)
b−a a b−a

2.4 Sine and Cosine Series

In the last two examples ( f ( x ) = | x | and f ( x ) = x on [−π, π ]), we


have seen Fourier series representations that contain only sine or cosine
terms. As we know, the sine functions are odd functions and thus sum
to odd functions. Similarly, cosine functions sum to even functions. Such
54 fourier and complex analysis

occurrences happen often in practice. Fourier representations involving just


sines are called sine series and those involving just cosines (and the constant
term) are called cosine series.
Another interesting result, based upon these examples, is that the orig-
inal functions, | x | and x, agree on the interval [0, π ]. Note from Figures
2.10 through 2.12 that their Fourier series representations do as well. Thus,
more than one series can be used to represent functions defined on finite
intervals. All they need to do is agree with the function over that partic-
ular interval. Sometimes one of these series is more useful because it has
additional properties needed in the given application.
We have made the following observations from the previous examples:
1. There are several trigonometric series representations for a func-
tion defined on a finite interval.
2. Odd functions on a symmetric interval are represented by sine
series and even functions on a symmetric interval are represented
by cosine series.
These two observations are related and are the subject of this section.
We begin by defining a function f ( x ) on interval [0, L]. We have seen that
the Fourier series representation of this function appears to converge to a
periodic extension of the function.
In Figure 2.13, we show a function defined on [0, 1]. To the right is its
periodic extension to the whole real axis. This representation has a period
of L = 1. The bottom left plot is obtained by first reflecting f about the y-
axis to make it an even function and then graphing the periodic extension of
this new function. Its period will be 2L = 2. Finally, in the last plot, we flip
the function about each axis and graph the periodic extension of the new
odd function. It will also have a period of 2L = 2.

Figure 2.13: This is a sketch of a func- f(x) on [0,1] Periodic Extension of f(x)
1.5 1.5
tion and its various extensions. The orig-
inal function f ( x ) is defined on [0, 1] and 1 1

graphed in the upper left corner. To its 0.5 0.5


right is the periodic extension, obtained
f(x)

f(x)

0 0
by adding replicas. The two lower plots
−0.5 −0.5
are obtained by first making the original
function even or odd and then creating −1 −1

the periodic extensions of the new func- −1.5 −1.5


−1 0 1 2 3 −1 0 1 2 3
tion. x x
Even Periodic Extension of f(x) Odd Periodic Extension of f(x)
1.5 1.5

1 1

0.5 0.5
f(x)

f(x)

0 0

−0.5 −0.5

−1 −1

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

In general, we obtain three different periodic representations. In order to


fourier trigonometric series 55

distinguish these, we will refer to them simply as the periodic, even, and
odd extensions. Now, starting with f ( x ) defined on [0, L], we would like
to determine the Fourier series representations leading to these extensions.
[For easy reference, the results are summarized in Table 2.2]

Table 2.2: Fourier Cosine and Sine Series


Fourier Series on [0, L] Representations on [0, L]
∞  
a0 2nπx 2nπx
f (x) ∼ + ∑ an cos + bn sin . (2.57)
2 n =1
L L

2 L 2nπx
Z
an = f ( x ) cos dx. n = 0, 1, 2, . . . ,
L 0 L
Z L
2 2nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.58)
L 0 L

Fourier Cosine Series on [0, L]



nπx
f ( x ) ∼ a0 /2 + ∑ an cos L
. (2.59)
n =1

where
Z L
2 nπx
an = f ( x ) cos dx. n = 0, 1, 2, . . . . (2.60)
L 0 L

Fourier Sine Series on [0, L]



nπx
f (x) ∼ ∑ bn sin L
. (2.61)
n =1

where
Z L
2 nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.62)
L 0 L

We have already seen from Table 2.1 that the periodic extension of f ( x ),
defined on [0, L], is obtained through the Fourier series representation
∞  
a0 2nπx 2nπx
f (x) ∼ + ∑ an cos + bn sin , (2.63)
2 n =1
L L

where
2 L 2nπx
Z
an = f ( x ) cos dx. n = 0, 1, 2, . . . ,
L 0 L
Z L
2 2nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.64)
L 0 L
Given f ( x ) defined on [0, L], the even periodic extension is obtained by Even periodic extension.
simply computing the Fourier series representation for the even function
(
f ( x ), 0 < x < L,
f e (x) ≡ (2.65)
f (− x ) − L < x < 0.
56 fourier and complex analysis

Since f e ( x ) is an even function on a symmetric interval [− L, L], we expect


that the resulting Fourier series will not contain sine terms. Therefore, the
series expansion will be given by [Use the general case in Equation (2.55)
with a = − L and b = L.]:

a0 nπx
f e (x) ∼ + ∑ an cos . (2.66)
2 n =1
L

with Fourier coefficients


Z L
1 nπx
an = f e ( x ) cos dx. n = 0, 1, 2, . . . . (2.67)
L −L L

However, we can simplify this by noting that the integrand is even and
the interval of integration can be replaced by [0, L]. On this interval f e ( x ) =
f ( x ). So, we have the Cosine Series Representation of f ( x ) for x ∈ [0, L] is
Fourier Cosine Series. given as

a0 nπx
f (x) ∼ + ∑ an cos . (2.68)
2 n =1
L

where Z L
2 nπx
an = f ( x ) cos dx. n = 0, 1, 2, . . . . (2.69)
L 0 L
Odd periodic extension. Similarly, given f ( x ) defined on [0, L], the odd periodic extension is
obtained by simply computing the Fourier series representation for the odd
function (
f ( x ), 0 < x < L,
f o (x) ≡ (2.70)
− f (− x ) − L < x < 0.
The resulting series expansion leads to defining the Sine Series Representa-
Fourier Sine Series Representation. tion of f ( x ) for x ∈ [0, L] as

nπx
f (x) ∼ ∑ bn sin L
, (2.71)
n =1

where Z L
2 nπx
bn = f ( x ) sin dx. n = 1, 2, . . . . (2.72)
L 0 L
Example 2.6. In Figure 2.13, we actually provided plots of the various extensions
of the function f ( x ) = x2 for x ∈ [0, 1]. Let’s determine the representations of the
periodic, even, and odd extensions of this function.
For a change, we will use a CAS (Computer Algebra System) package to do the
integrals. In this case, we can use Maple. A general code for doing this for the
periodic extension is shown in Table 2.3.

Example 2.7. Periodic Extension - Trigonometric Fourier Series Using the


code in Table 2.3, we have that a0 = 23 , an = n21π2 , and bn = − nπ
1
. Thus, the
resulting series is given as
∞  
1 1 1
f (x) ∼ +∑ cos 2nπx − sin 2nπx .
3 n =1 n 2 π 2 nπ
fourier trigonometric series 57

In Figure 2.14, we see the sum of the first 50 terms of this series. Generally,
we see that the series seems to be converging to the periodic extension of f . There
appear to be some problems with the convergence around integer values of x. We
will later see that this is because of the discontinuities in the periodic extension and
the resulting overshoot is referred to as the Gibbs phenomenon, which is discussed
in the last section of this chapter.

Figure 2.14: The periodic extension of


f ( x ) = x2 on [0, 1].

0.8

0.6

0.4

0.2

–1 0 1 2 3
x

> restart: Table 2.3: Maple code for computing


Fourier coefficients and plotting partial
> L:=1: sums of the Fourier series.
> f:=x^2:
> assume(n,integer):
> a0:=2/L*int(f,x=0..L);
a0 := 2/3
> an:=2/L*int(f*cos(2*n*Pi*x/L),x=0..L);
1
an := -------
2 2
n~ Pi
> bn:=2/L*int(f*sin(2*n*Pi*x/L),x=0..L);
1
bn := - -----
n~ Pi
> F:=a0/2+sum((1/(k*Pi)^2)*cos(2*k*Pi*x/L)
-1/(k*Pi)*sin(2*k*Pi*x/L),k=1..50):
> plot(F,x=-1..3,title=‘Periodic Extension‘,
titlefont=[TIMES,ROMAN,14],font=[TIMES,ROMAN,14]);

Example 2.8. Even Periodic Extension - Cosine Series


4(−1)n
In this case we compute a0 = 32 and an = n2 π2 . Therefore, we have

1 4 (−1)n
f (x) ∼ +
3 π2 ∑ 2
cos nπx.
n =1 n
58 fourier and complex analysis

In Figure 2.15, we see the sum of the first 50 terms of this series. In this case the
convergence seems to be much better than in the periodic extension case. We also
see that it is converging to the even extension.

Figure 2.15: The even periodic extension


of f ( x ) = x2 on [0, 1].
1

0.8

0.6

0.4

0.2

–1 0 1 2 3
x

Example 2.9. Odd Periodic Extension - Sine Series


Finally, we look at the sine series for this function. We find that

2
bn = − (n2 π 2 (−1)n − 2(−1)n + 2).
n3 π 3

Therefore,


2 1 2 2
f (x) ∼ −
π3 ∑ n 3
(n π (−1)n − 2(−1)n + 2) sin nπx.
n =1

Once again we see discontinuities in the extension as seen in Figure 2.16. However,
we have verified that our sine series appears to be converging to the odd extension
as we first sketched in Figure 2.13.

Figure 2.16: The odd periodic extension


of f ( x ) = x2 on [0, 1].

0.5

–1 0 1 2 3
x

–0.5

–1
fourier trigonometric series 59

2.5 The Gibbs Phenomenon

We have seen the Gibbs phenomenon when there is a jump discontinu-


ity in the periodic extension of a function, whether the function originally
had a discontinuity or developed one due to a mismatch in the values of
the endpoints. This can be seen in Figures 2.12, 2.14, and 2.16. The Fourier
series has a difficult time converging at the point of discontinuity and these
graphs of the Fourier series show a distinct overshoot which does not go
away. This is called the Gibbs phenomenon3 and the amount of overshoot 3
The Gibbs phenomenon was named af-
can be computed. ter Josiah Willard Gibbs (1839-1903) even
though it was discovered earlier by the
In one of our first examples, Example 2.3, we found the Fourier series Englishman Henry Wilbraham (1825-
representation of the piecewise defined function 1883). Wilbraham published a soon for-
gotten paper about the effect in 1848. In
( 1889 Albert Abraham Michelson (1852-
1, 0 < x < π, 1931), an American physicist,observed
f (x) =
−1, π < x < 2π, an overshoot in his mechanical graphing
machine. Shortly afterwards J. Willard
Gibbs published papers describing this
to be phenomenon, which was later to be

4 sin(2k − 1) x
f (x) ∼
π ∑ 2k − 1
. called the Gibbs phenomena. Gibbs was
a mathematical physicist and chemist
k =1
and is considered the father of physical
chemistry.

Figure 2.17: The Fourier series represen-


tation of a step function on [−π, π ] for
N = 10.
1

0.5

–3 –2 –1 1 2 3

–0.5

–1

In Figure 2.17, we display the sum of the first ten terms. Note the wig-
gles, overshoots and undershoots. These are seen more when we plot the
representation for x ∈ [−3π, 3π ], as shown in Figure 2.18.
We note that the overshoots and undershoots occur at discontinuities in
the periodic extension of f ( x ). These occur whenever f ( x ) has a disconti-
nuity or if the values of f ( x ) at the endpoints of the domain do not agree.

One might expect that we only need to add more terms. In Figure 2.19 we
show the sum for twenty terms. Note the sum appears to converge better
for points far from the discontinuities. But, the overshoots and undershoots
are still present. Figures 2.20 and 2.21 show magnified plots of the overshoot
at x = 0 for N = 100 and N = 500, respectively. We see that the overshoot
60 fourier and complex analysis

Figure 2.18: The Fourier series represen-


tation of a step function on [−π, π ] for
N = 10 plotted on [−3π, 3π ] displaying
the periodicity.
1

0.5

–8 –6 –4 –2 2 4 6 8

–0.5

–1

Figure 2.19: The Fourier series represen-


tation of a step function on [−π, π ] for
N = 20.

0.5

–3 –2 –1 1 2 3

–0.5

–1
fourier trigonometric series 61

persists. The peak is at about the same height, but its location seems to be
getting closer to the origin. We will show how one can estimate the size of
the overshoot. 1.2

We can study the Gibbs phenomenon by looking at the partial sums of 1.0

general Fourier trigonometric series for functions f ( x ) defined on the inter- 0.8

val [− L, L]. Writing out the partial sums, inserting the Fourier coefficients, 0.6

and rearranging, we have 0.4

0.2

N h nπx nπx i 0


0.02 0.04 0.06 0.08 0.1
SN (x) = a0 + an cos + bn sin
n =1
L L Figure 2.20: The Fourier series represen-
Z L N  Z L  tation of a step function on [−π, π ] for
1 1 nπy nπx
= f (y) dy + ∑ f (y) cos dy cos N = 100.
2L − L n =1
L −L L L
 Z L  
1 nπy nπx
+ f (y) sin dy. sin
L −L L L
ZL  1.2
1 1
= 1.0
L 2 0.8
−L
)
N  0.6
nπy nπx nπy nπx 
+ ∑ cos cos + sin sin f (y) dy 0.4

n =1
L L L L
0.2

ZL
( )
N
1 1 nπ (y − x ) 0

2 n∑
= + cos f (y) dy 0.02 0.04 0.06 0.08 0.1

L =1 L Figure 2.21: The Fourier series represen-


−L
tation of a step function on [−π, π ] for
ZL N = 500.
1
≡ D N (y − x ) f (y) dy
L
−L

We have defined
N
1 nπx
DN (x) = + ∑ cos ,
2 n =1 L
which is called the N-th Dirichlet kernel .
We now prove

Lemma 2.1. The N-th Dirichlet kernel is given by



 sin(( N + 12 ) πx
L )
DN (x) = 2 sin πx
2L
2L 6 = 0,
, sin πx
 N + 1, sin πx
2 2L = 0.

πx
Proof. Let θ = L and multiply D N ( x ) by 2 sin 2θ to obtain

 
θ θ 1
2 sin D N ( x ) = 2 sin + cos θ + · · · + cos Nθ
2 2 2
θ θ θ θ
= sin + 2 cos θ sin + 2 cos 2θ sin + · · · + 2 cos Nθ sin
2  2   2  2
θ 3θ θ 5θ 3θ
= sin + sin − sin + sin − sin +···
2 2 2 2 2
     
1 1
+ sin N + θ − sin N − θ
2 2
62 fourier and complex analysis

 
1
= sin N + θ. (2.73)
2
Thus,  
θ 1
2 sin D N ( x ) = sin N + θ.
2 2
If sin 2θ 6= 0, then
 
sin N + 12 θ πx
DN (x) = , θ= .
2 sin θ
2
L

If sin 2θ = 0, then one needs to apply L’Hospital’s Rule as θ → 2mπ:


   
sin N + 21 θ ( N + 12 ) cos N + 12 θ
lim = lim
θ →2mπ 2 sin 2θ θ →2mπ cos 2θ
( N + 21 ) cos (2mπN + mπ )
=
cos mπ
( N + 21 )(cos 2mπN cos mπ − sin 2mπN sin mπ )
=
cos mπ
1
= N+ . (2.74)
2

We further note that D N ( x ) is periodic with period 2L and is an even


function.
So far, we have found that the Nth partial sum is given by
ZL
1
SN (x) = D N (y − x ) f (y) dy. (2.75)
L
−L

Making the substitution ξ = y − x, we have


1 L− x
Z
SN (x) = D N (ξ ) f (ξ + x ) dξ
L − L− x
1 L
Z
= D N (ξ ) f (ξ + x ) dξ. (2.76)
L −L
In the second integral, we have made use of the fact that f ( x ) and D N ( x )
are periodic with period 2L and shifted the interval back to [− L, L].
We now write the integral as the sum of two integrals over positive and
negative values of ξ and use the fact that D N ( x ) is an even function. Then,
1 0 1 L
Z Z
SN (x) = D N (ξ ) f (ξ + x ) dξ + D N (ξ ) f (ξ + x ) dξ
L −L L 0
Z L
1
= [ f ( x − ξ ) + f (ξ + x )] D N (ξ ) dξ. (2.77)
L 0
We can use this result to study the Gibbs phenomenon whenever it oc-
curs. In particular, we will only concentrate on the earlier example. For this
case, we have
1
Z π
SN (x) = [ f ( x − ξ ) + f (ξ + x )] D N (ξ ) dξ (2.78)
π 0
fourier trigonometric series 63

for
N
1
DN (x) = + ∑ cos nx.
2 n =1
Also, one can show that

 2,
 0 ≤ ξ < x,
f ( x − ξ ) + f (ξ + x ) = 0, x ≤ ξ < π − x,

 −2, π − x ≤ ξ < π.
Thus, we have
2 x 2 π
Z Z
SN (x) = D N (ξ ) dξ − D N (ξ ) dξ
π 0 π π−x
Z x Z x
2 2
= D N (z) dz + D N (π − z) dz. (2.79)
π 0 π 0
Here we made the substitution z = π − ξ in the second integral.
The Dirichlet kernel for L = π is given by
sin( N + 21 ) x
DN (x) = .
2 sin 2x

For N large, we have N + 1


2 ≈ N; and for small x, we have sin 2x ≈ x
2. So,
under these assumptions,
sin Nx
DN (x) ≈ .
x
Therefore,
Z x
2 sin Nξ
SN (x) → dξ for large N, and small x.
π 0 ξ
If we want to determine the locations of the minima and maxima, where
the undershoot and overshoot occur, then we apply the first derivative test
for extrema to S N ( x ). Thus,
d 2 sin Nx
SN (x) = = 0.
dx π x
The extrema occur for Nx = mπ, m = ±1, ±2, . . . . One can show that there
is a maximum at x = π/N and a minimum for x = 2π/N. The value for
the overshoot can be computed as

2 π/N sin Nξ
Z
S N (π/N ) = dξ
π 0 ξ
2 sin t
Z π
= dt
π 0 t
2
= Si(π )
π
= 1.178979744 . . . . (2.80)

Note that this value is independent of N and is given in terms of the sine
integral, Z x
sin t
Si( x ) ≡ dt.
0 t
64 fourier and complex analysis

2.6 Multiple Fourier Series

Functions of several variables can have Fourier series repre-


sentations as well. We motivate this discussion by looking at the vibra-
y tions of a rectangular membrane. You can think of this as a drumhead with
H a rectangular cross section as shown in Figure 2.22. We stretch the mem-
brane over the drumhead and fasten the material to the boundary of the
rectangle. The height of the vibrating membrane is described by its height
from equilibrium, u( x, y, t).
0 x
0 L Example 2.10. The vibrating rectangular membrane.
Figure 2.22: The rectangular membrane The problem is given by the two-dimensional wave equation in Cartesian coordi-
of length L and width H. There are fixed nates,
boundary conditions along the edges.
utt = c2 (u xx + uyy ), t > 0, 0 < x < L, 0 < y < H, (2.81)
a set of boundary conditions,

u(0, y, t) = 0, u( L, y, t) = 0, t > 0, 0 < y < H,


u( x, 0, t) = 0, u( x, H, t) = 0, t > 0, 0 < x < L, (2.82)

and a pair of initial conditions (since the equation is second order in time),

u( x, y, 0) = f ( x, y), ut ( x, y, 0) = g( x, y). (2.83)

The general solution is obtained in a course on partial differential equa-


tions using what is called the Method of Separation of Variables. One as-
sumes solutions of the form u( x, y, t) = X ( x )Y (y) T (t) which satisfy the
given boundary conditions, u(0, y, t) = 0, u( L, y, t) = 0, u( x, 0, t) = 0, and
u( x, H, t) = 0. After some work, one finds the general solution is given by a
The general solution for the vibrating linear superposition of these product solutions. The general solution is
rectangular membrane.
∞ ∞
nπx mπy
u( x, y, t) = ∑ ∑ (anm cos ωnm t + bnm sin ωnm t) sin L
sin
H
, (2.84)
n =1 m =1

where r
nπ 2  mπ 2
ωnm = c + . (2.85)
L H
Next, one imposes the initial conditions just like we had indicated in
the side note at the beginning of this chapter for the one-dimensional wave
equation. The first initial condition is u( x, y, 0) = f ( x, y). Setting t = 0 in
the general solution, we obtain
∞ ∞
nπx mπy
f ( x, y) = ∑ ∑ anm sin
L
sin
H
. (2.86)
n =1 m =1

This is a double Fourier sine series. The goal is to find the unknown coeffi-
cients anm .
The coefficients anm can be found knowing what we already know about
Fourier sine series. We can write the initial condition as the single sum

nπx
f ( x, y) = ∑ An (y) sin
L
, (2.87)
n =1
fourier trigonometric series 65

where

mπy
An (y) = ∑ anm sin
H
. (2.88)
m =1
These are two Fourier sine series. Recalling from Chapter 2 that the
coefficients of Fourier sine series can be computed as integrals, we have
2 L nπx
Z
An (y) = f ( x, y) sin dx,
L 0 L
Z H
2 mπy
anm = An (y) sin dy. (2.89)
H 0 H
Inserting the integral for An (y) into that for anm , we have an integral
representation for the Fourier coefficients in the double Fourier sine series,
Z HZ L
4 nπx mπy
anm = f ( x, y) sin sin dxdy. (2.90)
LH 0 0 L H
The Fourier coefficients for the double
We can carry out the same process for satisfying the second initial condi- Fourier sine series.

tion, ut ( x, y, 0) = g( x, y) for the initial velocity of each point. Inserting the


general solution into this initial condition, we obtain
∞ ∞
nπx mπy
g( x, y) = ∑ ∑ bnm ωnm sin
L
sin
H
. (2.91)
n =1 m =1

Again, we have a double Fourier sine series. But, now we can quickly de-
termine the Fourier coefficients using the above expression for anm to find
that Z HZ L
4 nπx mπy
bnm = g( x, y) sin sin dxdy. (2.92)
ωnm LH 0 0 L H
This completes the full solution of the vibrating rectangular membrane
problem. Namely, we have obtained the solution The full solution of the vibrating rectan-
gular membrane.

∞ ∞
nπx mπy
u( x, y, t) = ∑ ∑ (anm cos ωnm t + bnm sin ωnm t) sin L
sin
H
,
n =1 m =1
(2.93)
where
Z HZ L
4 nπx mπy
anm = f ( x, y) sin sin dxdy, (2.94)
LH 0 0 L H
Z HZ L
4 nπx mπy
bnm = g( x, y) sin sin dxdy, (2.95)
ωnm LH 0 0 L H
and the angular frequencies are given by
r
nπ 2  mπ 2
ωnm = c + . (2.96)
L H
In this example we encountered a double Fourier sine series. This sug-
gests a function f ( x, y) defined on the rectangular region [0, L] × [0, H ] has
a double Fourier sine series representation,
∞ ∞
nπx mπy
f ( x, y) = ∑ ∑ bnm sin
L
sin
H
, (2.97)
n =1 m =1
66 fourier and complex analysis

where
Z HZ L
4 nπx mπy
bnm = f ( x, y) sin sin dxdy n, m = 1, 2, . . . . (2.98)
LH 0 0 L H
Of course, we would expect some of the same convergence problems already
seen with Fourier series.

Example 2.11. Find the double Fourier sine series representation of f ( x, y) = xy


on the unit square.
For this example, we seek the series representation
∞ ∞
f ( x, y) = ∑ ∑ bnm sin nπx sin mπy. (2.99)
n =1 m =1

We compute the Fourier coefficients:


Z 1Z 1
bnm = 4 f ( x, y) sin nπx sin mπy dxdy
0 0
Z 1Z 1
= 4 xy sin nπx sin mπy dxdy
0Z 1
0
 Z 1 
= 4 x sin nπx dx sin mπy dy
0 0
h cos nπ i h cos mπ i
= 4 − −
nπ mπ
4(−1) n + m
= .
nmπ 2
Therefore,
∞ ∞
(−1)n+m
xy ∼ 4 ∑ ∑ 2
sin nπx sin mπy. (2.100)
n=1 m=1 nmπ

We could just as well seek a double Fourier cosine series on [0, L] × [0, H ],

a00 1 ∞ nπx 1 ∞ mπy


f ( x, y) ∼ + ∑ an0 cos + ∑ a0m cos
4 2 n =1 L 2 m =1 H
∞ ∞
nπx mπy
+ ∑ ∑ anm cos
L
cos
H
, (2.101)
n =1 m =1

where the Fourier coefficients are given by


Z HZ L
4 nπx mπy
anm = f ( x, y) cos cos dxdy, n, m = 0, 1, . . . . (2.102)
LH 0 0 L H
The more general double Fourier trigonometric series on [0, L] × [0, H ]
would take the form
1 ∞
 
a00 2nπx 2nπx
f ( x, y) ∼ + ∑ an0 cos + bn0 sin
4 2 n =1 L L
1 ∞
 
2mπy 2mπy
+ ∑ a0m cos + b0m sin
2 m =1 H H
∞ ∞
2nπx 2mπy
+ ∑ ∑ anm cos
L
cos
H
,
n =1 m =1
fourier trigonometric series 67

∞ ∞
2nπx 2mπy
+ ∑ ∑ bnm sin
L
sin
H
,
n =1 m =1
∞ ∞
2nπx 2mπy
+ ∑ ∑ cnm cos
L
sin
H
,
n =1 m =1
∞ ∞
2nπx 2mπy
+ ∑ ∑ dnm sin
L
cos
H
. (2.103)
n =1 m =1

The corresponding double Fourier coefficients would take the form you
might expect.

Problems

1. Write y(t) = 3 cos 2t − 4 sin 2t in the form y(t) = A cos(2π f t + φ).

2. Determine the period of the following functions:

a. f ( x ) = cos 3x .
b. f ( x ) = sin 2πx.
c. f ( x ) = sin 2πx − 0.1 cos 3πx.
d. f ( x ) = | sin 5πx |.
e. f ( x ) = cot 2πx.
f. f ( x ) = cos2 2x .
3πx
g. f ( x ) = 3 sin πx
2 + 2 cos 4 .

3. Derive the coefficients bn in Equation (2.4).

4. Let f ( x ) be defined for x ∈ [− L, L]. Parseval’s identity is given by


Z L
a20 ∞
1
f 2 ( x ) dx = + ∑ a2n + bn2 .
L −L 2 n =1

Assuming the the Fourier series of f ( x ) converges uniformly in (− L, L),


prove Parseval’s identity by multiplying the Fourier series representation
by f ( x ) and integrating from x = − L to x = L. [In Section 5.6.3 we will
encounter Parseval’s equality for Fourier transforms which is a continuous
version of this identity.]

5. Consider the square wave function


(
1, 0 < x < π,
f (x) =
−1, π < x < 2π.

a. Find the Fourier series representation of this function and plot the
first 50 terms.
b. Apply Parseval’s identity in Problem 4 to the result in part a.

1
c. Use the result of part b to show π2
8 = ∑ 2
.
n=1 (2n − 1)
68 fourier and complex analysis

6. For the following sets of functions: (i) show that each is orthogonal on
the given interval, and (ii) determine the corresponding orthonormal set.
[See page 43.]

a. {sin 2nx }, n = 1, 2, 3, . . . , 0 ≤ x ≤ π.
b. {cos nπx }, n = 0, 1, 2, . . . , 0 ≤ x ≤ 2.
nπx
c. {sin L }, n = 1, 2, 3, . . . , x ∈ [− L, L].

7. Consider f ( x ) = 4 sin3 2x.

a. Derive the trigonometric identity giving sin3 θ in terms of sin θ and


sin 3θ using DeMoivre’s Formula.
b. Find the Fourier series of f ( x ) = 4 sin3 2x on [0, 2π ] without com-
puting any integrals.

8. Find the Fourier series of the following:

a. f ( x ) = x, x ∈ [0, 2π ].
x2
b. f ( x ) = 4 , | x | < π.
(
π
2, 0 < x < π,
c. f ( x ) =
− π2 , π < x < 2π.
(
x, 0 < x < π,
d. f ( x ) =
π, π < x < 2π.
(
π − x, 0 < x < π,
e. f ( x ) =
0, π < x < 2π.

9. Find the Fourier series of each function f ( x ) of period 2π. For each
series, plot the Nth partial sum,
N
a0
SN = + ∑ [ an cos nx + bn sin nx ] ,
2 n =1

for N = 5, 10, 50 and describe the convergence (Is it fast? What is it con-
verging to?, etc.) [Some simple Maple code for computing partial sums is
shown in the notes.]

a. f ( x ) = x, | x | < π.
b. f ( x ) = | x |, | x | < π.
c. f ( x ) = cos x, | x | < π.
(
0, −π < x < 0,
d. f ( x ) =
1, 0 < x < π.

10. Find the Fourier series of f ( x ) = x on the given interval. Plot the Nth
partial sums and describe what you see.

a. 0 < x < 2.
b. −2 < x < 2.
fourier trigonometric series 69

c. 1 < x < 2.

11. The result in Problem 8b above gives a Fourier series representation of


x2
4 . By picking the right value for x and a little arrangement of the series,
show that [See Example 2.5.]

a.
π2 1 1 1
= 1+ 2 + 2 + 2 +···.
6 2 3 4
b.
π2 1 1 1
= 1+ 2 + 2 + 2 +···.
8 3 5 7
Hint: Consider how the series in part a. can be used to do this.
c. Use the Fourier series representation result in Problem 8e to obtain
the series in part b.

12. Sketch (by hand) the graphs of each of the following functions over
four periods. Then sketch the extensions of each of the functions as both an
even and odd periodic function. Determine the corresponding Fourier sine
and cosine series and verify the convergence to the desired function using
Maple.

a. f ( x ) = x2 , 0 < x < 1.
b. f ( x ) = x (2 − x ), 0 < x < 2.
(
0, 0 < x < 1,
c. f ( x ) =
1, 1 < x < 2.
(
π, 0 < x < π,
d. f ( x ) =
2π − x, π < x < 2π.

13. Consider the function f ( x ) = x, −π < x < π.

a. Show that x = 2 ∑∞
n=1 (−1)
n+1 sin nx .
n
b. Integrate the series in part a and show that

π2 cos nx
x2 = − 4 ∑ (−1)n+1 .
3 n =1 n2

c. Find the Fourier cosine series of f ( x ) = x2 on [0, π ] and compare


it to the result in part b.
d. Apply Parseval’s identity in Problem 4 to the series in part a for
f ( x ) = x on −π < x < π. This gives another means to finding the
value ζ (2), where the Riemann zeta function is defined by

1
ζ (s) = ∑ ns
.
n =1

14. Consider the function f ( x ) = x, 0 < x < 2.

a. Find the Fourier sine series representation of this function and plot
the first 50 terms.
70 fourier and complex analysis

b. Find the Fourier cosine series representation of this function and


plot the first 50 terms.
c. Apply Parseval’s identity in Problem 4 to the result in part b.
d. Use the result of part c to find the sum ∑∞
n =1
1
n4
.

15. Differentiate the Fourier sine series term by term in Problem 14. Show
that the result is not the derivative of f ( x ) = x.

16. The temperature, u( x, t), of a one-dimensional rod of length L satisfies


the heat equation,
∂u ∂2 u
= k 2.
∂t ∂x
a. Show that the general solution,

nπx −n2 π2 kt/L2
u( x, t) = ∑ bn sin L
e ,
n =0

satisfies the one-dimensional heat equation and the boundary con-


ditions u(0, t) = 0 and u( L, t) = 0.
b. For k = 1 and L = π, find the solution satisfying the initial con-
dition u( x, 0) = sin x. Plot six solutions on the same set of axes for
t ∈ [0, 1].
c. For k = 1 and L = 1, find the solution satisfying the initial condi-
tion u( x, 0) = x (1 − x ). Plot six solutions on the same set of axes
for t ∈ [0, 1].

17. The height, u( x, t), of a one-dimensional vibrating string of length L


satisfies the wave equation,

∂2 u ∂2 u
2
= c2 2 .
∂t ∂x
a. Show that the general solution,

nπct nπx
u( x, t) = ∑ An cos
L
sin
L
n =1
nπct nπx
+ Bn sin sin ,
L L
satisfies the one-dimensional wave equation and the boundary con-
ditions u(0, t) = 0 and u( L, t) = 0.
b. For c = 1 and L = 1, find the solution satisfying the initial condi-
tions u( x, 0) = x (1 − x ) and ut ( x, 0) = x (1 − x ). Plot five solutions
for t ∈ [0, 1].
c. For c = 1 and L = 1, find the solution satisfying the initial condi-
tion (
4x, 0 ≤ x ≤ 14 ,
u( x, 0) = 4 1
3 (1 − x ), 4 ≤ x ≤ 1.

Plot five solutions for t ∈ [0, 0.5].


fourier trigonometric series 71

18. Show that


∞ ∞
nπx mπy
u( x, y, t) = ∑ ∑ (anm cos ωnm t + bnm sin ωnm t) sin L
sin
H
,
n =1 m =1

where r
nπ 2  mπ 2
ωnm = c + ,
L H
satisfies the two-dimensional wave equation

utt = c2 (u xx + uyy ), t > 0, 0 < x < L, 0 < y < H,

and the boundary conditions,

u(0, y, t) = 0, u( L, y, t) = 0, t > 0, 0 < y < H,


u( x, 0, t) = 0, u( x, H, t) = 0, t > 0, 0 < x < L,

19. Find the double Fourier sine series representation of the following:

a. f ( x, y) = sin πx sin 2πy on [0, 1] × [0, 1].


b. f ( x, y) = x (2 − x ) sin y on [0, 2] × [0, π ].
c. f ( x, y) = x2 y3 on [0, 1] × [0, 1].

20. Derive the Fourier coefficients in the double Fourier trigonometric series
in Equation (2.103).

You might also like