Lecture 25

This topic covers

25.1 Fourier Series

In your MATH 215 course, you have at this point discussed orthogonal bases of vector spaces and dimension. We will now use this concept in this class.

Recall that the inner product of two functions defined on an interval is defined as

and an orthogonal set of functions are a set of functions such that

.

A function such that

is said to be square integrable and the vector space of all square-integrable functions on the interval is given the name . Square integrability will be a property which is used throughout electrical and computer engineering and will be used in ECE 207 Signals and Systems in 2B.

We will now look at a number of bases of square-integrable functions.

Given any interval of width , the set of functions

forms a basis for .

This basis is called the Fourier series or Fourier basis of square-integrable functions defined on the interval . Recall also from MATH 215 that we may use projections to map an arbitrary function onto one of the orthogonal basis vectors using

and we may therefore write that

where the ratios in the parentheses are constants are and called Fourier coefficients.

Historical Note

Joseph Fourier published a paper with Fourier series in 1807 before the concept of vector spaces was formalized by Giuseppe Peano in the late 1800s.

Well, the origin is obvious from the name: It was the French mathematical physicist Jean-Baptist Joseph Fourier (1768-1830) who introduced these series. As a person, the man was rather weird, and if you are interested I'll tell you some stories about his life in class. What he did for mathematics nd physics, however, history will never forget. In fact, Fourier belongs to the select company of work whose work is so fundamental that their names are used as adjectives!

To understand the impact of Fourier's ideas, picture this scene: The year is 1807 and a paper submitted by Fourier to the French Academy reaches the hands of three of the greatest mathematicians of the time (for refereeing). Now these were no average guys: Lagrange, Laplace, and Legendre. And the paper makes a significant impression on them, although they point out that Fourier had failed to prove his main result; without such a proof, Fourier's claim was simply outrageous. One may believe that jealousy was involved, but that is not the case for this is what Fourier claimed:

• Take a function defined on .
• The function need not be nice: it can have an arbitrary but finite number of discontinuities.
• Extend the function periodically over the real line; that is, take the function on and repeat it forever to the left and to the right.
• Then and for .
• Moreover, this series converges to for each point where the function is continuous and the series converges to at any point where the function is discontinuous.

Why is this outrageous? Suppose that the function has a jump discontinuity at some point . Therefore, does not exist, and yet all the functions in the series are infinitely differentiable everywhere; so how can one hope to represent a function with no derivative at a point by a series of other functions that have derivatives at all points.

25.2 Fourier Series on the Interval [-π, π]

We will begin with a very simple interval: . In this case, the width of the interval is and therefore the basis functions are

.

These functions are orthogonal on this interval, for example,

.

On the other hand, we must also calculate:

for each of these functions. In the case of the function 1, it is easy:

.

Calculating the others may appear initially to be more difficult; however, look at the squares of each of these functions, as is shown in Figure 1.

Figure 1. The squares of on the interval .

In each case, the region below the function occupies half the area of the rectangle of width and height 1. Consequently, it must be true that

for any integer .

Consequently, we get the traditional definition of a Fourier series from linear algebra:

.

For clarity, for a given function we will define

and

and thus we may write the Fourier series as

.

Approximating Functions

A Fourier series has an infinite number of terms; however, engineers cannot practically deal with an infinite series. Fortunately, for almost all functions which engineers will ever encounter, we may approximate a function with a finite Fourier series

where is some sufficiently large integer.

Example 1

Consider the function given by .

First, this function is odd and therefore and for all values of . Therefore for all . Determining the other coefficients requires us to solve

.

This requires one integration by parts, that is, where in this case, and . Therefore

.

The second integral is zero and the first term simplifies to

.

We note that , , , and thus , and thus we have

.

Therefore, our Fourier series is

.

To see how this series approximates the function , let us consider the partial sums:

,
,
, and

and these are shown in Figure 2.

Figure 2. The first four Fourier series approximations of the function .

