12.1 - The Heat Equation - Mathematics LibreTexts
12.1 - The Heat Equation - Mathematics LibreTexts
where a is a positive constant determined by the thermal properties. This is the heat equation.
u(x, 0) = f (x), 0 ≤ x ≤ L.
We call this the initial condition. We must also specify boundary conditions that u must satisfy at the ends of the bar
for all t > 0. We’ll call this problem an initial-boundary value problem.
We begin with the boundary conditions u(0, t) = u(L, t) = 0, and write the initial-boundary value problem as
2
ut = a uxx , 0 < x < L, t > 0,
u(x, 0) = f (x), 0 ≤ x ≤ L.
Our method of solving this problem is called separation of variables (not to be confused with method of
separation of variables used in Section 2.2 for solving ordinary differential equations). We begin by looking for
functions of the form
2
vt = a vxx if and only if
′ 2 ′′
XT = a X T,
which we rewrite as
′ ′′
T X
= .
2
a T X
Since the expression on the left is independent of x while the one on the right is independent of t , this equation can
hold for all (x, t) only if the two sides equal the same constant, which we call a separation constant, and write it as
−λ ; thus,
′′ ′
X T
= = −λ.
2
X a T
This is equivalent to
′′
X + λX = 0
and
′ 2
T = −a λT . (12.1.2)
Since v(0, t) = X(0)T (t) = 0and v(L, t) = X(L)T (t) = 0 and we don’t want T to be identically zero, X(0) = 0 and
X(L) = 0 . Therefore λ must be an eigenvalue of the boundary value problem
′′
X + λX = 0, X(0) = 0, X(L) = 0, (12.1.3)
and X must be a λ -eigenfunction. From Theorem 11.1.2, the eigenvalues of Equation 12.1.3 are λ n
2 2
= n π /L
2
, with
associated eigenfunctions
nπx
Xn = sin , n = 1, 2, 3, … .
L
Substituting 2
λ = n π /L
2 2
into Equation 12.1.2 yields
′ 2 2 2 2
T = −(n π a / L )T ,
Now let
2 2 2 2
−n π a t/ L
vn (x, t) = Xn (x)Tn (t) = e sin
nπx
, n = 1, 2, 3, …
L
Since
nπx
vn (x, 0) = sin ,
L
vn satisfies Equation 12.1.1 with f (x) = sin nπx/L. More generally, if α 1, … , αm are constants and
m
−n π
2 2 2
a t/ L
2 nπx
um (x, t) = ∑ αn e sin ,
L
n=1
m
nπx
f (x) = ∑ αn sin .
L
n=1
u(x, 0) = f (x), 0 ≤ x ≤ L
is
∞
−n π
2 2 2
a t/ L
2 nπx
u(x, t) = ∑ αn e sin , (12.1.5)
L
n=1
where
∞
nπx
S(x) = ∑ αn sin
L
n=1
with respect to t and twice with respect to x, for t > 0. However, it is not always legitimate to differentiate an
infinite series term by term. The next theorem gives a useful sufficient condition for legitimacy of term by term
differentiation of an infinite series. We omit the proof.
T heorem 12.1.2
W (z) = ∑ wn (z)
n=1
′ ′
W (z) = ∑ wn (z)
n=1
n = 1, 2, 3, … ,
n=1
Mn converges.
Theorem 12.1.2 , applied twice with z = x and once with z = t , shows that u and u can be obtained by xx t
differentiating u term by term if t > 0 (Exercise 12.1.54). Therefore u satisfies the heat equation and the boundary
conditions in Equation 12.1.4 for t > 0. Therefore, since u(x, 0) = S(x) for 0 ≤ x ≤ L , u is an actual solution of
Equation 12.1.4 if and only if S(x) = f (x) for 0 ≤ x ≤ L . From Theorem 11.3.2, this is true if f is continuous and
piecewise smooth on [0, L], and f (0) = f (L) = 0.
In this chapter we’ll define formal solutions of several kinds of problems. When we ask you to solve such
problems, we always mean that you should find a formal solution.
Example 12.1.1
Solution
From Example [example:11.3.6}, the Fourier sine series of f on [0, L] is
3 ∞
12 L 1 nπx
S(x) = ∑ sin
3 3
π n L
n=1
Therefore
3 ∞
12L 1 2 2 2 2
−n π a t/ L
u(x, t) = ∑ e sin
3 3
π n
n=1
nπx
If both ends of bar are insulated so that no heat can pass through them, then the boundary conditions are
u(x, 0) = f (x), 0 ≤ x ≤ L
is
∞
2 2 2 2
−n π a t/ L
u(x, t) = α0 + ∑ αn e cos
n=1
nπx
,
L
where
∞
nπx
C (x) = α0 + ∑ αn cos
L
n=1
L
2 nπx
αn = ∫ f (x) cos dx,
L 0
L
n = 1, 2, 3, … .
Example 12.1.2
Solution
From Example 11.3.1, the Fourier cosine series of f on [0, L] is
∞
L 4L 1
C (x) = − ∑ cos
2 2
2 π (2n − 1)
n=1
(2n − 1)πx
Therefore
L 4L
u(x, t) = −
2
2 π
∞
1 2 2 2 2
−(2n−1 ) π a t/ L
∑ e cos
2
(2n − 1)
n=1
(2n − 1)πx
.
L
We leave it to you (Exercise 12.1.2) to use the method of separation of variables and Theorem 11.1.4 to motivate the
next definition.
u(x, 0) = f (x), 0 ≤ x ≤ L
is
∞
2 2 2 2
−(2n−1 ) π a t/4 L
u(x, t) = ∑ αn e sin
n=1
(2n − 1)πx
,
2L
where
∞
(2n − 1)πx
SM (x) = ∑ αn sin
2L
n=1
Example 12.1.3
Solution
From Example 11.3.4, the mixed Fourier sine series of f on [0, L] is
∞ n
8L (−1)
SM (x) = − ∑ sin
2 2
π (2n − 1)
n=1
(2n − 1)πx
.
2L
Therefore
8L
u(x, t) = −
2
π
∞ n
(−1) 2 2 2 2
−(2n−1 ) π a t/4 L
∑ e sin
2
(2n − 1)
n=1
(2n − 1)πx
.
2L
Figure 12.1.2 shows a graph of u = u(x, t) plotted with respect to x for various values of t . The line y = x
corresponds to t = 0. The other curves correspond to positive values of t . As t increases, the graphs approach
the line u = 0.
Figure 12.1.2
We leave it to you (Exercise 12.1.3) to use the method of separation of variables and Theorem 11.1.5 to motivate the
next definition.
u(x, 0) = f (x), 0 ≤ x ≤ L
is
∞
2 2
2 2
−(2n−1 ) π a t/4 L
u(x, t) = ∑ αn e cos
n=1
(2n − 1)πx
,
2L
where
∞
(2n − 1)πx
CM (x) = ∑ αn cos
2L
n=1
Example 12.1.4
Solution
From Example 11.3.3, the mixed Fourier cosine series of f on [0, L] is
∞
8L 1
CM (x) = − ∑ cos
2 2
π (2n − 1)
n=1
(2n − 1)πx
.
2L
Therefore
8L
u(x, t) = −
2
π
∞
1 −(2n−1 ) π
2 2 2
a t/4 L
2
∑ e cos
2
(2n − 1 )
n=1
(2n − 1)πx
.
2L
Nonhomogeneous Problems
A problem of the form
2
ut = a uxx + h(x), 0 < x < L, t > 0,
u(x, 0) = f (x), 0 ≤ x ≤ L
− q(L), t > 0,
This reduces to
2
vt = a vxx , 0 < x < L, t > 0,
if
2 ′′
a q + h(x) = 0, q(0) = u0 ,
q(L) = uL .
We can obtain q by integrating q = −h/a twice and choosing the constants of integration so that q(0) = u and
′′ 2
0
q(L) = u . Then we can solve Equation 12.1.11 for v by separation of variables, and Equation 12.1.10 is the solution
L
of Equation 12.1.9.
Example 12.1.5
Solve
ut = uxx − 2, 0 < x < 1, t > 0,
3 2
u(x, 0) = x − 2x + 3x − 1,
0 ≤ x ≤ 1.
Solution
We leave it to you to show that
2
q(x) = x +x −1
satisfies
′′
q − 2 = 0, q(0) = −1, q(1) = 1.
Therefore
2
u(x, t) = v(x, t) + x + x − 1,
where
and
3 2 2
v(x, 0) = x − 2x + 3x − 1 − x −x +1
2
= x(x − 3x + 2).
Therefore
12
2
u(x, t) = x +x −1 +
3
π
∞
1 −n π
2 2
t
∑ e sin nπx.
3
n
n=1
A similar procedure works if the boundary conditions in Equation 12.1.11 are replaced by mixed boundary
conditions
Using Technology
Numerical experiments can enhance your understanding of the solutions of initial-boundary value problems. To
be specific, consider the formal solution
∞
2 2 2 2 nπx
−n π a t/ L
u(x, t) = ∑ αn e sin ,
L
n=1
is the Fourier sine series of f on [0, L]. Consider the m-th partial sum
m
−n π
2 2 2
a t/ L
2 nπx
um (x, t) = ∑ αn e sin . (12.1.12)
L
n=1
For several fixed values of t (including t = 0), graph u (x, t) versus t . In some cases it may be useful to graph the
m
curves corresponding to the various values of t on the same axes in other cases you may want to graph the various
curves successively (for increasing values of t ), and create a primitive motion picture on your monitor. Repeat this
experiment for several values of m, to compare how the results depend upon m for small and large values of t .
However, keep in mind that the meanings of “small” and “large” in this case depend upon the constants a and L . A 2 2
where
2 2
π a t
τ = , (12.1.13)
L2
These comments also apply to the situations considered in Definitions 12.1.3 -12.1.5 , except that Equation 12.1.13
should be replaced by
2 2
π a t
τ = ,
2
4L
This page titled 12.1: The Heat Equation is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated
by William F. Trench via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.