Separable-variable_method
Separable-variable_method
Richard Feynman
George Temple
7.1 Introduction
The method of separation of variables combined with the principle of super-
position is widely used to solve initial boundary-value problems involving
linear partial differential equations. Usually, the dependent variable u (x, y)
is expressed in the separable form u (x, y) = X (x) Y (y), where X and Y
are functions of x and y respectively. In many cases, the partial differen-
tial equation reduces to two ordinary differential equations for X and Y .
A similar treatment can be applied to equations in three or more indepen-
dent variables. However, the question of separability of a partial differential
equation into two or more ordinary differential equations is by no means a
trivial one. In spite of this question, the method is widely used in finding
solutions of a large class of initial boundary-value problems. This method
232 7 Method of Separation of Variables
of solution is also known as the Fourier method (or the method of eigenfunc-
tion expansion). Thus, the procedure outlined above leads to the important
ideas of eigenvalues, eigenfunctions, and orthogonality, all of which are very
general and powerful for dealing with linear problems. The following exam-
ples illustrate the general nature of this method of solution.
where
∂ (x, y)
̸= 0,
∂ (x∗ , y ∗ )
which when
(i) a = −c is hyperbolic,
(ii) a = 0 or c = 0 is parabolic,
(iii) a = c is elliptic.
We assume a separable solution of (7.2.3) in the form
a X ′′ Y + c XY ′′ + d X ′ Y + e XY ′ + f XY = 0, (7.2.5)
The left side of equation (7.2.7) is a function of x only. The right side
of equation (7.2.7) depends only upon y. Thus, we differentiate equation
(7.2.7) with respect to x to obtain
! "
d X ′′ X′
a1 + a2 + a3 = 0. (7.2.8)
dx X X
X ′′ X′
a1 + a2 + a3 = λ, (7.2.9)
X X
where λ is a separation constant. From equations (7.2.7) and (7.2.9), we
have
Y ′′ Y′
b1 + b2 + b3 = −λ. (7.2.10)
Y Y
We may rewrite equations (7.2.9) and (7.2.10) in the form
a1 X ′′ + a2 X ′ + (a3 − λ) X = 0, (7.2.11)
and
b1 Y ′′ + b2 Y ′ + (b3 + λ) Y = 0. (7.2.12)
Thus, u (x, y) is the solution of equation (7.2.3) if X (x) and Y (y) are
the solutions of the ordinary differential equations (7.2.11) and (7.2.12)
respectively.
If the coefficients in equation (7.2.1) are constant, then the reduction of
equation (7.2.1) to canonical form is no longer necessary. To illustrate this,
we consider the second-order equation
Y ′ + λY = 0, (7.2.18)
# ′′ $′ # $ # ′ $′
X D B X
+ −λ = 0. (7.2.19)
X B A X
where f and g are the initial displacement and initial velocity respectively.
By the method of separation of variables, we assume a solution in the
form
XT ′′ = c2 X ′′ T,
and hence,
X ′′ 1 T ′′
= 2 , (7.3.7)
X c T
whenever XT ̸= 0. Since the left side of equation (7.3.7) is independent of
t and the right side is independent of x, we must have
X ′′ 1 T ′′
= 2 = λ,
X c T
where λ is a separation constant. Thus,
X ′′ − λX = 0, (7.3.8)
T ′′ − λc2 T = 0. (7.3.9)
X (0) = 0. (7.3.10)
X (l) = 0. (7.3.11)
λ > 0, λ = 0, λ < 0.
We see that the determinant of the system (7.3.13) is different from zero.
Consequently, A and B must both be zero, and hence, the general solution
X (x) is identically zero. The solution is trivial and hence, is no interest.
Case 2. λ = 0. Here, the general solution is
X (x) = A + Bx.
A = 0, A + Bl = 0.
or
2
−λn = (nπ/l) . (7.3.14)
For this infinite set of discrete values of λ, the problem has a nontrivial
solution. These values of λn are called the eigenvalues of the problem, and
the functions
sin (nπ/l) x, n = 1, 2, 3, . . .
are the corresponding eigenfunctions.
We note that it is not necessary to consider negative values of n since
The solution of the vibrating string problem is therefore given by the series
(7.3.18) where the coefficients an and bn are determined by the formulae
(7.3.22ab).
We examine the physical significance of the solution (7.3.17) in the
context of the free vibration of a string of length l. The eigenfunctions
% nπx & nπc
un (x, t) = (an cos ωn t + bn sin ωn t) sin , ωn = , (7.3.23)
l l
are called the nth normal modes of vibration or the nth harmonic, and
ωn represent the discrete spectrum of circular (or radian) frequencies or
νn = ω2πn = nc
2l , which are called the angular frequencies. The first harmonic
(n = 1) is called the fundamental harmonic and all other harmonics (n > 1)
are called overtones. The frequency of the fundamental mode is given by
+
πc 1 T∗
ω1 = , ν1 = . (7.3.24)
l 2l ρ
Finally, we can rewrite the solution (7.3.23) of the nth normal modes in
the form
% nπx & # $
nπct
un (x, t) = cn sin cos − εn , (7.3.27)
l l
' 2 (1 % &
2 2
where cn = an + bn and tan εn = abnn .
This solution represents transverse vibrations
' nπx of
( the string at any point
x and at any time t with amplitude cn sin l and circular frequency
ωn = l . This form of the solution enables us to calculate the kinetic and
nπc
where ρ is the line density of the string. Similarly, the total potential energy
(P.E.) is given by
* l# $2
1 ∂un
Vn = P.E. = T ∗ dx. (7.3.29)
2 0 ∂x
where ωn = l .
nπc
7.3 The Vibrating String Problem 241
Similarly,
# $* l
1 ∗ % nπcn &2 2 nπct % nπx &
Vn = T cos − εn cos2 dx
2 l l 0 l
# $
π2 T ∗ 2 2 nπct 1
= (n cn ) cos − εn = ρlωn2 c2n cos2 (ωn t − εn ) . (7.3.31)
4l l 4
Thus, the total energy of the nth normal mode of vibrations is given by
1 2
En = K n + V n = ρl (ωn cn ) = constant. (7.3.32)
4
For a given string oscillating in a normal mode, the total energy is pro-
portional to the square of the circular frequency and to the square of the
amplitude.
Finally, the total energy of the system is given by
∞
) ∞
1 ) 2 2
E= En = ρl ω c , (7.3.33)
n=1
4 n=1 n n
⎧
⎨ hx/a, 0≤x≤a
u (x, 0) = f (x) =
⎩
h (l − x) / (l − a) , a ≤ x ≤ l.
Since g (x) = 0, the coefficients bn are identically equal to zero. The coeffi-
cients an , according to equation (7.3.22a), are given by
* % nπx &
2 l
an = f (x) sin dx
l 0 l
* % nπx & * % nπx &
2 a hx 2 l h (l − x)
= sin dx + sin dx.
l 0 a l l a (l − a) l
Integration and simplification yields
2hl2 1 % nπa &
an = 2 sin .
π a (l − a) n2 l
Thus, the displacement of the plucked string is
2hl2 )∞
1 % nπa & % nπx & % nπc &
u (x, t) = 2 sin sin cos t.
π a (l − a) n=1 n2 l l l
242 7 Method of Separation of Variables
2v0 l3 )∞
1 % nπa & % nπx & % nπc &
u (x, t) = 3 sin sin cos t.
π ca (l − a) n=1 n3 l l l
7.4 Existence and Uniqueness of Solution of the Vibrating String Problem 243
Define
∞
) % nπx &
F (x) = an sin (7.4.4)
n=1
l
and assume that F (x) is the odd periodic extension of f (x), that is,
F (x) = f (x) 0 ≤ x ≤ l
F (−x) = −F (x) for all x
F (x + 2l) = F (x) .
we see that the initial condition u1 (x, 0) = f (x) is satisfied. Thus, equation
(7.3.1) and conditions (7.3.2)–(7.3.3) with g (x) ≡ 0 are satisfied. Since f ′
is continuous in [0, l], F ′ exists and is continuous for all x. Thus, if we
differentiate u1 (x, t) with respect to t, we obtain
∂u1 1
= [−c F ′ (x − ct) + c F ′ (x + ct)] ,
∂t 2
and
∂u1 1
(x, 0) = [−c F ′ (x) + c F ′ (x)] = 0.
∂t 2
We therefore see that initial condition (7.3.3) is also satisfied.
In order to show that u1 (x, t) satisfies the differential equation (7.3.1),
we impose additional restrictions on f . Let f ′′ be continuous on [0, l] and
f ′′ (0) = f ′′ (l) = 0. Then, F ′′ exists and is continuous everywhere, and
therefore,
∂ 2 u1 1
= c2 [F ′′ (x − ct) + F ′′ (x + ct)] ,
∂t 2 2
2
∂ u1 1
= [F ′′ (x − ct) + F ′′ (x + ct)] .
∂x 2 2
We find therefore that
∂ 2 u1 2
2 ∂ u1
= c .
∂t2 ∂x2
Next, we shall state the assumptions which must be imposed on g to
make u2 (x, t) the solution of problem (7.3.1)–(7.3.5) with f (x) ≡ 0. Let g
7.4 Existence and Uniqueness of Solution of the Vibrating String Problem 245
and g ′ be continuous on [0, l] and let g (0) = g (l) = 0. Then the series for
the function g (x) given by (7.3.21) converges absolutely and uniformly in
the interval [0, l]. Introducing the new coefficients cn = (nπc/l) bn , we have
# $) ∞ % nπc & % nπx &
l cn
u2 (x, t) = sin t sin . (7.4.6)
πc n=1 n l l
These series are absolutely and uniformly convergent because of the as-
sumptions on g, and hence, the series (7.4.6) and (7.4.7) converge absolutely
and uniformly on [0, l]. Thus, the term-by-term differentiation is justified.
Let
)∞ % nπx &
G (x) = cn sin
n=1
l
be the odd periodic extension of the function g (x). Then, equation (7.4.8)
can be written in the form
∂u2 1
= [G (x − ct) + G (x + ct)] .
∂t 2
Integration yields
* *
1 t 1 t
u2 (x, t) = G (x − ct ) dt +
′ ′
G (x + ct′ ) dt′
2 0 2 0
* x+ct
1
= G (τ ) dτ. (7.4.9)
2c x−ct
It immediately follows that u2 (x, 0) = 0, and
∂u2
(x, 0) = G (x) = g (x) , 0 ≤ x ≤ l.
∂t
Moreover,
* *
1 t
1 t
u2 (0, t) = G (−ct ) dt +
′ ′
G (ct′ ) dt′
2 0 2 0
* t * t
1 1
=− G (ct′ ) dt′ + G (ct′ ) dt′ = 0
2 0 2 0
246 7 Method of Separation of Variables
and
* *
1 t 1 t
u2 (l, t) = G (l − ct ) dt +
′ ′
G (l + ct′ ) dt′
2 0 2 0
* *
1 t 1 t
= G (−l − ct ) dt +
′ ′
G (l + ct′ ) dt′
2 0 2 0
* *
1 t 1 t
=− G (l + ct ) dt +
′ ′
G (l + ct′ ) dt′ = 0.
2 0 2 0
Finally, u2 (x, t) must satisfy the differential equation. Since g ′ is continuous
on [0, l], G′ exists so that
∂ 2 u2 c
= [−G′ (x − ct) + G′ (x + ct)] .
∂t 2 2
Differentiating u2 (x, t) represented by equation (7.4.6) with respect to x,
we obtain
∂u2 1)
∞ % nπc & % nπx &
= cn sin t cos
∂x c n=1 l l
1 ) , -
∞
nπ nπ
= cn − sin (x − ct) + sin (x + ct)
2c n=1 l l
1
= [−G (x − ct) + G (x + ct)] .
2c
Differentiating again with respect to x, we obtain
∂ 2 u2 1
= [−G′ (x − ct) + G′ (x + ct)] .
∂x 2 2c
It is quite evident that
∂ 2 u2 2
2 ∂ u2
= c .
∂t2 ∂x2
Thus, the solution of the initial boundary-value problem (7.3.1)–(7.3.5) is
established.
Theorem 7.4.2. (Uniqueness Theorem) There exists at most one so-
lution of the wave equation
utt = c2 uxx , 0 < x < l, t > 0,
satisfying the initial conditions
u (x, 0) = f (x) , ut (x, 0) = g (x) , 0 ≤ x ≤ l,
and the boundary conditions
u (0, t) = 0, u (l, t) = 0, t ≥ 0,
where u (x, t) is a twice continuously differentiable function with respect to
both x and t.
7.4 Existence and Uniqueness of Solution of the Vibrating String Problem 247
Proof. Suppose that there are two solutions u1 and u2 and let v = u1 −u2 .
It can readily be seen that v (x, t) is the solution of the problem
which physically represents the total energy of the vibrating string at time
t.
Since the function v (x, t) is twice continuously differentiable, we differ-
entiate E (t) with respect to t. Thus,
* l
dE ' (
= c2 vx vxt + vt vtt dx. (7.4.11)
dt 0
dE
=0
dt
which means
E (t) = constant = C.
This implies that E (t) = 0 which can happen only when vx = 0 and vt = 0
for t > 0. To satisfy both of these conditions, we must have v (x, t) =
constant. Employing the condition v (x, 0) = 0, we then find v (x, t) = 0.
Therefore, u1 (x, t) = u2 (x, t) and the solution u (x, t) is unique.
XT ′ = kX ′′ T.
Thus, we have
X ′′ T′
= = −α2 ,
X kT
where α is a positive constant. Hence, X and T must satisfy
X ′′ + α2 X = 0, (7.5.2)
T ′ + α2 kT = 0. (7.5.3)
Thus,
X (0) = 0, X (l) = 0,
7.5 The Heat Conduction Problem 249
for an arbitrary function T (t). Hence, we must solve the eigenvalue problem
X ′′ + α2 X = 0,
X (0) = 0, X (l) = 0.
X (l) = B sin αl = 0.
sin αl = 0.
Thus,
nπ
α= for n = 1, 2, 3 . . . .
l
Substituting these eigenvalues, we have
% nπx &
Xn (x) = Bn sin .
l
Next, we consider equation (7.5.3), namely,
T ′ + α2 kT = 0,
Hence, the nontrivial solution of the heat equation which satisfies the two
boundary conditions is
2
% nπx &
un (x, t) = Xn (x) Tn (t) = an e−(nπ/l) kt sin , n = 1, 2, 3 . . . ,
l
where an = Bn Cn is an arbitrary constant.
By the principle of superposition, we obtain a formal series solution as
∞
)
u (x, t) = un (x, t) ,
n=1
)∞ % nπx &
−(nπ/l)2 kt
= an e sin , (7.5.4)
n=1
l
250 7 Method of Separation of Variables
This holds true if f (x) can be represented by a Fourier sine series with
Fourier coefficients
* % nπx &
2 l
an = f (x) sin dx. (7.5.5)
l 0 l
Hence,
3 * 4
)∞
2 l % nπτ & % nπx &
−(nπ/l)2 kt
u (x, t) = f (τ ) sin dτ e sin (7.5.6)
n=1
l 0 l l
(b) Suppose the temperature at one end of the rod is held constant, that
is,
u (l, t) = u0 , t ≥ 0.
Let
u0 x
u (x, t) = v (x, t) + .
l
Substitution of u (x, t) in equations (7.5.7) yields
We note that
5 % &2 % &55 % &2
5
5−an nπ k e−(nπ/l)2 kt sin nπx 5 ≤ C nπ k e−(nπ/l)2 kt0
5 l l 5 l
, -
2 2
when t ≥ t0 , and the series of terms C (nπ/l) k exp − (nπ/l) kt0 con-
verges by the ratio test. Hence, equation (7.6.1) is uniformly convergent in
the region 0 ≤ x ≤ l, t ≥ t0 . In a similar manner, the series (7.5.4) can be
differentiated twice with respect to x, and as a result
∞
) % nπ &2 % nπx &
−(nπ/l)2 kt
uxx = − an e sin . (7.6.2)
n=1
l l
252 7 Method of Separation of Variables
ut = k uxx .
u (0, t) = 0, u (l, t) = 0,
u (x, 0) = f (x) , 0 ≤ x ≤ l.
Under the assumptions stated earlier, the series for f (x) given by
∞
) % nπx &
f (x) = an sin
n=1
l
u (x, 0) = f (x) , 0 ≤ x ≤ l,
u (0, t) = 0, u (l, t) = 0, t ≥ 0,
Proof. Suppose that there are two distinct solutions u1 (x, t) and u2 (x, t).
Let
Then,
J (t) ≤ 0.
J (t) ≥ 0.
Hence,
J (t) = 0, for t ≥ 0.
v (x, t) = 0
Let u (x, y) = X (x) Y (y). Substitution of this into the Laplace equation
yields
X ′′ − λX = 0, Y ′′ + λX = 0.
X ′′ + α2 X = 0,
X ′ (0) = X ′ (a) = 0.
The solution is
where u (x, t) is the displacement and a is the physical constant. Note that
the equation is of the fourth order in x. Let the initial and boundary con-
ditions be
u (x, 0) = f (x) , 0 ≤ x ≤ l,
ut (x, 0) = g (x) , 0 ≤ x ≤ l,
u (0, t) = u (l, t) = 0, t > 0, (7.7.1)
uxx (0, t) = uxx (l, t) = 0, t > 0.
The boundary conditions represent the beam being simple supported, that
is, the displacements and the bending moments at the ends are zero.
Assume a nontrivial solution in the form
T ′′ + a2 α4 T = 0, X (iv) − α4 X = 0, α > 0.
X ′′ (x) = Aα2 cosh αx + Bα2 sinh αx − Cα2 cos αx − Dα2 sin αx.
A + C = 0, α2 (A − C) = 0,
and hence,
A = C = 0.
B sinh αl + D sin αl = 0,
B sinh αl − D sin αl = 0.
7.7 The Laplace and Beam Equations 257
and hence,
# $2 * % nπx &
2 l l
bn = g (x) sin dx. (7.7.4)
al nπ 0 l
Thus, the solution of the initial boundary-value problem is given by equa-
tions (7.7.2)–(7.7.4).
258 7 Method of Separation of Variables
Now v (x, t) can be solved easily since U (x) is known. It can be seen that
* l! * "
x x 1 η
U (x) = A + (B − A) + F (ξ) dξ dη
l l 0 c2 0
* x! * η "
1
− F (ξ) dξ dη.
0 c2 0
c2 Uxx + h = 0,
U (0) = 0, U (l) = 0,
is
h ' 2
(
U (x) = lx − x .
2c2
The function v (x, t) must satisfy
vtt = c2 vxx ,
h ' (
v (x, 0) = − 2 lx − x2 , vt (x, 0) = 0,
2c
v (0, t) = 0, v (l, t) = 0.
The solution of the given initial boundary-value problem is, therefore, given
by
260 7 Method of Separation of Variables
Let us now consider the problem of a finite string with an external force
acting on it. If the ends are fixed, we have
Thus,
* % nπx &
2 l
hn (t) = h (x, t) sin dx. (7.8.8)
l 0 l
We assume that the series (7.8.6) is convergent. We then find utt and
uxx from (7.8.6) and substitution of these values into (7.8.5) yields
)∞
1 ′′ 2 % nπx & ) ∞ % nπx &
2
un (t) + λn un (t) sin = hn (t) sin ,
n=1
l n=1
l
Thus,
* % nπx &
2 l
an = f (x) sin dx. (7.8.11)
l 0 l
Similarly,
∞
) % nπx &
ut (x, 0) = g (x) = bn λn sin .
n=1
l
Thus,
# $* % nπx &
2 l
bn = g (x) sin dx. (7.8.12)
lλn 0 l
)∞ 8
4 n
u (x, t) = 3 3
[1 − (−1) ] cos nπt
n=1
n π
9
2h n
+ 3 3 [1 − (−1) ] (1 − cos nπt) · sin nπx. (7.8.14)
n π
We have treated the initial boundary-value problem with the fixed end
conditions. Problems with other boundary conditions can also be solved in
a similar manner.
We will now consider the initial boundary-value problem with time-
dependent boundary conditions, namely,
This is the same type of problem as the one with homogeneous boundary
condition that has previously been treated.
and
* 1
2 2 n
bn = sin nπx dx = 2 [1 − (−1) ] .
nπ 0 (nπ)
264 7 Method of Separation of Variables
Example 7.8.4. Use the method of separation of variables to derive the Her-
mite equation from the Fokker–Planck equation of nonequilibrium statistical
mechanics
X ′′ + xX ′ + (1 + n) X = 0 and T ′ + n T = 0, (7.8.26ab)
and rescale the independent variable to obtain the Hermite equation for f
in the form
d2 f df
2
− 2ξ + 2nf = 0.
dξ dξ
ξ = x et and u = et v, (7.8.31)
∂v ∂2v
= e2t 2 . (7.8.32)
∂t ∂ξ
∂v ∂2v
= . (7.8.33)
∂τ ∂ξ 2
7.9 Exercises
1. Solve the following initial boundary-value problems:
15. Obtain the solution of each of the following initial boundary-value prob-
lems:
u (x, 0) = x2 (1 − x), 0 ≤ x ≤ 1,
u (0, t) = 0, u (l, t) = 0, t ≥ 0.
u (x, 0) = sin2 x, 0 ≤ x ≤ π,
u (0, t) = 0, u (π, t) = 0, t ≥ 0.
7.9 Exercises 269
u (x, 0) = x, 0 ≤ x ≤ 2,
u (0, t) = 0, ux (2, t) = 1, t ≥ 0.
u (0, t) = 0, u (l, t) = 1, t ≥ 0.
16. Find the temperature distribution in a rod of length l. The faces are
insulated, and the initial temperature distribution is given by x (l − x).
17. Find the temperature distribution in a rod of length π, one end of which
is kept at zero temperature and the other end of which loses heat at
a rate proportional to the temperature at that end x = π. The initial
temperature distribution is given by f (x) = x.
18. The voltage distribution in an electric transmission line is given by
36. Prove the uniqueness theorem for the boundary-value problem involving
the Laplace equation:
(b) Use the above integral inequality from (a) to show that the initial
boundary-value problem for the telegraph equation can have only one
solution.