This is an outdated version. Either go to

[Notes on Diffy Qs home] [PDF version] [Buy paperback on Amazon]

[next] [prev] [prev-tail] [tail] [up]

Note: 2 lectures, §9.1 in [EP], §10.2 in [BD]

As motivation for studying Fourier series, suppose we have the problem

(4.6) |

for some periodic function . We already solved

(4.7) |

One way to solve (4.6) is to decompose as a sum of cosines (and sines) and then solve many problems of the form (4.7). We then use the principle of superposition, to sum up all the solutions we got to get a solution to (4.6).

Before we proceed, let us talk a little bit more in detail about periodic functions. A function is said to be periodic with period if for all . For brevity we say is -periodic. Note that a -periodic function is also -periodic, -periodic and so on. For example, and are -periodic. So are and for all integers . The constant functions are an extreme example. They are periodic for any period (exercise).

Normally we start with a function deﬁned on some interval , and we want to extend periodically to make it a -periodic function. We do this extension by deﬁning a new function such that for in , . For in , we deﬁne , for in , , and so on. To make that work we needed . We could have also started with deﬁned only on the half-open interval and then deﬁne .

You should be careful to distinguish between and its extension. A common mistake is to assume that a formula for holds for its extension. It can be confusing when the formula for is periodic, but with perhaps a diﬀerent period.

Exercise 4.2.1: Deﬁne on . Take the -periodic extension and sketch its graph. How does it compare to the graph of ?

Suppose we have a symmetric matrix, that is . As we remarked before, eigenvectors of are then orthogonal. Here the word orthogonal means that if and are two eigenvectors of for distinct eigenvalues, then . In this case the inner product is the dot product, which can be computed as .

To decompose a vector in terms of mutually orthogonal vectors and we write

Let us ﬁnd the formula for and . First let us compute

Therefore,

Similarly

You probably remember this formula from vector calculus.

Example 4.2.2: Write as a linear combination of and .

First note that and are orthogonal as . Then

HenceInstead of decomposing a vector in terms of eigenvectors of a matrix, we decompose a function in terms of eigenfunctions of a certain eigenvalue problem. The eigenvalue problem we use for the Fourier series is

We computed that eigenfunctions are 1, , . That is, we want to ﬁnd a representation of a -periodic function as

This series is called the Fourier series^{2} or the trigonometric series for . We write the coeﬃcient of the eigenfunction 1 as for convenience. We could also think of , so that we only need to look at and .

As for matrices we want to ﬁnd a projection of onto the subspaces given by the eigenfunctions. So we want to deﬁne an inner product of functions. For example, to ﬁnd we want to compute . We deﬁne the inner product as

With this deﬁnition of the inner product, we saw in the previous section that the eigenfunctions (including the constant eigenfunction), and are orthogonal in the sense that

By elementary calculus for we have and . For the constant we get that . The coeﬃcients are given byCompare these expressions with the ﬁnite-dimensional example. For we get a similar formula

Let us check the formulas using the orthogonality properties. Suppose for a moment that

Then for we have

And hence .

Example 4.2.3: Take the function

for in . Extend periodically and write it as a Fourier series. This function is called the sawtooth.

The plot of the extended periodic function is given in Figure 4.3. Let us compute the coeﬃcients. We start with ,

We will often use the result from calculus that says that the integral of an odd function over a symmetric interval is zero. Recall that an odd function is a function such that . For example the functions , , or (importantly for us) are all odd functions. Thus

Let us move to . Another useful fact from calculus is that the integral of an even function over a symmetric interval is twice the integral of the same function over half the interval. Recall an even function is a function such that . For example is even.

We have used the fact that

The series, therefore, is

Let us write out the ﬁrst 3 harmonics of the series for .

The plot of these ﬁrst three terms of the series, along with a plot of the ﬁrst 20 terms is given in Figure 4.4.

Example 4.2.4: Take the function

Extend periodically and write it as a Fourier series. This function or its variants appear often in applications and the function is called the square wave.

The plot of the extended periodic function is given in Figure 4.5. Now we compute the coeﬃcients. Let us start with

Next,

And ﬁnally

The Fourier series is

Let us write out the ﬁrst 3 harmonics of the series for .

The plot of these ﬁrst three and also of the ﬁrst 20 terms of the series is given in Figure 4.6.

We have so far skirted the issue of convergence. For example, if is the square wave function, the equation

is only an equality for such where is continuous. That is, we do not get an equality for and all the other discontinuities of . It is not hard to see that when is an integer multiple of (which includes all the discontinuities), then

We redeﬁne on as

and extend periodically. The series equals this extended everywhere, including the discontinuities. We will generally not worry about changing the function values at several (ﬁnitely many) points.

We will say more about convergence in the next section. Let us however mention brieﬂy an eﬀect of the discontinuity. Let us zoom in near the discontinuity in the square wave. Further, let us plot the ﬁrst 100 harmonics, see Figure 4.7. While the series is a very good approximation away from the discontinuities, the error (the overshoot) near the discontinuity at does not seem to be getting any smaller. This behavior is known as the Gibbs phenomenon. The region where the error is large does get smaller, however, the more terms in the series we take.

We can think of a periodic function as a “signal” being a superposition of many signals of pure frequency. For example, we could think of the square wave as a tone of certain base frequency. This base frequency is called the fundamental frequency. The square wave will be a superposition of many diﬀerent pure tones of frequencies that are multiples of the fundamental frequency. In music, the higher frequencies are called the overtones. All the frequencies that appear are called the spectrum of the signal. On the other hand a simple sine wave is only the pure tone (no overtones). The simplest way to make sound using a computer is the square wave, and the sound is very diﬀerent from a pure tone. If you ever played video games from the 1980s or so, then you heard what square waves sound like.

There is another form of the Fourier series using complex exponentials that is sometimes easier to work with.

Use Euler’s formula to show that there exist complex numbers such that

Note that the sum now ranges over all the integers including negative ones. Do not worry about convergence in this calculation. Hint: It may be better to start from the complex exponential form and write the series as

^{2}Named after the French mathematician Jean Baptiste Joseph Fourier (1768–1830).