IX. PDEs in space

## Linear Methods of Applied Mathematics Evans M. Harrell II and James V. Herod

(Some remarks for the instructor).

version of 16 September 2000.

Some of the calculations of this chapter are available in a Maple worksheet or in a Mathematica notebook.

## IX. PDEs in space

Until now we have studied partial differential equations in one space dimension, x. Now we are ready to consider some problems in two or three space dimensions. Fortunately, the technique of separation of variables in more dimensions presents only a few new conceptual issues, and the technical complications are quite manageable.

In three space dimensions the wave equation  has the form: It describes many sorts of waves that move through space, such as acoustic waves in air or another fluid medium, where c is the speed of sound in that medium. It also describes any component of an electromagnetic field in free space if c is the speed of light (see derivation from Clerk Maxwell's equations). The expression on the right is c2 times the Laplacean of u, which is abbreviated u (some texts prefer the notation u). It is sometimes convenient to think of u as the Laplace operator applied to u.

The heat equation in more than one space dimension likewise involves the Laplace operator:

ut = k u.
Both these equations describe how a quantity will change in time - but it might be static. If an electromagnetic field or a temperature is at equilibrium, the time derivatives will be 0, and we are led to the potential equation of Laplace, (9.1)
or, in three dimensions, (9.2)

Laplace's equation arises in many other applications as well. It is the equation which describes the

• displacement of an elastic membrane
• electrostatic potential function
• equilibrium concentration of a suspensate in a still fluid
• and still further physical quantities.

Solutions of Laplace's equation are called harmonic functions.

Let's begin with the two-dimensional Laplace equation on a rectangle

0 < x < a
0 < y < b.
This could arise from the wave equation for a long, rectangular wave-guide, assuming that the electric field is independent of z and static, that is, independent of t; or it might also arise from heat flow in a rectangular solid at equilibrium. In either case we are left with an equation in only two independent variables, x and y. It should thus be no more complicated than the earlier equations in the variables t and x.

Laplace's equation is the prototype of an elliptic equation, with different qualitative properties from either hyperbolic equations (like the wave equation) or parabolic equations (like the heat equation). The auxiliary conditions that are imposed are quite different from those for the wave equation. Specifically, we are normally given boundary conditions on the entire boundary, and are not specially concerned with an "initial" value of either variable x or y. Dirichlet boundary conditions for this problem are typically nonhomogeneous, of the form:

u(0,y) = f1(y)                                     (9.3)
u(a,y) = f2(y)                                     (9.4)
u(x,0) = f3(x)                                     (9.5)
u(x,b) = f4(x)                                     (9.6)
where the four boundary functions are supposed given. In electromagnetic theory, for example, they are determined if the charge is measured on the boundary. In thermodynamics, they are the temperature determined by the temperature at the edge of the rectangle.

Separation of variables works much as it did for the heat equation and the wave equation. As with our earlier equations, we begin with the ansatz that u is a product solution

u(x,y) = X(x) Y(y)
and substitute into Laplace's equation; it is again convenient to divide the result by u. We use first information from the partial differential equation, then the information from homogeneous boundary conditions, and lastly information from inhomogeneous boundary conditions, which are treated much like the initial conditions for the earlier PDE's.

Rather than tackling four non-homogeneous boundary conditions (9.3)-(9.6) all at once, we begin by setting three of the four boundary functions to 0. For definiteness, we also make a specific choice of the fourth while developing the ideas:

Model Problem IX.1. Let us solve Laplace's equation with boundary conditions which are homogeneous on three of the four sides of a rectangle:

u(0,y) = 0          (9.7)
u(1,y) = 1          (9.8)
u(x,0) = 0          (9.9)
u(x,2) = 0.         (9.10)
Solution.

Separation begins much as before, but note that boundary condition (9.8) is not homogeneous, so it is not consistent with the superposition principle. If we add two functions satisfying (9.8), for example, we will get a function with the boundary value 2, not 1, when x = a. As in our earlier solutions by separating variables, let us guess that the solution is a product, u(x,y) = X(x) Y(y), and subsitute into Laplace's equation (9.1). Dividing through by X(x) Y(y), we find that Evidently, if the y-independent quantity X''/X equals the x-independent quantity -Y''/Y, both must be a constant, and we have the familiar ordinary differential equations,

X'' = X
-Y'' = Y
(notice the difference of sign).

A good rule of thumb in this subject is to deal with the most homogeneous boundaries first. It is the variable y which has two homogeneous boundary conditions in this case, and it satisfies essentially the same eigenvalue problem as we have seen in previous chapters: At this stage we can probably recognize the eigenfunctions and eigenvalues as This same constant n enters in to the X equation, but with the other sign. The general solution for X is a linear combination of exp(n x/2) and exp(- n x/2), rather than sines and cosines. There is a better choice for the basis of this solution space, though, namely

Xn(x) = C1 cosh(n x/2) + C2 sinh(n x/2).
One homogeneous boundary condition applies to this function, forcing
Xn(0) = 0.
The Dirichlet boundary condition thus eliminates the hyperbolic cosine, allowing us to normalize the function Xn as
Xn(x) = sinh(n x/2).
For the general solution we get: There is only one boundary condition left, the nonhomogeneous (9.8) at x = 1. Before incorporating it, we make a general linear combination of all the product solutions which are consistent with what we know so far: This is a Fourier sine series in the variable y, with the complication that the coefficients have an extra factor,

bn = cn sinh(n /2).
The series must be matched to the series for the function f2(y) = 1, the coefficients in which can be calculated with the familiar formula. If then the Fourier coefficients are easily calculated as:

bn = 4/(n ) if n is odd, and otherwise 0.
To find cn, now divide by sinh(n /2). The solution becomes It wasn't critical that the function at x=1 was just the constant function; given any other function of y at x=1 as a Fourier sine series, the solution we get would still be of the form: Now let us return to the full problem with boundary conditions (9.3) -(9.6). Don't start over and rederive everything! Use the solution we already obtained as a springboard, as follows.

Let us rename the solution we just obtained for the simplified boundary conditions

u(0,y) = 0
u(a,y) = f2(y)
u(x,0) = 0
u(x,b) = 0,
with only the function f2 different from 0; for future bookkeeping u2 will be better than u: (Notice the a in the denominator, which was fixed as 1 in the model problem.)

Next, suppose that we had the boundary conditions :

u(0,y) = 0
u(a,y) = 0
u(x,0) = 0
u(x,b) = f4.

The only differences here are that f2 becomes f4, a becomes b, and the variables x and y are switched. Thus: (9.11)
As the next piece of the puzzle, suppose that
u(0,y) = f1(y)
u(a,y) = 0
u(x,0) = 0
u(x,b) = 0.
We can get these boundary conditions from our original ones by interchanging x and a-x. Notice that this does not affect the potential equation, because under this change of variable there are two compensating changes of sign in uxx; each time you use the chain rule there is a factor of -1. The answer has to be: (9.12)
Similarly, if
u(0,y) = 0
u(a,y) = 0
u(x,0) = f3(x)
u(x,b) = 0,
then (9.13)
Because of the principle of superposition, the entire solution of the BVP (boundary-value problem) with boundary conditions (9.3)- (9.6) is the sum:
u(x,y) = u1(x,y) + u2(x,y) + u3(x,y) + u4(x,y).

Let us turn our attention now to a fully multidimensional problem. There will be few new concepts, though as we shall see the additional dimensions require some extra book-keeping with several indices to label the pieces of the solution correlating with the various dimensions. We illustrate the topic in a specific example.

Model Problem IX.2. How a mathematician cooks a cube steak. Consider how to cook a steak which is one meter on a side (it is a whale steak) under the following conditions.
boundary conditions : The steak will be put into a preheated oven at temperature 200 C at time t=0.
IC: At time t=0, the steak is pulled directly from the freezer (u(0, x,y,z) = 0) and put into the oven for four hours.

We wish to find the temperature throughout the interior of the steak at that time. Since the mathematician shops at a terrible meat market (but doesn't really notice), we may as well assume that the steak has the thermal properties of wood, so that in the heat equation, k = 2500 cm^2/hr.

Solution.

Instead of directly solving for the temperature, let u(t,x,y,z) be the temperature minus 200 C, in order to have homogeneous Dirichlet boundary conditions. With this change, for all t>0 the conditions on the six faces of the cube are

u(t,0,y,z) = 0
u(t,x,0,z) = 0
u(t,x,y,0) = 0
u(t,100,y,z) = 0
u(t,x,100,z) = 0
u(t,x,y,100) = 0,
u(t,x,y,100) = 0,
u(t,x,y,100) = 0,                       (9.14)
while the PDE is the usual heat equation (HE), (HE)
and the initial condition becomes
u(0,x,y,z) = -200
Solution.

Step 1. Construct a general solution by separation of variables.

Suppose as usual that a solution of the heat equation is a product of the form

u(t,x) = T(t) Q(x);
a new feature here is the vector variable x. Plugging into the heat equation and dividing by T Q, we find: We have a multidimensional eigenvalue problem to solve, viz., subject to the Dirichlet boundary conditions (9.14). I inserted the minus sign, as before, because experience teaches me to expect Mu to be positive this way. (It is a matter of book-keeping and not essential.)

How do we solve this equation? Why, by separating variables again, of course! Let

Q(x) = X(x) Y(y) Z(z)

and evaluate The result, after canceling common factors is (9.15)
which is a very curious equation, since any one of the three terms on the right could be isolated on one side of the equation. For instance, if we solve for X''/X, we find
X''(x)/X(x) = (something independent of x).
Similarly for Y''/Y and Z''/Z. The conclusion is that we have three  one-dimensional eigenvalue problems, all precisely like the familiar eigenvalue problem from Chapter 6:
-X'' = 1 X
-Y'' = 2 Y
-Z'' = 3 Z
If we compare with (9.15), we see that = 1 + 2 + 3,
and by this stage we can immediately see that 1 and X are of the form 1 = (m1 /100)2, X(x) = sin(m1 x /100), m1 = 1, 2, ....
Likewise, 2 = (m2 /100)2, Y(y) = sin(m2 y /100), m2 = 1, 2, ...,
and 3 = (m3 /100)2, Z(z) = sin(m3 z /100), m3 = 1, 2, ....
The product solutions thus look like: The general solution is a triple sum: where the multi-indexed constants cm1,m2,m3 can have arbitrary values, subject only to convergence of the series.

Step 2.

The constants will be determined by the initial conditions when we set t=0, obtaining a triple Fourier sine series. In this model problem the coefficients need to satisfy  There are two ways to proceed here. It turns out that the products of three sines compose a complete orthogonal set for the cube, so we could directly evaluate the coefficients by the use of projections in function space. In this case the inner product uses a thre-dimensional integral over the cube.

You may find it more congenial, however, to rely on the usual, one-variable Fourier sine series, as follows. Imagine for the moment that y and z are fixed. What remains is a function of x, and we could use the orthogonality of the functions sin(m1 x/L) to remove the sum over m1:   The point here is that sin(m1 x /100) and sin(n1 x /100) are orthogonal unless m1=n1, so only one term survives from the sum over m1.

If we now multiply by sin(n2 y/100) and integrate from 0 to 100, which will eliminate all but one term in the sum over m2: Finally, let us multiply the result by sin(n3 z /100) and integrate over z: The result of the calculation (see the Maple worksheet or the Mathematica notebook) is Notice that this is 0 unless all three integers nk are odd, in which case it is 64/(n1 n2 n3) 3.

IX.1. Derive solutions (9.11)-(9.13) carefully.

IX.2. Find the solution of Laplace's equation with mixed Dirichlet and Neumann boundary conditions :

u(0,y) = f1(y)
u(a,y) = f2(y)
uy(x,0) = f3(x)
uy(x,b) = f4(x)

Hint: Solve four simpler problems, each of which has three of these functions equal to zero. Then sum the results.

IX.3. Find the solution of Laplace's equationwith the more specific mixed Dirichlet and Neumann boundary conditions :
u(0,y) = y
u(1,y) = 0
uy(x,0) = 0
uy(x,2) = 1

IX.4. Find the specific solution of Model Problem IX.2 by regarding the functions

sin(n1 x /100) sin(n2 y /100) sin(n3 z /100)

directly as an orthonormal set on the cube.

IX.5. Change the boundary conditions of Model Problem IX.2 so that two of the faces of the cube are insulated, i.e., Neumann Dirichlet 9.14) on all six faces (but at coordinates 0 and 1, not 0 and 100).

a) Find the normal modes of vibration.
b) Solve the initial-boundary value problem with initial conditions

u(0,x,y,z) = xyz sin( x)sin( y)sin(2 z)
ut(0,x,y,z) = sin(2 x).