You are on page 1of 10

||||

Fourier Series
When the French mathematician Joseph Fourier (17681830) was trying to solve a problem in heat conduction, he needed to express a function f as an innite series of sine and cosine functions:
1

f x

a0
n 1

a n cos nx a1 cos x b1 sin x

bn sin nx a3 cos 3x b3 sin 3x

a0

a2 cos 2x b2 sin 2x

Earlier, Daniel Bernoulli and Leonard Euler had used such series while investigating problems concerning vibrating strings and astronomy. The series in Equation 1 is called a trigonometric series or Fourier series and it turns out that expressing a function as a Fourier series is sometimes more advantageous than expanding it as a power series. In particular, astronomical phenomena are usually periodic, as are heartbeats, tides, and vibrating strings, so it makes sense to express them in terms of periodic functions. We start by assuming that the trigonometric series converges and has a continuous function f x as its sum on the interval , , that is,

f x

a0
n 1

a n cos nx

bn sin nx

Our aim is to nd formulas for the coefcients a n and bn in terms of f . Recall that for a power series f x cn x a n we found a formula for the coefcients in terms of derivn atives: cn f a n!. Here we use integrals. If we integrate both sides of Equation 2 and assume that its permissible to integrate the series term-by-term, we get

f x dx

a 0 dx

y
n 1

a n cos nx

bn sin nx dx

2 a0
n 1

an y

cos nx dx
n 1

bn y sin nx dx

But

cos nx dx

1 sin nx n sin nx dx f x dx

1 sin n n 0. So 2 a0

sin

because n is an integer. Similarly, x

FOURIER SERIES

and solving for a0 gives


|||| Notice that a 0 is the average value of f over , . the interval

a0

1 2

f x dx

To determine an for n 1 we multiply both sides of Equation 2 by cos mx (where m is an integer and m 1) and integrate term-by-term from to :

y
4

f x cos mx dx

y
n 1

a0
n 1

a n cos nx

bn sin nx

cos mx dx

a0 y

cos mx dx

an

cos nx cos mx dx
n 1

bn

sin nx cos mx dx

Weve seen that the rst integral is 0. With the help of Formulas 81, 80, and 64 in the Table of Integrals, its not hard to show that

y y

sin nx cos mx dx

0 0

for all n and m for n for n m m

cos nx cos mx dx

So the only nonzero term in (4) is am and we get

f x cos mx dx

am

Solving for am , and then replacing m by n, we have

an

f x cos nx dx

1, 2, 3, . . .

Similarly, if we multiply both sides of Equation 2 by sin mx and integrate from we get 1

to ,

bn

f x sin nx dx

1, 2, 3, . . .

We have derived Formulas 3, 5, and 6 assuming f is a continuous function such that Equation 2 holds and for which the term-by-term integration is legitimate. But we can still consider the Fourier series of a wider class of functions: A piecewise continuous function on a, b is continuous except perhaps for a nite number of removable or jump discontinuities. (In other words, the function has no innite discontinuities. See Section 2.5 for a discussion of the different types of discontinuities.)

FOURIER SERIES

7 Definition Let f be a piecewise continuous function on Fourier series of f is the series

. Then the

a0
n 1

a n cos nx

bn sin nx

where the coefcients an and bn in this series are dened by a0 1 2

f x dx

an

f x cos nx dx

bn

f x sin nx dx

and are called the Fourier coefcients of f . Notice in Denition 7 that we are not saying f x is equal to its Fourier series. Later we will discuss conditions under which that is actually true. For now we are just saying that associated with any piecewise continuous function f on , is a certain series called a Fourier series.
EXAMPLE 1 Find the Fourier coefcients and Fourier series of the square-wave function

f dened by f x 0 if 1 if 0 x x 0 and f x 2 f x

So f is periodic with period 2 and its graph is shown in Figure 1.


|||| Engineers use the square-wave function in describing forces acting on a mechanical system and electromotive forces in an electric circuit (when a switch is turned on and off repeatedly). Strictly speaking, the graph of f is as shown in Figure 1(a), but its often represented as in Figure 1(b), where you can see why its called a square wave. y 1

(a)
y 1

FIGURE 1 Square-wave function

(b) SOLUTION Using the formulas for the Fourier coefcients in Denition 7, we have

a0

1 2

f x dx

1 2

0 dx

1 2

1 dx

1 2

1 2

FOURIER SERIES

and, for n

1, an 1

f x cos nx dx 1 sin nx n 1 n

0 dx

cos nx dx

sin n

sin 0

bn

f x sin nx dx

0 dx

sin x dx

1 cos nx n
|||| Note that cos n equals 1 if n is even and 1 if n is odd.

1 n

cos n

cos 0

0 2 n

if n is even if n is odd

The Fourier series of f is therefore a0 a1 cos x a2 cos 2x a3 cos 3x b3 sin 3x

b1 sin x 1 2 0 0 2 0 sin x

