0% found this document useful (0 votes)
80 views41 pages

IS241 Lecture-4 Partial Differential Equations

Uploaded by

nyakiveridiana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
80 views41 pages

IS241 Lecture-4 Partial Differential Equations

Uploaded by

nyakiveridiana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 41

IS 241: ENGINEERING MATHEMATICS II

Lecture 4: Methods of solution to Partial Differential Equations

December 04, 2023


Solution by direct integration
The simplest form of partial differential equation is such that a solution can be
determined by direct partial integration.

Example 1. Solve the equation

∂2u
= 12x 2 (t + 1)
∂x 2
∂u
given that at x = 0, u = cos 2t and ∂x = sin t.

Solution. Integrating partially with respect to x, we have


∂u
= 4x 3 (t + 1) + ϕ(t)
∂x
where the arbitrary function ϕ(t) takes the place of the normal arbitrary constant in
ordinary integration.
Integrating partially again with respect to x gives

u = x 4 (t + 1) + xϕ(t) + θ(t)

where θ(t) is a second arbitrary function.

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.

Substituting these in the relevant equations gives

ϕ(t) = sin t, and θ(t) = cos 2t

Thus the solution is


u = x 4 (t + 1) + x sin t + cos 2t
Solution by exponential trial
You will remember that an exponential trial solution is often useful when dealing with
ordinary differential equation.

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.

We take a trial solution of the form y = Ae mx+nt .


Then
∂y ∂2y
= nAe mx+nt = n2 Ae mx+nt
∂t ∂t 2
∂y ∂2y
= mAe mx+nt = m2 Ae mx+nt
∂x ∂x 2
Substituting these partial derivatives into (2), gives

n2 Ae mx+nt + 6nAe mx+nt = 4m2 Ae mx+nt

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

The trial solution


y = Ae mx+nt
can also be written as
y = Ae mx e nt
which is the product of a function of x and a function of t, i.e. it is of the form

y = X (x)T (t)

It is often simpler to start with this as a trial solution rather than the more specific
exponential function.

We shall illustrate this by the following example.


Example 2. Use the method of separation of variables to solve the following problem.
∂u ∂u
=2 + u, u(x, 0) = 6e −3x (3)
∂x ∂t
Solution. Let a trial solution be

u = X (x)T (t) = XT (4)

where X is a function of x only and T is a function of t only.

Then differentiating partially with respect to x and t, we get


∂u dX
=T (5)
∂x dx
∂u dX
=X (6)
∂t dt
Substituting equations (4), (5) and (6) into (3), we obtain
 
dX dT
T =X 2 +T (7)
dx dt

Separating the variables, we get


 
1 dX 1 dT
= 2 +T =k (constant), (8)
X dx T dt

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

Substituting these values into (15), we obtain


1
u(x, t) = 6e −3x · e 2 (−3−1)t = 6e −(3x+2t) , (17)

which is the required solution to the given partial differential equation.


Exercise. Find the solution of the partial differential equation

∂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 following assumptions are considered in developing the equation of a vibrating


string:
1 The mass of the string per unit length is constant.
2 The string is perfectly elastic and does not offer any resistance to bending.
3 The action of gravitational force on the string is neglected.
4 The deflection and the slope at every point of the string remain small in absolute
value.
It can be shown that,
∂2u 2
2∂ u T
= a , a2 = , (18)
∂t 2 ∂x 2 ρ
where T is the tension and ρ is the mass per unit length of the string, is called
one-dimensional wave equation.

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).

Differentiating (19) partially w.r.t. x and t, we obtain

∂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 ,

or (by separating variables)

X ′′ T ′′
= 2 = k (constant). (21)
X a T

Equation (21) implies that

X ′′ T ′′
=k and = k, (22)
X a2 T

from which we obtain the following ordinary differential equations:

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:

Case 1: k is positive, i.e. k = p 2 (Here k is always +ve).


In this case, (23) and (24) becomes

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,

X (x) = c1 e px + c2 e −px (29)


apt −apt
T (t) = c3 e + c4 e (30)

Substituting (29) and (30) into (19), we get the solution of the wave equation as

u(x, t) = c1 e px + c2 e −px c3 e apt + c4 e −apt ,


 
(31)

where c1 , c2 , c3 and c4 are constants.


Case 2: k is negative, i.e. k = −p 2 (Here k is always -ve).
In this case, (23) and (24) becomes

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,

X (x) = c5 cos px + c6 sin px (36)


T (t) = c7 cos apt + c8 sin apt (37)
Substituting (36) and (37) into (19), we get the solution of the wave equation as

u(x, t) = (c5 cos px + c6 sin px) (c7 cos apt + c8 sin apt) , (38)

where c5 , c6 , c7 and c8 are constants.


Case 3: k = 0.
In this case, (23) and (24) becomes

d 2X
=0 ⇒ X (x) = A1 x + B1
dx 2
and
d 2T
=0 ⇒ T (t) = A2 t + B2 ,
dt 2
respectively. This gives

u(x, t) = (A1 x + B1 ) (A2 t + B2 ) , (39)

where A1 , A2 , B1 , B2 are constants.


Example 3. A string is stretched and fastened to two points x = 0 and x = l apart.
Motion is started by displacing the string into the form u = k(lx − x 2 ) from which it is
released at time t = 0. Find the displacement of any point on the string at a distance
of x from one end at time t.

Solution. The wave equation is given by

∂2u 2
2∂ y
= a .
∂t 2 ∂x 2
This equation has the following solutions (depending on boundary conditions given):

