
# PDEs, separation of variables, and the heat equation

### Introduction

Let us recall that a partial differential equation or PDE is an equation containing the partial derivatives with respect to several independent variables. Solving PDEs will be our main application of Fourier series.

A PDE is said to be linear if the dependent variable and its derivatives appear at most to the first power and in no functions. We will only talk about linear PDEs. Together with a PDE, we usually have specified some boundary conditions, where the value of the solution or its derivatives is specified along the boundary of a region, and/or some initial conditions where the value of the solution or its derivatives is specified for some initial time. Sometimes such conditions are mixed together and we will refer to them simply as side conditions.

We will study three specific partial differential equations, each one representing a more general class of equations. First, we will study the heat equation, which is an example of a parabolic PDE. Next, we will study the wave equation, which is an example of a hyperbolic PDE. Finally, we will study the Laplace equation, which is an example of an elliptic PDE. Each of our examples will illustrate behavior that is typical for the whole class.

#### 4.6.1 Heat on an insulated wire

Let us first study the heat equation. Suppose that we have a wire (or a thin metal rod) of length that is insulated except at the endpoints. Let denote the position along the wire and let denote time. See Figure 4.13.

Let denote the temperature at point at time . The equation governing this setup is the so-called one-dimensional heat equation:

where is a constant (the thermal conductivity of the material). That is, the change in heat at a specific point is proportional to the second derivative of the heat along the wire. This makes sense; if at a fixed the graph of the heat distribution has a maximum (the graph is concave down), then heat flows away from the maximum. And vice-versa.

We will generally use a more convenient notation for partial derivatives. We will write instead of , and we will write instead of . With this notation the heat equation becomes

For the heat equation, we must also have some boundary conditions. We assume that the ends of the wire are either exposed and touching some body of constant heat, or the ends are insulated. For example, if the ends of the wire are kept at temperature 0, then we must have the conditions

If, on the other hand, the ends are also insulated we get the conditions

In other words, heat is not flowing in nor out of the wire at the ends. We always have two conditions along the axis as there are two derivatives in the direction. These side conditions are called homogeneous (that is, or a derivative of is set to zero).

Furthermore, suppose that we know the initial temperature distribution at time . That is,

for some known function . This initial condition is not a homogeneous side condition.

#### 4.6.2Separation of variables

The heat equation is linear as and its derivatives do not appear to any powers or in any functions. Thus the principle of superposition still applies for the heat equation (without side conditions). If and are solutions and , are constants, then is also a solution.

Exercise 4.6.1: Verify the principle of superposition for the heat equation.

Superposition also preserves some of the side conditions. In particular, if and are solutions that satisfy and , and , are constants, then is still a solution that satisfies and . Similarly for the side conditions and . In general, superposition preserves all homogeneous side conditions.

The method of separation of variables is to try to find solutions that are sums or products of functions of one variable. For example, for the heat equation, we try to find solutions of the form

That the desired solution we are looking for is of this form is too much to hope for. What is perfectly reasonable to ask, however, is to find enough “building-block” solutions of the form using this procedure so that the desired solution to the PDE is somehow constructed from these building blocks by the use of superposition.

Let us try to solve the heat equation

Let us guess . We plug into the heat equation to obtain

We rewrite as

This equation must hold for all and all . But the left hand side does not depend on and the right hand side does not depend on . Hence, each side must be a constant. Let us call this constant (the minus sign is for convenience later). We obtain the two equations

In other words

The boundary condition implies . We are looking for a nontrivial solution and so we can assume that is not identically zero. Hence . Similarly, implies . We are looking for nontrivial solutions of the eigenvalue problem , , . We have previously found that the only eigenvalues are , for integers , where eigenfunctions are . Hence, let us pick the solutions

The corresponding must satisfy the equation

By the method of integrating factor, the solution of this problem is

It will be useful to note that . Our building-block solutions are

We note that . Let us write as the sine series

That is, we find the Fourier series of the odd periodic extension of . We used the sine series as it corresponds to the eigenvalue problem for above. Finally, we use superposition to write the solution as

Why does this solution work? First note that it is a solution to the heat equation by superposition. It satisfies and , because or makes all the sines vanish. Finally, plugging in , we notice that and so