b2 sin 2x

0 sin 2x 2 sin 3x 3 2k

2 sin 3x 3 2 sin 5x 5

0 sin 4x 2 sin 7x 7

2 sin 5x 5

1 2

sin x

Since odd integers can be written as n Fourier series in sigma notation as 1 2

1, where k is an integer, we can write the

2
k 1

2k

sin 2k

1x

In Example 1 we found the Fourier series of the square-wave function, but we dont know yet whether this function is equal to its Fourier series. Lets investigate this question graphically. Figure 2 shows the graphs of some of the partial sums Sn x 1 2 2 sin x 2 sin 3x 3 2 sin nx n

when n is odd, together with the graph of the square-wave function.

FOURIER SERIES

y 1 S _
x

y 1 S

y 1 S

y 1 S

y 1 S

y 1 S

FIGURE 2 Partial sums of the Fourier series for the square-wave function

We see that, as n increases, Sn x becomes a better approximation to the square-wave function. It appears that the graph of Sn x is approaching the graph of f x , except where x 0 or x is an integer multiple of . In other words, it looks as if f is equal to the sum of its Fourier series except at the points where f is discontinuous. The following theorem, which we state without proof, says that this is typical of the Fourier series of piecewise continuous functions. Recall that a piecewise continuous function has only a nite number of jump discontinuities on , . At a number a where f has a jump discontinuity, the one-sided limits exist and we use the notation f a
xla

lim f x

f a

xla

lim f x

8 Fourier Convergence Theorem If f is a periodic function with period 2 and f and f are piecewise continuous on , , then the Fourier series (7) is convergent. The sum of the Fourier series is equal to f x at all numbers x where f is continuous. At the numbers x where f is discontinuous, the sum of the Fourier series is the average of the right and left limits, that is
1 2

f x

f x

If we apply the Fourier Convergence Theorem to the square-wave function f in Example 1, we get what we guessed from the graphs. Observe that f 0
xl0

lim f x

and

f 0

xl0

lim f x

and similarly for the other points at which f is discontinuous. The average of these left and right limits is 1 , so for any integer n the Fourier Convergence Theorem says that 2 1 2 2
k 1

2k

sin 2k

1x n .)

f x
1 2

if n if x

n n

