0% found this document useful (0 votes)
5 views

Fourier Intervals

Uploaded by

Akanksha
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 views

Fourier Intervals

Uploaded by

Akanksha
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/ 8

FOURIER SERIES ON ANY

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.

Fourier Series on Other Intervals


So far we have considered functions only on the interval (-p,p). There is no reason we could not have chosen another interval;

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

Fig. 1 Plot of y = x defined on H-p, pL


2

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

f HxL = + S an cos Hn xL + bn sin Hn xL


a0 ¶
(2)
2 n=1

The only difference now is that our limits of integration for computing coefficients are also shifted :

‡ f HxL dx; an = ‡ f HxL cos Hn xL dx; bn = ‡ f HxL sin Hn xL dx


1 2p 1 2p 1 2p
a0 = (3)
p 0 p 0 p 0

Make sure you notice that we are now integrating between 0 and 2p.

We can compute these coefficients easily :

In[238]:= Clear@fD
f@x_D := x ^ 2

8x, 0, 2 π<, Assumptions → Element@n, IntegersDD


Integrate@8f@xD, Cos@n xD f@xD, Sin@n xD f@xD<,

: >
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

Fig. 2 A graph of y = x2 defined on H0, 2 pL

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

Fourier Series with different Periodicities


Suppose we have a function that is periodic on the interval (-1, 1), or some other interval not involving simple multiples of p.
The extension of Fourier series to such instances is quite simple. Suppose again we are dealing with our function of y = x2 ; this
time we wish to consider it its behavior if it is defined on the interval (-1,1). In this case, its period is 2. How can we define its
Fourier series for this interval?

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 + 2 npO = sin K O cos H2 npL + sin H2 n pL cos K O


np npx npx npx
sinB (5)
l l l l
We know that cos(2 n p) is equal to 1 for all integer values of n, and sin (2 n p) is zero for all integers, so that the expression in
eq. (5) reduces to:

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 = + S Ban cos K O + bn sin K OF


a0 ¶ npx npx
(7)
2 n=1 L L
and our coefficients are defined as :

‡ 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

Integrate@x ^ 2, 8x, −1, 1<D


1
In[241]:= a0 =
1
2
Out[241]=
3

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]:=

Point@881 ê 2, H1 ê 2L ^ 2<, 82 + 1 ê 2, H1 ê 2L ^ 2<, 8−2 − 2 ê 3, H−2 ê 3L ^ 2<<D<D


1.0

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)

ü One more example


As a final example, let' s work out problem 15 a) on p. 363 of Boas. We are asked to find the Fourier series for the function
defined by :

f HxL = x, -1 § x < 1 (11)


Our interval is 2, so L = 1. Since our function is clearly odd over this interval, we know we need to compute only the bn terms:

Integrate@x Sin@Hn π xL ê 1D, 8x, −1, 1<, Assumptions → Element@n, IntegersDD


1
In[247]:= bn =

2 H−1Ln
1

Out[247]= −

fourierintervals.nb 5

And our Fourier series is :

H-1Ln sin Hn p xL sin H2 p xL sin H3 p xL


f HxL = - B-sin Hp xL +

2 -2
S = - + ...F (12)
p n p 2 3
n=1

Plotting three cycles of this function for verification :

Plot@−2 ê π Sum@H−1L ^ n Sin@n π xD ê n, 8n, 1, 100<D, 8x, −3, 3<,


Epilog → 8Red, PointSize@LargeD, Point@881 ê 2, 1 ê 2<, 82 + 1 ê 2, 1 ê 2<, 8−2 − 2 ê 3, −2 ê 3<<D<D
In[249]:=

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.

Functions that are not periodic


The previous sections have shown us how to compute the Fourier series for functions that are periodic on some interval other
than (-p,p). What do we do if we want to use the Fourier series for a function that is not periodic on any interval? Suppose we
need to find the Fourier series of a function that is defined on an interval (0,L)? (We will encounter such situations in Ch. 13;
some of you have already encountered these in Ch. 3 of Griffiths.) This is the essential question posed in Sect. 9 of Boas.

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

0.5 1.0 1.5 2.0

Fig. 3. Graph of y = x on (0, 2)

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

Fig. 4. Graph of y = Abs[x] on (-2, 2)

Or we can make this an odd function :

-2 -1 1 2

-1

-2

Fig. 5. Graph of y = x on (-2, 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

Fig. 6. Fourier series of y = Abs[x] on (-6, 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

Fig. 7. Fourier series for y = x on (-6, 6)

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

Fig. 8. Plot of function in (15) on (-2, 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

cos I n p2 x M H-1Ln sin I n p2 x M


f HxL =
1 4 ¶ 2 ¶
- S - S (15)
2 p2 n=1,3,5 n2 n n=1 n
which we might expect since the function defined immediately above is neither even nor odd, so our Fourier series includes both
sin and cos terms. Yet, this Fourier series produces exactly the same behavior on the interval (0, 2) :

2.0

1.5

1.0

0.5

-5 5

Fig. 9. Graph of Fourier series (15) on (-8, 8)

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.

You might also like