Example 4.6.1: Suppose that we have an insulated wire of length 1, such that the ends of the wire are embedded in ice (temperature 0). Let . Then suppose that initial heat distribution is . See Figure 4.14.

We want to find the temperature function . Let us suppose we also want to find when (at what ) does the maximum temperature in the wire drop to one half of the initial maximum of 12.5.

We are solving the following PDE problem:

We write for as a sine series. That is, where

The solution , plotted in Figure 4.15 for , is given by the series:

Finally, let us answer the question about the maximum temperature. It is relatively easy to see that the maximum temperature will always be at , in the middle of the wire. The plot of confirms this intuition.

If we plug in we get

For and higher (remember is only odd), the terms of the series are insignificant compared to the first term. The first term in the series is already a very good approximation of the function. Hence

The approximation gets better and better as gets larger as the other terms decay much faster. Let us plot the function , the temperature at the midpoint of the wire at time , in Figure 4.16. The figure also plots the approximation by the first term.

After or so it would be hard to tell the difference between the first term of the series for and the real solution . This behavior is a general feature of solving the heat equation. If you are interested in behavior for large enough , only the first one or two terms may be necessary.

Let us get back to the question of when is the maximum temperature one half of the initial maximum temperature. That is, when is the temperature at the midpoint . We notice on the graph that if we use the approximation by the first term we will be close enough. We solve

That is,

So the maximum temperature drops to half at about .

We mention an interesting behavior of the solution to the heat equation. The heat equation “smoothes” out the function as grows. For a fixed , the solution is a Fourier series with coefficients . If , then these coefficients go to zero faster than any for any power . In other words, the Fourier series has infinitely many derivatives everywhere. Thus even if the function has jumps and corners, then for a fixed , the solution as a function of is as smooth as we want it to be.

#### 4.6.3Insulated ends

Now suppose the ends of the wire are insulated. In this case, we are solving the equation

Yet again we try a solution of the form . By the same procedure as before we plug into the heat equation and arrive at the following two equations

At this point the story changes slightly. The boundary condition implies . Hence . Similarly, implies . We are looking for nontrivial solutions of the eigenvalue problem , , . We have previously found that the only eigenvalues are , for integers , where eigenfunctions are (we include the constant eigenfunction). Hence, let us pick solutions

The corresponding must satisfy the equation

For , as before,

For , we have and hence . Our building-block solutions will be

and

We note that . Let us write using the cosine series

That is, we find the Fourier series of the even periodic extension of .

We use superposition to write the solution as

Example 4.6.2: Let us try the same equation as before, but for insulated ends. We are solving the following PDE problem

For this problem, we must find the cosine series of . For we have

The calculation is left to the reader. Hence, the solution to the PDE problem, plotted in Figure 4.17, is given by the series

Note in the graph that the temperature evens out across the wire. Eventually, all the terms except the constant die out, and you will be left with a uniform temperature of along the entire length of the wire.

#### 4.6.4Exercises

Exercise 4.6.2: Imagine you have a wire of length 2, with and an initial temperature distribution of . Suppose that both the ends are embedded in ice (temperature 0). Find the solution as a series.

Exercise 4.6.3: Find a series solution of

Exercise 4.6.4: Find a series solution of

Exercise 4.6.5: Find a series solution of

Exercise 4.6.6: Find a series solution of

Hint: Use the fact that is a solution satisfying , , . Then use superposition.

Exercise 4.6.7: Find the steady state temperature solution as a function of alone, by letting in the solution from exercises 4.6.5 and 4.6.6. Verify that it satisfies the equation .

Exercise 4.6.8: Use separation variables to find a nontrivial solution to , where and . Hint: Try .

Exercise 4.6.9 (challenging): Suppose that one end of the wire is insulated (say at ) and the other end is kept at zero temperature. That is, find a series solution of

Express any coefficients in the series by integrals of .

Exercise 4.6.10 (challenging): Suppose that the wire is circular and insulated, so there are no ends. You can think of this as simply connecting the two ends and making sure the solution matches up at the ends. That is, find a series solution of

Express any coefficients in the series by integrals of .

Exercise 4.6.101: Find a series solution of

Exercise 4.6.102: Find a series solution of

Exercise 4.6.103: Use separation of variables to find a nontrivial solution to .

Exercise 4.6.104: Use separation of variables (Hint: try ) to find a nontrivial solution to .