IS241 - Lecture-5 Heat Equations
IS241 - Lecture-5 Heat Equations
∂u ∂2u
= α2 2 , (1)
∂t ∂x
k
where α2 = sρ is called the diffusivity of material of the bar.
The constants k, s and ρ are the conductivity, specific heat capacity and density of
material, respectively.
To solve (1), we use the method of separation of variables as follows:
Let
u(x, t) = X (x)T (t) (2)
be the solution of (1). Differentiating (2) with respect to t, we get
∂u
= XT 0 . (3)
∂t
Differentiation (2) again, this time with respect to x and twice, we get
∂2u
= X 00 T . (4)
∂x 2
Substituting equations (3) and (4) in (1), we get
XT 0 = α2 X 00 T .
X 00 T0
= 2 = k (constant), (5)
X α T
which implies that
X 00 T0
= k and 2 = k
X α T
or
The two equations in (6) are ordinary differential equations whose solutions depend on
the value of k.
Case 1: Let k = 0. Equation (6) becomes
dT d 2X
=0 and = 0.
dt dx 2
Integrating, we get
T 0 + p 2 α2 T = 0 and X 00 + p 2 X = 0. (11)
2 p2 t
u(x, t) = c6 e −α (c7 cos px + c8 sin px) . (14)
Therefore, the three different possible solutions of the heat equation (1) are
u(x, t) = c1 (c2 x + c3 ) ,
2 p2 t
u(x, t) = c3 e α c4 e px + c5 e −px ,
2 p2 t
u(x, t) = c6 e −α (c7 cos px + c8 sin px) .
which simplifies to
2 p2 t
u(x, t) = (A cos px + B sin px)e −α . (15)
This is the correct solution that will be always considered.
∂u ∂2u
Example 1: Solve the equation = α2 2 subject to the boundary conditions
∂t ∂x
u(0, t) = 0, u(l, t) = 0, u(x, 0) = x.
∂u ∂2u
= α2 2 . (16)
∂t ∂x
The boundary conditions are:
(i) u(0, t) = 0 for all t > 0
(ii) u(l, t) = 0 for all t > 0
(iii) u(x, 0) = x for all x in (0, l)
The correct solution for one-dimensional heat equation is
2 p2 t
u(x, t) = (A cos px + B sin px)e −α . (17)
Applying the boundary condition (i) in (17), we get
2P 2t
u(0, t) = Ae −α =0
2P 2t
⇒ A = 0 since e −α 6= 0 for t > 0.
Substituting A = 0 in equation (17), we get
2 p2 t
u(x, t) = B sin(px)e −α . (18)
Applying condition (ii) in Equation (18), we get
2 p2 t
u(l, t) = B sin pl e −α = 0.
2 p2 t
Here B 6= 0, e −α 6= 0, then sin pl = 0. Hence
nπ
pl = nπ ⇒ p= .
l
nπ
Substituting p = in equation (18), we get
l
nπx −α2 n2 π2 t
u(x, t) = B sin e l2 .
l
Thus, the most general solution can be written as
∞
−α2 n2 π 2 t
X nπx
u(x, t) = Bn sin e l2 . (19)
l
n=1
∂u 2
Solution. The correct solution of ∂t = α2 ∂∂xu2 and satisfying the conditions (i) and (ii)
is
∞
α2 n 2 π 2 t
nπx
e−
X
u(x, t) = Bn sin l2 . (23)
l
n=1
Applying condition (iii) in equation (23), we get
∞
X nπx
u(x, 0) = Bn sin = f (x), (24)
l
n=1
where (
x, for 0 < x < 2l ,
f (x) =
l −x for 2l < x < l.
To find Bn expand f (x) in (0, l) in a half-range Fourier sine series. That is
∞
X nπx
f (x) = bn sin . (25)
l
n=1
∂u ∂2u
= α2 2 (28)
∂t ∂x
From this graph, equation of OB is
2Tx
u=
l
and that of AB is
2T
u= (l − x).
l
Therefore, the the boundary conditions are
(i) u(0, t) = 0 for all t > 0,
(ii) u(l, t) = 0 for all t > 0,
(
2Tx
, for 0 < x < l/2,
(iii) u(x, 0) = 2Tl
l (l − x) for l/2 < x < l.
The correct solution of equation (28) subject to conditions (i) and (ii) is
∞
−α2 n2 π 2 t
X nπx
u(x, t) = Bn sin e l2 . (29)
l
n=1
where (
2Tx
f (x) = l , for 0 < x < l/2,
2Tx
l (l − x) for l/2 < x < l.
To find Bn expand f (x) in a half-range Fourier sine series in (0, l). That is
∞
X nπx
f (x) = bn sin . (31)
l
n=1
When a rod is heated at both ends by constant temperature C1◦ and C2◦ , after some
time, the temperature in the rod remains constant, regardless of increase in time t.
u(x) = ax + b (36)
u(0) = b = 0.
u(x) = 100x/l.
u(x) = 100x/l.
Now the heat flow equation is
∂u ∂2u
= α2 2 .
∂t ∂x
The new boundary conditions are
(a) u(0, t) = 0, t > 0,
(b) u(l, t) = 0, t > 0,
(c) u(x, 0) = 100x
l for x in (0, l).
∂u 2
The general solution of ∂t = α2 ∂∂xu2 satisfying conditions (a) and (b) is
∞
−α2 n2 π 2 t
X nπx
u(x, t) = Bn sin e l2 . (38)
l
n=1
Now,
Z l
2 100x nπx
Bn = sin dx
l 0 l l
" ( )#l
− cos nπx − nπx
200 l sin l
= 2 x nπ − (+1) n2 π 2
(41)
l l l2 0
200 h 2 cos nπ i
= 2 −l
l nπ
200 n+1
= (−1)
nπ
Substituting Bn into equation (38), we get
∞
200 α2 n 2 π 2 t
nπx
e−
X
u(x, t) = (−1)n+1 sin l2
nπ l
n=1
Temperature Gradient
Consider a bar of uniform cross section of length ‘x’ cm.
Let the two ends of the rod be maintained at temperatures u1 and u2 , where
u1 > u2 .
u1 − u2
The quantity represents the rate of fall of temperature w.r.t distance ‘x’.
x
This rate of change of temperature w.r.t. distance is called the temperature
gradient.
Fourier Law of Heat Conduction
The rate at which heat flows across an area A at a distance x from one end of a
bar is given by
∂u
Q = −kA ,
∂x x
∂u
where k is thermal conductivity, and is the temperature gradient at x.
∂x x
∂u ∂2u
= α2 2 (42)
∂t ∂x
On solving equation (42) by separation of variables and applying condition (ii), we get
2 p2 t
u(x, t) = (A cos px + B sin px)e −α . (43)
Now, condition (iii) can be written as
∂u(0, t) ∂u(l, t)
and .
∂x ∂x
Differentiating equation (43) partially w.r.t. x, we get
∂u(x, t) 2 2
= (−Ap sin px + Bp cos px)e −α p t . (44)
∂x
Applying 1st part of condition (iii) in equation (44), we get
∂u(0, t) 2 2
= Bpe −α p t = 0.
∂x
2P2t
Here p 6= 0 and e −α 6= 0 since t > 0.
⇒ B = 0.
Substituting B = 0 in equation (44), we get
∂u(x, t) 2 2
= −Ap sin pxe −α p t . (45)
∂x
Applying the 2nd part of condition (iii) in equation (45), we get
∂u(l, t) 2 2
= −Ap sin(pl)e −α p t = 0.
∂x
2 p2 t
Here A 6= 0, e −α 6= 0 since t > 0.
nπ
⇒ sin pl = 0 ⇒ pl = nπ ⇒p= .
l
nπ
Now substituting B = 0 and p = l in equation (43), we get
−α2 n2 π 2 t
nπx
u(x, t) = A cos e l2 . (46)
l
By superposition principle, we get the most general solution
∞
−α2 n2 π 2 t
X nπx
u(x, t) = An cos e l2 . (47)
l
n=0
Applying condition (iv) in equation (47), we get
∞
X nπx
u(x, 0) = An cos = lx − x 2
l
n=0
∞
X nπx
A0 + An cos = lx − x 2 . (48)
l
n=1
Z l
2
an = (lx − x 2 ) cos nπdx
l 0
" ( ) ( )#l
sin nπx − cos nπx − sin nπx
2 2 l l l
= (lx − x ) nπ − (l − 2x) n2 π 2
+ (−2) n3 π 3
l l l2 l3 0
" #
2 −l cos nπ l
= n 2 π2 − n2 π 2
l 2 2
l l
−2l 2
= [1 + (−1)n ]
n2 π 2
(
0, when n is odd
an = −4l 2
n2 π 2
when n is even
Therefore,
−4l 2
An = when n is even
n2 π 2
Substituting values of A0 and An in equation (47), we get
∞
−α2 n2 π 2 t
X nπx
u(x, t) = A0 + An cos e l2
l
n=1
∞
l2 X −4l 2 nπx −α2 n2 π2 t
= + cos e l2
6 n2 π 2 l
n(even)=2,4,...
Exercise. Solve the following boundary value problem
1 ∂u ∂2u
(i) 2 =
a ∂t ∂x 2
∂u(0, t)
(ii) =0
∂t
∂u(5, t)
(iii) =0
∂t
(iv) u(x, 0) = x