IS241 Lecture-4 Partial Differential Equations
IS241 Lecture-4 Partial Differential Equations
∂2u
= 12x 2 (t + 1)
∂x 2
∂u
given that at x = 0, u = cos 2t and ∂x = sin t.
u = x 4 (t + 1) + xϕ(t) + θ(t)
To find the two arbitrary functions ϕ(t) and θ(t), we apply the given initial conditions
that at x = 0, ∂u
∂x = sin t and u = cos 2t.
For example, a trial solution of the form y = Ae mx is the basis of auxiliary equation
when solving
d 2y dy
a 2 +b + cy = 0 (1)
dx dx
A similar technique can sometimes be used in solving partial differential equations. We
shall illustrate this by finding a solution for the equation
∂2y ∂y ∂2y
+ 6 = 4 (2)
∂t 2 ∂t ∂x 2
which is analogous to (1) in that it is linear with constant coefficients.
or
n2 + 6n = 4m2
which implies that
1p
m=± n(n + 6)
2
A few possible solutions, obtained by giving different values to n, are
y = Ae 2x+2t y = Ae −2x−8t
y = Ae (3/2)ix−3t y = Ae −(3/2)ix−3t
As the equation (2) is linear with constant coefficients, the sum of any two or more
solutions is also a solution. For example, each of the following is also a solution:
y = A1 e 2x+2t + A2 e −2x−8t
y = A1 e −2x+2t + A2 e −(3/2)ix−3t + A3 e −6t
y = A1 e (3/2)ix−3t + A2 e −(3/2)ix−3t
Solution by separating the variable
y = X (x)T (t)
It is often simpler to start with this as a trial solution rather than the more specific
exponential function.
implying that
1 dX 2 dT
= k and +1=k (9)
X dx T dt
Using the variable separation method, we get
dX dT 1
= k dx and = (k − 1)dt (10)
X T 2
Integrating (10) throughout, we get
1
ln X = kx + ln a and ln T = (k − 1)t + ln b, (11)
2
where a, b are constants, or
X T 1
ln = kx and ln = (k − 1)t (12)
a b 2
In exponential form, (12) is written as
X T 1
= e kx and = e 2 (k−1)t , (13)
a b
or
1
X = ae kx and T = be 2 (k−1)t (14)
Substituting (14) into (4), we get
1
u(x, t) = abe kx · e 2 (k−1)t (15)
Putting t = 0 in (15), we get
u(x, 0) = abe kx (16)
But u(x, 0) = 6e −3x , as the boundary condition says. This implies that
ab = 6; k = −3
∂2y ∂2y
+ =0
∂x 2 ∂t 2
which satisfies the conditions y = sin t when x = 0 for all t, and y → ∞ as x → ∞.
The wave equation
The problem of a vibrating string is to find its deflection u(x, t) at any point x and at
any time t > 0.
The solution of the wave equation (18) is found by the method of separation of
variables. Let
u(x, t) = X (x) · T (t) (19)
be the solution of the given wave equation (18).
∂2u ∂2u d 2X d 2T
= X ′′ T and = XT ′′ , where X ′′ = ; T ′′ = . (20)
∂x 2 ∂t 2 dx 2 dt 2
Substituting (20) into (18), we get
XT ′′ = a2 X ′′ T ,
X ′′ T ′′
= 2 = k (constant). (21)
X a T
X ′′ T ′′
=k and = k, (22)
X a2 T
X ′′ − kX = 0 (23)
′′ 2
T − ka T = 0 (24)
The solutions to o.d.e’s (23) and (24) depend on the values of k. Three cases may
arise:
d 2X
− p2X = 0 (25)
dx 2
d 2T
− p 2 a2 T = 0 (26)
dt 2
The corresponding auxiliary equations are given by
m2 − p 2 = 0 ⇒ m = ±p, (27)
2 2 2
m −a p = 0 ⇒ m = ±ap. (28)
Therefore,
Substituting (29) and (30) into (19), we get the solution of the wave equation as
d 2X
+ p2X = 0 (32)
dx 2
d 2T
+ p 2 a2 T = 0 (33)
dt 2
The corresponding auxiliary equations are given by
m2 + p 2 = 0 ⇒ m = ±ip, (34)
2 2 2
m +a p = 0 ⇒ m = ±iap. (35)
Therefore,
u(x, t) = (c5 cos px + c6 sin px) (c7 cos apt + c8 sin apt) , (38)
d 2X
=0 ⇒ X (x) = A1 x + B1
dx 2
and
d 2T
=0 ⇒ T (t) = A2 t + B2 ,
dt 2
respectively. This gives
∂2u 2
2∂ y
= a .
∂t 2 ∂x 2
This equation has the following solutions (depending on boundary conditions given):
u(x, t) = (c1 cos px + c2 sin px) (c3 cos apt + c4 sin apt) ,
u(x, t) = (c1 x + c2 ) (c3 t + c4 ) ,
4 u(x, 0) = k(lx − x 2 ).
So, the correct solution that satisfies our boundary conditions is given by
u(x, t) = (c1 cos px + c2 sin px) (c3 cos apt + c4 sin apt) . (40)
c4 = 0.
Substituting c4 = 0 into (42), we get
nπx nπat
u(x, t) = c2 c3 sin cos .
l l
or
nπx nπat
u(x, t) = cn sin cos . (43)
l l
Since the wave equation is linear, then any linear combination of solutions of the form
(43) with n = 1, 2, 3, . . . is also a solution of the equation.
To find cn expand k(lx − x 2 ) in a half-range Fourier sine series in the interval (0, l).
That is,
∞
X nπx
f (x) = k(lx − x 2 ) = cn sin (46)
l
n=1
where Z l
2 nπx
cn = f (x) sin dx
l 0 l
Z l
2 nπx
cn = k(lx − x 2 ) sin dx
l 0 l
" ! ! #l
2k cos nπx sin nπx
cos nπx
= (lx − x 2 ) − nπ
l
− (l − 2x) − n π2
2
l
−2 n π3
3
l
l l l2 l3 0
2k 2 cos nπ 2
= − 3 3 + 3 3 3
l n π /l n π /l
4kl 2
= 3π3
(1 − (−1)n )
n
(
0 if n is even,
= 8kl 2
(47)
n3 π 3
if n is odd.
Substituting cn into equation (44), we get
∞
X 8kl 2 nπx nπat
u(x, t) = 3 3
sin cos .
n π l l
n=1,3,5,...
One-Dimensional Heat Flow Equation
∂u ∂2u
= α2 2 , (48)
∂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 (48), we use the method of separation of variables as follows:
Let
u(x, t) = X (x)T (t) (49)
be the solution of (48). Differentiating (49) with respect to t, we get
∂u
= XT ′ . (50)
∂t
Differentiation (49) again, this time with respect to x and twice, we get
∂2u
= X ′′ T . (51)
∂x 2
Substituting equations (50) and (51) in (48), we get
XT ′ = α2 X ′′ T .
X ′′ T′
= 2 = k (constant), (52)
X α T
which implies that
X ′′ T′
= k and 2 = k
X α T
or
The two equations in (53) are ordinary differential equations whose solutions depend
on the value of k.
Case 1: Let k = 0. Equation (53) becomes
dT d 2X
=0 and = 0.
dt dx 2
Integrating, we get
T ′ + p 2 α2 T = 0 and X ′′ + p 2 X = 0. (58)
2 p2 t
u(x, t) = c6 e −α (c7 cos px + c8 sin px) . (61)
Therefore, the three different possible solutions of the heat equation (48) 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 −α . (62)
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 . (63)
∂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 −α . (64)
Applying the boundary condition (i) in (64), we get
2P 2t
u(0, t) = Ae −α =0
2P 2t
⇒ A = 0 since e −α ̸= 0 for t > 0.
Substituting A = 0 in equation (64), we get
2 p2 t
u(x, t) = B sin(px)e −α . (65)
Applying condition (ii) in Equation (65), we get
2 p2 t
u(l, t) = B sin pl e −α = 0.
2 p2 t
Here B ̸= 0, e −α ̸= 0, then sin pl = 0. Hence
nπ
pl = nπ ⇒ p= .
l
nπ
Substituting p = in equation (65), 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 . (66)
l
n=1
∂u ∂2u
1 Find the solution of the equation = α2 2 that satisfies the conditions
∂t ∂x
(i) u(0, t) = 0, t > 0,
(ii) u(l, t) = 0,( t > 0,
x, for 0 < x < 2l ,
(iii) u(x, 0) =
l − x for 2l < x < l.
2 A homogeneous rod of conducting material of length ‘l’ units has ends kept at
zero temperature and the temperature at the center is T and falls uniformly to
zero at the two ends. Find u(x, t).