As you will note, with each new term added to the series, the approximation becomes better (though more wavy). Figure 3 shows an animation of how more and more terms being added to the Fourier series results in a better and better approximation.

Figure 3. An animation showing the first fifty-one Fourier series approximations of the function .

Note that Figure 3 is not a continuous movie. Each successive frame draws the Fourier series approximation with one additional term. Because the magnitude of each additional term grows successively smaller, it appears as if it is a continuous movie.

You will notice that at any one point, it appears to converge; however, there is a jump in the approximations near the end points. We will revisit this again.

Example 2

Next, consider the function given by .

First, this function is odd and therefore for all values of . Determining the other coefficients requires us to solve

and, using two integration by parts,

.

Thus, we have the Fourier series approximation

.

The first five approximations are

,
,
,
, and

and these are shown in Figure 4.

Figure 4. The first five Fourier series approximations of the function .

You will notice that the first approximation is a constant function: it is the constant function which has the same integral of the function on the interval .

As you will note, with each new term added to the series, the approximation becomes better. Figure 5 shows an animation of how more and more terms being added to the Fourier series results in a better and better approximation.

Figure 5. An animation showing the first fifty-one Fourier series approximations of the function .

You will notice that, unlike the previous example, it appears to converge everywhere without an overshoot at either end. This will, again be explained later.

Example 3

Next, consider the function given by . This is the unit step function shown in Figure 6.

Figure 6. The unit step function on the interval .

.

The cosine terms, however, are all zero:

.

The sine terms are more interesting:

.

Thus, if is odd, the coefficient is ; while if is even, the coefficient is . Therefore, we may write the Fourier series as

.

The first five terms different approximations are

,
,
,
, and

and these are shown in Figure 7.

Figure 7. The first five different Fourier series approximations of the unit step function.

In this case, again, you may notice the jumps at , , and . The first twenty-six different approximations are shown in Figure 8.

Figure 8. An animation showing the first fifty-one Fourier series approximations of the unit step function.

Example 4

Consider the function given by or .

The function is shown in Figure 9.

Figure 9. The function defined on .

We can calculate the coefficients using integration: and for .

The first approximation is and the next is , followed by . Figure 10 shows various approximations. Figure 11 is an animation showing the first hundred approximations.

Figure 10. The approximations through , though because , the approximations and are unchanged.

Figure 11. An animation showing through to demonstrate how they converge to the target function.

Note that Figure 11 is not a continuous movie. Each successive frame draws the Fourier series approximation with one additional term. Because the magnitude of each additional term grows successively smaller, it appears as if it is a continuous movie.

It becomes apparent in Figure 11 how the sequence of functions does appear to converge everywhere and, in addition, each approximation appears to be very close to 0.5 at the points .

Example 5

Consider the modification of the function shown in Figure 12 which adds a spike of width 0.1 around the point .

Figure 12. The function in Figure 9 with a spike added around .

Figure 13 shows the approximations while Figure 14 shows the first 101 approximations.

Figure 13. The first three Fourier approximations of the function shown in Figure 12.

Figure 14. An animation showing through to demonstrate how they converge to the target function shown in Figure 12.

25.3 Periodic Extensions and Power Signals

In all of these cases, the function has been approximated on the interval and we have only plotted the solution on that interval. There is no reason not to plot the solutions over a larger interval and for Examples 1 through 4, these are shown in Figures 15 through 18.

Figure 15. The plot of the approximation .

Figure 16. The plot of the approximation .

Figure 17. The plot of the approximation .

In each case, the result is an approximation of the function defined on but repeated periodically. Given any function defined on , this repetition of the function outside the interval is called the periodic extension of the function.

The power of such a periodic function is defined as

,

or, for the periodic extension of a function defined on an interval as

.

For example, the power of the functions in Examples 1 through 4 are , , , and . This will be used in the course ECE 207 Signals and Systems the response of a system based on periodic input will be covered in significantly more detail.