Fourier Trigonometric Series
Fourier Trigonometric Series
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
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
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:
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
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
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)
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.
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
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.
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)
nπ
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
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.
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
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
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
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
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.
2.5
1.5
0.5
–6 –4 –2 0 2 4 6 8 10 12
x
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
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
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
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
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
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
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]
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
where
Z L
2 nπx
an = f ( x ) cos dx. n = 0, 1, 2, . . . . (2.60)
L 0 L
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
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.
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.
0.8
0.6
0.4
0.2
–1 0 1 2 3
x
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.
0.8
0.6
0.4
0.2
–1 0 1 2 3
x
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.
0.5
–1 0 1 2 3
x
–0.5
–1
fourier trigonometric series 59
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
0.5
–8 –6 –4 –2 2 4 6 8
–0.5
–1
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
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
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
π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
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
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
and a pair of initial conditions (since the equation is second order in time),
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.
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.
We could just as well seek a double Fourier cosine series on [0, L] × [0, H ],
∞ ∞
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
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 .
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].
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.
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π.
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
a. Find the Fourier sine series representation of this function and plot
the first 50 terms.
70 fourier and complex analysis
15. Differentiate the Fourier sine series term by term in Problem 14. Show
that the result is not the derivative of f ( x ) = x.
∂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.
where r
nπ 2 mπ 2
ωnm = c + ,
L H
satisfies the two-dimensional wave equation
19. Find the double Fourier sine series representation of the following:
20. Derive the Fourier coefficients in the double Fourier trigonometric series
in Equation (2.103).