(Of course, this equation is obvious for x

FOURIER SERIES

Functions with Period 2L


If a function f has period other than 2 , we can nd its Fourier series by making a change f x for all x. If we let of variable. Suppose f x has period 2L, that is f x 2L t x L and tt f x f Lt L corresponds to t . The Fourier

then, as you can verify, t has period 2 and x series of t is a0


n 1

a n cos nt

bn sin nt

where a0 1 1 2

t t dt 1

an

t t cos nt dt Lt

bn

t t sin nt dt x L, dt L dx, and

If we now use the Substitution Rule with x we have the following


9

, then t

If f is a piecewise continuous function on a0


n 1

L, L , its Fourier series is bn sin n x L

a n cos

n x L 1 2L

where
|||| Notice that when L the same as those in (7). these formulas are

a0 and, for n an 1 L 1,

L L

f x dx

L
L

f x cos

n x L

dx

bn

1 L

L L

f x sin

n x L

dx

Of course, the Fourier Convergence Theorem (8) is also valid for functions with period 2L.
EXAMPLE 2 Find the Fourier series of the triangular wave function dened by f x

x f x for all x. (The graph of f is shown in Figure 3.) for 1 x 1 and f x 2 For which values of x is f x equal to the sum of its Fourier series?
y 1

FIGURE 3 The triangular wave function

_1

FOURIER SERIES

SOLUTION We nd the Fourier coefcients by putting L


1 2

1 in (9):
1 2

a0
|||| Notice that a 0 is more easily calculated as an area.

1 1

x dx

1 2

y
1 0

0 1 1 2

x dx

x dx

1 4

x2

0 1

1 4

x2

and for n

1, an

1 1

x cos n x dx

2 y x cos n x dx
0

because y x cos n x is an even function. Here we integrate by parts with u and dv cos n x dx. Thus, an x 2 sin n x n 0 2 n
1

2 n
1

sin n x dx 2 n2

cos n x n

cos n

Since y

x sin n x is an odd function, we see that bn

1 1

x sin n x dx

We could therefore write the series as 1 2 But cos n 2 cos n n2 1


2

cos n x

n 1

1 if n is even and cos n

1 if n is odd, so 0 if n is even 4 n2
2

an

2 n2
2

cos n

if n is odd

Therefore, the Fourier series is 1 2 4


2

cos

4 9 4
2

cos 3 x

4 25 1

cos 5 x

1 2

n 1

2k

cos 2k

The triangular wave function is continuous everywhere and so, according to the Fourier Convergence Theorem, we have f x 1 2 4
n 1

2k

cos 2k

for all x

FOURIER SERIES

In particular, x 1 2 4
k 1

2k

cos 2k

for

Fourier Series and Music


One of the main uses of Fourier series is in solving some of the differential equations that arise in mathematical physics, such as the wave equation and the heat equation. (This is covered in more advanced courses.) Here we explain briey how Fourier series play a role in the analysis and synthesis of musical sounds. We hear a sound when our eardrums vibrate because of variations in air pressure. If a guitar string is plucked, or a bow is drawn across a violin string, or a piano string is struck, the string starts to vibrate. These vibrations are amplied and transmitted to the air. The resulting air pressure uctuations arrive at our eardrums and are converted into electrical impulses that are processed by the brain. How is it, then, that we can distinguish between a note of a given pitch produced by two different musical instruments? The graphs in Figure 4 show these uctuations (deviations from average air pressure) for a ute and a violin playing the same sustained note D (294 vibrations per second) as functions of time. Such graphs are called waveforms and we see that the variations in air pressure are quite different from each other. In particular, the violin waveform is more complex than that of the ute.

FIGURE 4 Waveforms

(a) Flute

(b) Violin

We gain insight into the differences between waveforms if we express them as sums of Fourier series: Pt a0 a1 cos t L b1 sin t L a2 cos 2 t L b2 sin 2 t L

In doing so, we are expressing the sound as a sum of simple pure sounds. The difference in sounds between two instruments can be attributed to the relative sizes of the Fourier coefcients of the respective waveforms. The n th term of the Fourier series, that is, a n cos n t L bn n t L

is called the nth harmonic of P. The amplitude of the n th harmonic is An and its square, A2 n a2 n

sa 2 n

b2 n

b2 , is sometimes called energy of the n th harmonic. (Notice that n

FOURIER SERIES

bn and for a Fourier series with only sine terms, as in Example 1, the amplitude is A n the energy is A2 b 2.) The graph of the sequence A2 is called the energy spectrum of n n n P and shows at a glance the relative sizes of the harmonics. Figure 5 shows the energy spectra for the ute and violin waveforms in Figure 4. Notice that, for the ute, A2 tends to diminish rapidly as n increases whereas, for the violin, the n higher harmonics are fairly strong. This accounts for the relative simplicity of the ute waveform in Figure 4 and the fact that the ute produces relatively pure sounds when compared with the more complex violin tones.
A@ n A@ n

FIGURE 5 Energy spectra

6 (a) Flute

10

10

(b) Violin

In addition to analyzing the sounds of conventional musical instruments, Fourier series enable us to synthesize sounds. The idea behind music synthesizers is that we can combine various pure tones (harmonics) to create a richer sound through emphasizing certain harmonics by assigning larger Fourier coefcients (and therefore higher corresponding energies).

||||
16
||||

Exercises
711
||||

, A function f is given on the interval and f is periodic with period 2 . (a) Find the Fourier coefcients of f . (b) Find the Fourier series of f . For what values of x is f x equal to its Fourier series? ; (c) Graph f and the partial sums S2, S4, and S6 of the Fourier series.
1. f x

Find the Fourier series of the function. 1 0 0 1 0 0 1 if x if 1 1 x 2 f x 4 f x

7. f x

8. f x

1 1 0 x x x2

if if 0 if if 0 x

x x x 0

0
9. f x 10. f x 11. f t
s s

if 2 x 0 if 0 x 1 if 1 x 2 x if 4 x 0 if 0 x 4 x, 1 1
s

f x

f x

f x f x

8 2

f x f x

2. f x 3. f x 4. f x 5. f x

x t
s

1 1
s

sin 3 t ,
s s

0 if cos x if 0 1 1 0
s s

x x x 2 x x
s

0 2 0
s s s s s s

12. A voltage E sin

t, where t represents time, is passed through a so-called half-wave rectier that clips the negative part of the wave. Find the Fourier series of the resulting periodic function 0 if if 0 t t 0 f t E sin t 2 f t

6. f x
s s

if if if 0
s

f t

10

FOURIER SERIES

1316 |||| Sketch the graph of the sum of the Fourier series of f without actually calculating the Fourier series.

18. Use the result of Example 2 to show that

13. f x

1 3 x 1 x , e x,
s s

if 4 x 0 if 0 x 4 if 1 x 0 x if 0 x 1 1 2 x x
s

1 32

1 52

1 72

19. Use the result of Example 1 to show that

14. f x 15. f x 16. f x


s s

1 3

1 5

1 7

1 2
s s s s s s s

20. Use the given graph of f and Simpsons Rule with n

8 to estimate the Fourier coefcients a 0, a1, a 2, b1, and b2. Then use them to graph the second partial sum of the Fourier series and compare with the graph of f .
y

17. (a) Show that, if

1 1 3

1, then 1
n

x2

n 1

4 n2

cos n x
1

(b) By substituting a specic value of x, show that 1 n2


2

0.25

n 1

You might also like