We are about to discover the Fourier transform as the natural answer to the following:
Question
Can we extend the machinery of the Fourier series to non-periodic function?
Recap of the periodic situation
As a quick recap, we started by attempting to represent functions that were periodic with period by complex Fourier series, i.e., series of the form
We quickly saw that if could be represented by such a series, then the coefficients in that series satisfied the integral formula
We then introduced the "hat" notation for the value of the above integral.
Eventually we used ideas from linear algebra to clarify the situation, introducing an analogue of the dot product for periodic functions, namely the inner product for functions defined by
This inner product shares nearly all of the familiar properties of the dot product on and allowed us to define both the notion of length (using ) and orthogonality (by declaring and orthogonal whenever ). In particular, if we let , then the set of functions is an orthonormal set, i.e., is a set of functions that are unit length and mutually orthogonal.
With this new linear algebra language, our work above became a standard result about orthonormal sets, namely that if can be written as a linear combination of the , then that combination must be exactly
where by definition
The more general situation
We can easily extend the above results to the case of functions that are periodic with arbitrary period . In this case, an inner product for functions is given by
and our corresponding orthonormal set of "elementary" periodic functions (with period ) is , where .
Just as above, we have that for every function that's periodic function with period , if can be written as a linear combination of the orthonormal functions above, then that combination must be
where
If, for some reason, we wish to express as a linear combination of the functions (which are no longer unit length but are still mutually orthogonal), we can equivalently write
where satisfy the integral equation
We can now ask the question:
Can we let ?
In other words, what happens if is not periodic? Can we make sense of some type of limit of the above situation?
Let's try answering this question in a particular (hopefully insightful) example.
Extended example: The rectangle function
Thinking like physicists for the moment, suppose we consider the simple situation of a "signal" that's "on" for one unit of time (say, second) and then "off" at all other times. We can model such a signal with a function that takes the value over an interval of length , and then value everywhere else. It will turn out to make things slightly nicer numerically if we use the function that is on the interval and everywhere else. The graph of this function is
We can make this graph more visualizing appealing (and look more like an idealization of an actual, continuous signal) if we add dotted lines connecting the "jump" points:
We will follow the common convention and denote this function , so that algebraically
The choice of the character (which is a capital pi) is meant to visually remind us of the graph of the function.
It would be reasonable to call this the square function, as its graph resembles a little unit square sitting on the origin, but for historical reasons it's usually called the unit rectangle function. (This naming will seem more justified when we start stretching and scaling the function, in which case the graph resembles a non-square rectangle.)
No matter what we call it, this function is decidedly not periodic. We can easily create periodic "versions" of this function, i.e., a function that is "on" for second bursts, periodically. For example, we might want a function that agreed with the above function on but that was periodic with period . In other words, suppose we considered the function whose graph looked like
Similarly, if we wanted a function that was "on" for -second intervals every seconds, we could consider the function whose graph looked like
In general, for every let's let denote the function that is periodic with period and takes the value on . This function takes the value on every interval of the form , and is elsewhere.
Observations
The function is periodic with period , so it makes sense to consider its corresponding complex Fourier series.
The function agrees with the function on the interval of width centered at the origin. In particular, for each fixed value of we always have . So it looks like our functions are "converging" to the original function .
Computing the Fourier series for
For simplicity, let's assume agrees with its complex Fourier series and write
The Fourier coefficients in this series are then given by
where we did some simplifications (behind the scenes) after computing the final integral. Substituting this information back into our Fourier series, we see that
We want to analyze what happens in the above expression as . To that end, we can rewrite that summation (perhaps more suggestively) as
Why rewrite the sum in this way? We claim that doing so makes the above sum look like a Riemann sum. Indeed, suppose (for some fixed value of ) we were asked to approximate the integral below with a Riemann sum:
Ignoring questions of convergence, the conventional approach would be to subdivide the -axis into little slices of equal length, say length :
We would then evaluate the integrand at the values , i.e., at all points of the form where .
A small but fixable issue
We should note that the integrand is not actually defined exactly at , but we'll see shortly that as approaches the values of the integrand simply approach . In other words, the integrand has a removable discontinuity at , which can be removed by setting the value of the integrand to at .
With the above minor fix in mind, the Riemann sum for the above definite integral is
where the first terms comes from the contribution at . The sum on the right is exactly our Fourier series for !
The dramatic conclusion
Now, as we let , our Riemann sum should converge to the exact value of the integral. In other words, we appear to have
In other words, the Fourier series for the periodic functions seem to converge to an integral representation of the non-periodic function .
An immediate question
The Fourier series for a periodic function seems to have been replaced by some type of Fourier integral for our non-periodic function. During this change, the Fourier coefficients (which were a sequence of complex numbers) were replaced by a single new function, in this case the function .
How did this function arise? How is it related to our original function ?
We can answer this question by looking back at how we computed the Fourier coefficients for the periodic function . After our usual computations, we found that (at least for )
In our effort to view the Fourier series as a Riemann sum for a definite integral, we introduced the new variable , and in our sum we had . So, at each term in the sum we were using the approximation
Combining this estimate with the previous equality, we see that when we have
where in the last step we simply used the fact that was outside the interval .
With all this in mind, it looks like (and we can now easily confirm) that
Indeed, observe that
The takeaway
Here's a quick comparison between the situation for periodic functions and non-periodic functions, at least if the previous example is to be trusted.
When is a periodic function with period , if we can write
then we must have
On the other hand, when is a non-periodic function, it seems like we might expect/hope to be able to write