Let's see how we can sometimes use Fourier series to help us solve differential equations, including some partial differential equations. We will give two real-world examples, both involving a concept known as heat flow. In both cases, we will be dealing with two-variable functions, where our two variables are position and time . In the first example, our function will be periodic in position, while in the second example it will be periodic in time.
Heat flow
Let's first give a quick-and-dirty derivation of the so-called "heat equation". If you're already familiar with the heat equation, you can skip to the first example.
If you're still here, then suppose something one-dimensional is heating up and denotes the temperature at position and time (all in your favorite chosen units). Also let denote the rate at which energy flows at position and time , where the rate is positive if the energy flows in the positive -direction.
We make two basic assumptions about the functions and :
Assumption 1: Newton's Law of Heating
At each fixed position , we assume the rate of energy flow with respect to time is proportional to the negative gradient (with respect to ) of temperature. In other words, if the temperature increases greatly as we move in the positive -direction, then we are assuming that the energy should flow proportionally in the direction from hot-to-cold. In terms of an equation, we are assuming
for some positive constant . Physically, the constant can be thought of as a measure of how easily energy flows across the substance when there is a temperature difference. Because of this (and unfortunate history), the reciprocal is sometimes called the thermal resistance of the substance.
Assumption 2: Energy accumulation
Suppose we look at a small chunk of the substance, of width from location to location . Let's consider the rate at which energy increases in this little piece. On the one hand, energy enters this region on the left at a rate and exists the piece on the right at rate . So, the rate of change of energy in this little piece should be approximately
On the other hand, we will also assume that the rate at which energy in this little piece increases is proportional to the length of the piece and the rate at which the temperature is increasing in the piece.In other words, we will assume
for some positive constant . This constant is sometimes called the thermal capacity of the substance.
We can rewrite the above equation as
Our second assumption is therefore that
Combining these two assumptions
Using the above assumptions, we are suppose and are related by the two partial differential equations
We can combine these two differential equations to deduce a single differential equation that must satisfy, as follows. Take partial derivatives with respect to in the first equation to obtain
Now substitute this into the second differential equation to obtain
We call this equation the Heat Equation, since it gives a model for how heat behaves in a one-dimensional substance.
Example: Hot wire
Suppose we heat a thin circular wire. Let's center a polar coordinate system on this wire and let denote the position on the wire at polar angle . Then let denote the temperature of the wire at position and time .
By our choice of coordinate , the function is periodic in with period . We now make two assumptions:
The function satisfies the heat equation .
For each fixed value of , the function can be represented by a Fourier series in , i.e., for each value of there are complex numbers such that
Pay close attention to the variables
Imagine is a family of functions of , one function at each time . Each of those functions is periodic in , so we represent it as a linear combination of our favorite periodic functions in , namely . The coefficients of those linear combinations presumably depend on , however, which is why they're denoted .
Before moving on, let's note that for each fixed value of , the coefficient of is the Fourier coefficient of the function at index . In particular, the Fourier coefficient of is the coefficient , and hence satisfies
This will come up again at the very end of this example.
Solving this partial differential equation
Let's now use the method we employed with power series (and Frobenius series), i.e., substitute our candidate series into the differential equation. In this case, let's first compute
(We interchanged the infinite sum and the partial differentiation, which probably deserves justification.)
On the other hand, we can also similarly compute
and then
It follows that our Fourier series is a solution to our differential equation exactly when
Notice that, from the point of view of the variable , both sides of this equation are linear combinations of the functions for . Since the set of functions is a linearly independent set, the only way two linear combinations can be equal is if the coefficient of is the same on each side, for every . In other words, we must have
for every integer .
A different kind of relation
When we looked for power series (or Frobenius series) solutions, we always found the coefficients of the mystery series needed to satisfy a recursion relation. Here, however, we see that something different has happened: the coefficients of our mystery Fourier series need to satisfy another differential equation!
You might think we've wasted our time, exchanging the problem of solving one differential equation for satisfying an entire family of new differential equations. Notice, however, that these new differential equations are ordinary, first-order, homogeneous, linear differential equations. If we fix for the moment, we can rewrite our new differential equation as
where is a constant. The general solution to this differential equation is
where is any constant. In fact, if we evaluation at we see that , so we can write our solution as
We've done it! Under the assumptions we've made for this problem, we've proven that the general solution is
Additional observations that foreshadow some cool things
It is common to describe the solution to a differential equation using two pieces of information:
A description of the initial state of the system.
A description of how the system evolves over time, i.e., of the dynamics of the system.
In our case, the first piece of information is the function , which gives the initial temperature at each point on the wire. Let's denote this function . This function is periodic with period and its Fourier coefficients satisfy
We can now rewrite our final solution, above, as
So now the initial state of the system can be seen as contributing to the solution. But we can do even better. Let's replace in the above sum with its integral value and then move around some terms:
where .
Why did we do all of this? It turns out that our energy system (of a hot wire) is governed by:
The initial temperature information, which is function that is periodic (with period ). This is sometimes called the initial impulse.
A function that determines how the energy moves through the system. This is sometimes called the impulse response or convolving function.
The integral above, which combines the functions and , is called the convolution of the two functions. We will see that it can be seen as a "smoothed average" of the nearby temperatures, using the convolving function as a weighting function.
For now this all might seem a bit much, but as our theory develops it will prove remarkable prescient!
Example: Hot Earth
In this example, let us now imagine we've chosen a fixed position on the surface of the earth, and we let denote the temperature meters below the surface at time (in years). This time, let us assume:
The function satisfies the heat equation . There is nothing special about the value of , other than to provide slight contrast with the previous example (and possibly make some numbers later on slightly nicer looking).
The function is periodic in with period . In other words, at any fixed position , the temperature should repeat annually. While that's not totally realistic, it's not an entirely terrible assumption. In places like Michigan, for instance, it tends to be cold every December and hot every July. Because of this assumption, we will assume we can represent by a Fourier series in , i.e., as
Compare with the previous example
Note that in this example our function is assumed to be periodic in time , not in position . That means our Fourier series should be a combination of our basic periodic functions in , namely , where the coefficients depend on the position variable .
We now substitute this proposed Fourier series into our heat equation, this time finding that
Once again, by the linear independence of the functions , the above equality implies that for all we just have
or equivalently,
Solving this new differential equation
This new differential equation[1] is a second-order, linear, homogeneous differential equation. We can solve it using our methods from Linear Analysis I, although there's a good chance you never worked through an example with complex coefficients like this. Fortunately, the process is the same, so long as you're familiar with how to find roots of complex numbers.
In operator notation, we can write our new differential equation as
where is the differential operator . We now need to find the roots of the so-called auxiliary polynomial, namely . In other words, we need to find all complex numbers such that . Fortunately, there is a straightforward process to do this, using exponential notation.
Suppose is one of the roots, so that . Let's rewrite both sides in polar-exponential form. On the left-hand side we'll simply write . On the right-hand side we have two cases to consider. When , the number is purely imaginary with nonnegative imaginary part, i.e., lies on the positive imaginary axis. Its polar angle is therefore and its polar length is , so in polar-exponential form this number is . The equality then becomes
In polar-exponential form, two complex number are the same exactly when they have the same polar distance and the same angle, up to integer multiples of . So, the above equation implies that and for . It follows that and for . This leads to the two distinct complex numbers and .
We now repeat the previous computation in the case . In that case, the number is purely imaginary with negative imaginary part, i.e., lies on the negative imaginary axis. Its polar angle is therefore and its polar length is , so in polar-exponential form this number is . The equality then becomes
It follows that and for . This leads to the two distinct complex numbers and . (We've written the angles in this way so that it's clear and are complex conjugates, as are and ).
Before returning to our Fourier series, in this case it helps to rewrite the above complex numbers in their real and imaginary parts. Using Euler's identity, we have
Similarly, we find that
Now that we finally have these roots, we can conclude that the general solution to the second-order differential equation
is
Time to cheat
It turns out that, in our particular problem, our Fourier coefficients must have for all . We will take that as a fact for now, but I encourage you to investigate what happens to our final solution (below) if we do not make that assumption.
Using the above cheat, we can now conclude that
As usual, if we set in the above expression then we obtain , so we can rewrite the above as
Even better, if we let (the temperature at the surface, which we can think of as the initial data for this system), then just as in the previous example we can verify that , and so we can rewrite the previous expression as
The solution to our "Hot Earth" problem is therefore
Analyzing a special case
The above formula looks pretty complicated, so let's consider a special case in which a bunch of the terms greatly simplify. Suppose the temperature at the surface were given by . Converting this function directly into complex exponential functions, we find that
It follows that , and for all other . Our giant summation above then reduces to simply
We can simplify this expression and convert it into a function involving only real numbers, as follows:
A physicist might call this a damped and phase-shifted sine function. The term is the damping term, while the inside the sine function causes the phase shift.
To make things even nice, suppose we fixed our attention at position meters, i.e., about feet below the ground. In this case, the above expression simplifies even further to
Comparing the graph of this function with the graph of the surface temperature, we see the following:
In other words, the temperature four feet down:
Doesn't vary much.
Is cool when the surface is warm and warm when the surface is cool.
This sounds a lot like how a cellar works, and it's the reason cellars are so useful!
A last observation
Before leaving this example, let's end by noting that the same trick used in the previous example can let us rewrite the general solution in the form
where is our surface temperature (the initial impulse in our system) and where
is the impulse response (aka Green's function, fundamental solution, convolving function, ...).
There's definitely something going on here, and we'll see exactly what that is when we get familiar with the Fourier transform.