4Partial differential equations
IB Methods
4.3 Separation of variables
Unfortunately, the use of complex variables is very special to the case where
Ω ⊆ R
2
. In higher dimensions, we proceed differently.
We let Ω =
{
(
x, y, z
)
∈ R
3
: 0
≤ x ≤ a,
0
≤ y ≤ b, z ≥
0
}
. We want the
following boundary conditions:
ψ(0, y, z) = ψ(a, y, z) = 0
ψ(x, 0, z) = ψ(x, b, z) = 0
lim
z→∞
ψ(x, y, z) = 0
ψ(x, y, 0) = f(x, y),
where
f
is a given function. In other words, we want our function to be
f
when
z = 0 and vanish at the boundaries.
The first step is to look for a solution of ∇
2
ψ(x, y, z) = 0 of the form
ψ(x, y, z) = X(x)Y (y)Z(z).
Then we have
0 = ∇
2
ψ = Y ZX
00
+ XZY
00
+ XY Z
00
= XY Z
X
00
X
+
Y
00
Y
+
Z
00
Z
.
As long as ψ 6= 0, we can divide through by ψ and obtain
X
00
X
+
Y
00
Y
+
Z
00
Z
= 0.
The key point is each term depends on only one of the variables (
x, y, z
). If we
vary, say,
x
, then
Y
00
Y
+
Z
00
Z
does not change. For the total sum to be 0,
X
00
X
must
be constant. So each term has to be separately constant. We can thus write
X
00
= −λX, Y
00
= −µY, Z
00
= (λ + µ)Z.
The signs before λ and µ are there just to make our life easier later on.
We can solve these to obtain
X = a sin
√
λx + b cos
√
λx,
Y = c sin
√
λy + d cos
√
λx,
Z = g exp(
p
λ + µz) + h exp(−
p
λ + µz).
We now impose the homogeneous boundary conditions, i.e. the conditions that
ψ vanishes at the walls and at infinity.
– At x = 0, we need ψ(0, y, z) = 0. So b = 0.
– At x = a, we need ψ(a, y, z) = 0. So λ =
nπ
a
2
.
– At y = 0, we need ψ(x, 0, z) = 0. So d = 0.
– At y = b, we need ψ(x, b, z) = 0. So µ =
mπ
b
2
.
– As z → ∞, ψ(x, y, z) → 0. So g = 0.
Here we have n, m ∈ N.
So we found a solution
ψ(x, y, z) = A
n,m
sin
nπx
a
sin
mπy
b
exp(−s
n,m
z),
where A
n,m
is an arbitrary constant, and
s
2
n,m
=
n
2
a
2
+
m
2
b
2
π
2
.
This obeys the homogeneous boundary conditions for any
n, m ∈ N
but not the
inhomogeneous condition at z = 0.
By linearity, the general solution obeying the homogeneous boundary condi-
tions is
ψ(x, y, z) =
∞
X
n,m=1
A
n,m
sin
nπx
a
sin
mπy
b
exp(−s
n,m
z)
The final step is to impose the inhomogeneous boundary condition
ψ
(
x, y,
0) =
f(x, y). In other words, we need
∞
X
n,m=1
A
n,m
sin
nπx
a
sin
mπy
b
= f(x, y). (†)
The objective is thus to find the A
n,m
coefficients.
We can use the orthogonality relation we’ve previously had:
Z
a
0
sin
kπx
a
sin
nπx
a
dx = δ
k,n
a
2
.
So we multiply (†) by sin
kπx
a
and integrate:
∞
X
n,m=1
A
n,m
Z
a
0
sin
kπx
a
sin
nπx
a
dx sin
mπy
b
=
Z
a
0
sin
kπx
a
f(x, y) dx.
Using the orthogonality relation, we have
a
2
∞
X
m=1
A
k,m
sin
mπy
b
=
Z
a
0
sin
kπx
a
f(x, y) dx.
We can perform the same trick again, and obtain
ab
4
A
k,j
=
Z
[0,a]×[0,b]
sin
kπx
a
sin
jπy
b
f(x, y) dx dy. (∗)
So we found the solution
ψ(x, y, z) =
∞
X
n,m=1
A
n,m
sin
nπx
a
sin
mπy
b
exp(−s
n,m
z)
where
A
m,n
is given by (
∗
). Since we have shown that there is a unique solution
to Laplace’s equation obeying Dirichlet boundary conditions, we’re done.
Note that if we imposed a boundary condition at finite
z
, say 0
≤ z ≤ c
,
then both sets of exponential
exp
(
±
√
λ + µz
) would have contributed. Similarly,
if
ψ
does not vanish at the other boundaries, then the
cos
terms would also
contribute.
In general, to actually find our
ψ
, we have to do the horrible integral for
A
m,n
, and this is not always easy (since integrals are hard). We will just look at
a simple example.
Example. Suppose f(x, y) = 1. Then
A
m,n
=
4
ab
Z
a
0
sin
nπx
a
dx
Z
b
0
sin
mπy
b
dy =
(
16
π
2
mn
n, m both odd
0 otherwise
Hence we have
ψ(x, y, z) =
16
π
2
X
n,m odd
1
nm
sin
nπx
a
sin
mπy
b
exp(−s
m,n
z).