18.03 Class 38, Mon. May 10, 1999


Heat equation

In real life things generally depend upon more than one independent parameter. The last two lectures in this course give two examples. In the first, we envision a long tube filled with water and containing a variable concentration of a dye. How does this variable concentration evolve in time? Another physical system with the same mathematical model is a long thin rod, whose temperature varies along it. How does this temperature distribution evolve? Both of these are diffusion processes. For each time t we have a function u(x,t) of position x, which runs say from 0 to l.

Fix your gaze on a point x. How will u(x,t+\Delta t) differ from u(x,t)? If the neighboring values of u(.,t) are larger than u(x,t), we expect u(x,t+\Delta t) to be greater than u(x,t). If the neighboring values are smaller, we expect the reverse. The linear model for this behavior is

partial u/partial t = k partial^2 u/partial x^2. (*)

This is the "heat equation." k is a positive constant which reflects the conductivity of the material.

(*) is our first example of a "partial differential equation." It's "second order," since it involves a second derivative. It's homogeneous linear, by virtue of the simple way the derivatives appear. This leads to an important fact: if u and v are solutions to (*), then so is any linear combination, au + bv. This is the principle of "superposition." We will find very general solutions to (*) by forming linear combinations of very special "building block" solutions. Notice also that a constant function u is certainly a solution to (*).

Rather than "initial value problems," PDEs have "boundary value problems." There are two important types of boundary value problems associated with (*). In both one assumes given the distribution at time 0: u(.,0) is given. In the first, one asssumes furthermore that u(t,0) = 0 = u(t,l) for all t. This corresponds to draining heat from the ends if they get hot, and heating them if they get cold, to maintain constant temperature of 0. (Other temperatures can be arranged by adding a constant solution.) In the second, on assumes that partial u/partial x = 0 when x = 0 and when x = l. This corresponds to insulating the ends.

We'll look at the first type of boundary value problem first.

The building blocks are obtained by "separation of variables." In this context this means that we will look for solutions which are a product

u(x,t) = f(x) g(t)

of a function of x only with a function of t only. With this ansatz, (*) reads

f(x)g'(t) = k f''(x)g(t)

or g'(t)/k g(t) = f''(x)/f(x).

Since the left side is constant in x, and the right is constant in t, we conclude that both sides are constant! -- say -lambda. (The sign will be explained right away.)

Take the second order equation f''(x) + lambda f(x) = 0 first. If lambda < 0, the solutions are a e^{rx} + b e^{-rx}, where r = sqrt(-lambda). The initial condition u(t,0) = 0 forces f(0) = 0, whence a + b = 0: f(x) = a(e^{rx} - e^{-rx}). But this function is zero only for x = 0, so we can't satisfy the other end point condition f(l) = 0. The conclusion is that lambda is positive, and then the general solution is a cos(rt) + b sin(rt) where r = sqrt(lambda). The condition f(0) = 0 forces a = 0, and then the condition f(lambda) = 0 forces rl to be a multiple of pi.

To make this condition simple let's scale things so that l = pi. Then r is a positive integer, and we'll change its name to n: lambda = n^2 and f(x) = b sin(nx) for a constant b.

Now turn to the equation for g(t): g'(t) + k lambda g(t) = 0, or g'(t) + k n^2 g(t) = 0. Continuing to make things as simple as possible, assume k = 1. This has solution g(t) = a e^{- n^2 t} .

Putting these together we have a one-parameter family of solutions to (*) for each positive integer n:

u(x,t) = c e^{- n^2 t} sin(nx).

By superposition, we have a much more general class of solutions:

u(x,t) = sum_{n=1}^infinity cn e^{n^2 t} sin(nx). (**)

Notice that for each fixed value of t, what we have here is an odd Fourier series. In particular, when t = 0 we have the boundary value

u(x,0) = sum_{n=1}^infinity cn sin(nx)

so the coefficients cn are the Fourier coefficients bn of the initial heat distribution u(x,0) extended as an odd periodic function.

Suppose for example that we have an initial condition in which the bar is at a uniform heat 1, but the ends are being continuously cooled to temperature 0. Then u(x,0) = sq(x), the square wave we studied last week. Recall that

sq(x) = (4/pi) sum_{n=1}^infinity sin(nx)/n.

We conclude that

u(x,t) = (4/pi) sum_{n=1}^infinity e^{- n^2 t} sin(nx)/n

On the back of PS 8.5 there are plots of this for t = .001, .01, .1, 1, and 10. Almost immediately, the coefficients of the overtones become much smaller than the coefficient of the principal, and the heat distribution is well approximated by

(4/pi) e^{-t} sin(t).

Turn to the other sort of boundary condition: insulated ends. When we separate variables we find that f'(0) = 0 = f'(l). Once again this forces lambda to be positive, but now f(x) = a cos(rx) where rl is a multiple of pi. Again take l = pi, so r is a positive integer n and f(x) = a cos(nx). The solution for g(t) is unchanged;

u(x,t) = sum_{n=1}^infinity cn e^{n^2 t} cos(nt). (***)

Taking t = 0 we see that cn is the Fourier coefficient an of the boundary value u(x,0) extended to an even periodic function.


Back to Class 37.
Forward to Class 39.
Return to Lecture Summaries.
Return to 18.03 Home Page.