u(x, t) = c1 e px + c2 e −px c3 e apt + c4 e −apt ,


 

u(x, t) = (c1 cos px + c2 sin px) (c3 cos apt + c4 sin apt) ,
u(x, t) = (c1 x + c2 ) (c3 t + c4 ) ,

where ci (i = 1, . . . , 4) is an arbitrary constant.


From the given problem, we have the following conditions:
1 u(0, t) = 0 for all t > 0
2 u(l, t) = 0 for all t > 0
∂u
∂t (x, 0) = 0 (initial velocity is zero)
3

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)

Applying Condition 1 in (40), we get

u(0, t) = c1 (c3 cos apt + c4 sin apt) = 0,

and this implies that

c1 = 0 and c3 cos apt + c4 sin apt ̸= 0.


Substituting c1 = 0 into (40), we get

u(x, t) = c2 sin px (c3 cos apt + c4 sin apt) . (41)

Applying Condition 2 into eqn. (41), we get

u(l, t) = c2 sin pl (c3 cos apt + c4 sin apt) = 0,

which implies that


c3 cos apt + c4 sin apt ̸= 0
since it is defined for all t > 0. It follows that, either c2 = 0 or sin pl = 0.

If we take c2 = 0 while already c1 = 0, we get a trivial solution. Therefore



sin pl = 0 ⇒ pl = nπ ⇒p= , n ∈ Z.
l

Substituting p = l into (41), we get
nπx  nπat nπat 
u(x, t) = c2 sin c3 cos + c4 sin . (42)
l l l
Differentiating (42) with respect to t, we get

∂u(x, t) nπx  c3 nπa nπat c4 nπa nπat 


= c2 sin − sin + cos
∂t l l l l l
Applying Condition 3, we get
∂u(x, 0) nπa nπx
= c2 c4 sin = 0.
∂t l l
nπx nπa
Here c2 ̸= 0, and sin ̸= 0 (since it is defined ∀x and ̸= 0 (since all are
l l
constants). Hence, this implies that

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.

Thus, the most general solution can be written as



X nπx nπat
u(x, t) = cn sin cos . (44)
l l
n=1
Applying Condition 4 in (44), we get

X nπx
u(x, 0) = cn sin = k(lx − x 2 ). (45)
l
n=1

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

The one-dimensional heat flow equation is given by

∂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 .

Separating the variables, we get

X ′′ T′
= 2 = k (constant), (52)
X α T
which implies that
X ′′ T′
= k and 2 = k
X α T
or

X ′′ − kX = 0 and T ′ − kα2 T = 0 (53)

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 (t) = c1 and X (x) = c2 x + c3 ,


where c1 , c2 and c3 are arbitrary constants. It follows that the solution of equation
(48) is
u(x, t) = c1 (c2 x + c3 ) (54)
Case 2: Let k be positive, i.e. k = p 2 . The equation (53) becomes
T ′ − p 2 α2 T = 0 and X ′′ − p 2 X = 0.
To solve the o.d.e. T ′ − p 2 α2 T = 0, we apply separation of variables. That is
dT T
= p 2 α2 dt ⇒ log T = α2 p 2 t + log c3 or log = α2 p 2 t,
T c3
which simplifies to
2 p2 t
T (t) = c3 e α . (55)
For the o.d.e. X ′′
− p2X
= 0, we have the corresponding auxiliary equation
2 2
m − p = 0 whose solution is m = ±p. Hence
X (x) = c4 e px + c5 e −px . (56)
Substituting equations (55) and (56) into (49), we get
2 p2 t
u(x, t) = c3 e α c4 e px + c5 e −px .

(57)
Case 3: Let k be negative, i.e. k = −p 2 . Then, equation (53) becomes

T ′ + p 2 α2 T = 0 and X ′′ + p 2 X = 0. (58)

The solution to ordinary differential equation T ′ + p 2 α2 T = 0 is also obtained by the


method of separation of variables.
dT T
= −p 2 α2 dt ⇒ log T = −α2 p 2 t + log c6 or log = −α2 p 2 t,
T c6
or
2 p2 t
T (t) = c6 e −α . (59)
On the other hand, the equation X ′′ + p 2 X = 0 is solved by using an auxiliary equation
m2 + p 2 = 0 whose roots are m = ±ip.

It follows that, the solution to this o.d.e. is given by

X (x) = c7 cos px + c8 sin px. (60)

Substituting (59) and (60) into (49), we get

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) .

According to the law of Themodynamics, when time t increases, the temperature


u(x, t) will not increase. Therefore, the most correct solution suitable for
one-dimensional heat flow equation (48) is
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.

Solution: The (1-dimensional) heat equation is

∂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

pl = nπ ⇒ p= .
l

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

Applying condition (iii) in equation (66), we get



X nπx
u(x, 0) = Bn sin = x. (67)
l
n=1

To find Bn expand x in (0, l) in a half-range Fourier sine series.



X  nπx 
x= bn sin . (68)
l
n=1
From equations (67) and (68), we get
Bn = bn .
Thus,
Z l
2  nπx 
bn = x sin dx
l 0 l
" ( ) (  )#l
2 − cos nπx
l − sin nπx l
= x nπ − n2 π 2
l l 2 l 0
−2l 2l
= cos nπ = (−1)n+1
nπ nπ
2l
Bn = (−1)n+1 (69)

Substituting equation (69) into equation (66), we get
∞  nπx  α2 n2 π2 t
2l
e − l2 .
X
u(x, t) = (−1)n+1 sin
nπ l
n=1
Exercise

∂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).

You might also like