4.6 PDEs, Separation of Variables, and The Heat Equation
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.
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 .

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
Let us see why that is so. If is positive at some point , then at a particular time, is smaller to the left of , and higher to the right of . Heat is flowing from high heat to low heat, that is to the left. On the other hand if is negative then heat is again flowing from high heat to low heat, that is to the right. So when is zero, that is a point through which heat is not flowing. In other words, means no heat is flowing in or out of the wire at the point .
We have two conditions along the -axis as there are two derivatives in the direction. These side conditions are said to be homogeneous (i.e., or a derivative of is set to zero).
We also need an initial condition—the temperature distribution at time . That is,
for some known function . This initial condition is not a homogeneous side condition.
Separation 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.
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 will try to make this guess satisfy the differential equation, , and the homogeneous side conditions, and . Then, as superposition preserves the differential equation and the homogeneous side conditions, we will try to build up a solution from these building blocks to solve the nonhomogeneous initial condition .
First 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
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.
Insulated 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
Let us expand on the last point. The constant term in the series is
In other words, is the average value of , that is, the average of the initial temperature. As the wire is insulated everywhere, no heat can get out, no heat can get in. So the temperature tries to distribute evenly over time, and the average temperature must always be the same, in particular it is always . As time goes to infinity, the temperature goes to the constant everywhere.Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.