Fourier Intervals
Fourier Intervals
INTERVAL
Overview
We have spent considerable time learning how to compute Fourier series for functions that have a period of 2p on the interval
(-p,p). We have also seen how Fourier series generate some very interesting results, but you might have wondered how general
these results are. After all, there is a lot of physics that involves functions that are not 2p periodic on (-p,p); does Fourier analysis
work for them? This classnote is designed to illustrate some of the main principles developed in sections 8 and 9 of Boas (Ch. 7)
showing how to generalize Fourier analysis to any "reasonably well behaved function."
The last section of this classnote deals with the material in Boas' section 9. I think this section (of this classnote) is particularly
important since I don't think Boas sufficiently stressed the significance of this material.
in analyzing it; for instance, if we consider the simple function f HxL = x2 on the two intervals (-p, p) and (0,2p), we will get
we just used (-p,p) as a starting point. As your text notes, though, it is important to understand both the function and its interval
different Fourier series for them. First, let's plot several cycles of the function on the interval (-p,p):
-5 5
As we would expect, the function is even on this interval, and if we calculate the Fourier series for this function, we find :
H-1Ln cos Hn xL
f HxL =
p2 ¶
+4 S (1)
3 n=1 n2
If we translate this function by p, our function is now defined on the interval (0,2p). We can still write a Fourier series for this
function in familiar terms:
2 fourierintervals.nb
The only difference now is that our limits of integration for computing coefficients are also shifted :
Make sure you notice that we are now integrating between 0 and 2p.
In[238]:= Clear@fD
f@x_D := x ^ 2
: >
8 π3 4π 4 π2
Out[240]= , ,−
3 n2 n
We observe that the bn are non zero as they were on the interval (-p,p). The reason for this becomes clear when we plot several
cycles of y = x2 defined on (0,2p):
40
30
20
10
-5 5
Unlike the Fourier series in equation (1) which involves only cos terms (i.e., even terms) because the function is even, the Fourier
series defined on (0,2p) involves both cos and sin terms since the function is neither even nor odd when defined and graphed on
this interval. We can use the coefficients computed immediately above and write the Fourier series for this interval as:
4 p cos Hn xL 4 p2 sin Hn xL
f HxL =
4 p2 ¶
+ S - (4)
3 n=1 n2 n
This exercise shows that we can compute Fourier series for other intervals, but that we have to be careful to recompute the
coefficients
fourierintervals.nb 3
npx
For the more general case of a function whose periodicity is 2l, we can show that both sin( l
) and
npx
cos( l
) are 2l periodic. We know that a function is periodic with period p if f(x+p)=f(x). In this case, we can show that
npx
sin( l ) is 2l periodic because:
Hx + 2 lLF = sin K O
np npx
sinB (6)
l l
npx npx
and we have shown that sin( l
) is in fact 2l periodic. A similar analysis will show that cos( l
) is also 2l periodic.
It is a simple enough matter to write the general form of the Fourier series for any periodic interval L. The general form of the
series is:
‡ f HxL dx
1 L (8)
a0 =
L -L
‡ f HxL cos K O dx
1 L npx
an = (9)
L -L L
‡ f HxL sin K O dx
1 L npx
bn = (10)
L -L L
Notice that I am using upper case "L" to avoid confusion between "l" and "1". More substantively, notice that if the length of the
interval is 2 p, then L=p, and the definitions of the coefficients and of the Fourier series reduce to the familiar forms we know for
functions on the interval (-p,p).
Let's try now to compute the Fourier series for y = x2 on the interval (-1,1). Here, L=1, so we have:
4 fourierintervals.nb
So the first term in the Fourier series will be 1/2 of this, or 1/3.
In[242]:= an = Integrate@x ^ 2 Cos@Hn π xL ê 1D, 8x, −1, 1<, Assumptions → Element@n, IntegersDD
4 H−1Ln
Out[242]=
n2 π2
Where I do not explicitly write the factor of "1" before the integral.
In[243]:= bn = Integrate@x ^ 2 Sin@Hn π xL ê 1D, 8x, −1, 1<, Assumptions → Element@n, IntegersDD
Out[243]= 0
Not surprisingly, the b coefficients are zero. We could have predicted this since our function is even on this interval, and we
expect only even terms, thus no odd (sin) terms. Verifying this Fourier series by plotting three cycles of its sum over 100 terms:
Plot@1 ê 3 + H4 ê π ^ 2L Sum@H−1L ^ n Cos@Hn π xL ê 1D ê n ^ 2, 8n, 1, 100<D,
8x, −3, 3<, Epilog → 8Red, PointSize@LargeD,
In[251]:=
0.8
0.6
Out[251]=
0.4
0.2
-3 -2 -1 1 2 3
The obvious red dots verify that each point lies on the curve defined by y = x2 over the interval (-1,1)
2 H−1Ln
1
Out[247]= −
nπ
fourierintervals.nb 5
1.0
0.5
Out[249]=
-3 -2 -1 1 2 3
-0.5
-1.0
And the bright beacons of Mathematica tell us we have chosen our coefficients well.
So, suppose we need to find the Fourier series for the function f(x)=x defined on the interval (0,2). How can we do this since this
function is not periodic?
Simple: we make it periodic. Consider one possible way of doing this. The graph of our original function is:
2.0
1.5
1.0
0.5
Now, we can make this periodic by extending the graph in the negative half plane; for instance, we can make this an even
6 fourierintervals.nb
function :
2.0
1.5
1.0
0.5
-2 -1 1 2
-2 -1 1 2
-1
-2
You know how to find easily the Fourier series for the functions defined in Figs. 4 and 5. For instance, for the function defined
as in Fig .4, the Fourier series on the interval (-2, 2) is :
cos I n p2 x M
f HxL = 1 - B S F
8 ¶
(13)
p2 n=1,3,5 n2
Not surprisingly, the even extension of the function into the left half plane produces a Fourier series that consists of only cos
(even) terms. The graph of this series is:
2.0
1.5
1.0
0.5
-6 -4 -2 2 4 6
We can just as easily find the Fourier series for the odd function described by the graph in Fig. 5. Since this is an odd function,
we expect to find only sin terms, and the computed Fourier series for this function is :
fourierintervals.nb 7
H-1Ln SinA n p2 x E
f HxL =
-4 ¶
S (14)
p n=1 n
and yields the graph :
-6 -4 -2 2 4 6
-1
-2
As we see from the preceding discussion, we can take any function and make it periodic in order to find its Fourier series.
The key point is that we are interested only in the Fourier series that defines our region of interest. So if we only care about the
behavior of the function on (0, 2), we can still construct the Fourier series assuming the function is periodic on (-2, 2), and just
behaviors (one is even, one is odd; one varies as 1/n, one as 1 ë n2 ), yet they give us exactly the same behavior on the interval
use that portion of the Fourier series that applies to (0, 2). Notice that theFourier series, eqs. (13) and (14), have very different
(0,2).
So how do we know whether to extend the function to make it an even or an odd function? Sometimes it doesn't matter; some-
times the symmetry of the problem will make it clear that we must use either the even or odd extension.
In fact, we have an infinite array of ways we can make a function periodic. For instance we could have taken our initial function
(y=x on (0,2)) and defined it on (-2,2) as:
2.0
1.5
f HxL =
x, 0 § x < 2
1.0
0, -2 § x < 0
0.5
-2 -1 1 2
(I plot the function with red dashes so you can distinguish the portion of the graph on (-2,0) from the negative x axis).
If we compute the Fourier series for this series, we get a much more complicated expression :
8 fourierintervals.nb
2.0
1.5
1.0
0.5
-5 5
So why not choose this formulation of y = x on (0, 2)? We could, but why make our lives more difficult than necessary. Assum-
ing even or odd symmetry makes our Fourier functions much simpler (and the calculation of those series much easier). Of
course, as noted before, sometimes the constraints of the problem will make it clear to us whether we should make use of the
even or odd extension, but we can worry about those details in Chapter 13.