0% found this document useful (0 votes)
6 views

Solution_of_PDE

The document discusses the solution of partial differential equations (PDEs) relevant to various physical phenomena in applied science and engineering. It introduces the classification of second-order PDEs into elliptic, parabolic, and hyperbolic types, and details methods such as the Finite Difference Method for solving these equations, specifically Laplace's and Poisson's equations. Additionally, it provides examples and exercises to illustrate the application of these methods in solving PDEs.

Uploaded by

biasedmoldy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Solution_of_PDE

The document discusses the solution of partial differential equations (PDEs) relevant to various physical phenomena in applied science and engineering. It introduces the classification of second-order PDEs into elliptic, parabolic, and hyperbolic types, and details methods such as the Finite Difference Method for solving these equations, specifically Laplace's and Poisson's equations. Additionally, it provides examples and exercises to illustrate the application of these methods in solving PDEs.

Uploaded by

biasedmoldy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 98

2/27/2025

Solution of Partial Differential


Equations
B. D. Mulmi
November, 2020

1
2/27/2025

Introduction
• Many physical phenomena like vibration of
string, heat flow, fluid flow, electrical
distribution, etc. in applied science and
engineering and described by partial
differential equations(PDEs).
• A differential equation having more than one
independent variables is known as the partial
differential equation.

2
2/27/2025

Introduction
• If we represent the dependent variable is 𝑢 and
the two independent variables as 𝑥 and 𝑦
• A general linear second order PDE is

𝐴 +𝐵 +𝐶 = 𝐹(𝑥, 𝑦, 𝑢, 𝜕𝑥, 𝜕𝑦) …. (1)


𝑖. 𝑒. 𝐴𝑢 + 𝐵𝑢 + 𝐶𝑢 = 𝐹(𝑥, 𝑦, 𝑢, 𝑢 , 𝑢 )

𝐴, 𝐵, & 𝐶 are the function of 𝑥 and 𝑦


3
2/27/2025

Introduction
Equation (1) can be represents

Elliptic if 𝐵 − 4𝐴𝐶 < 0


Parabolic if 𝐵 − 4𝐴𝐶 = 0
Hyperbolic if 𝐵 − 4𝐴𝐶 > 0

4
2/27/2025

Elliptic Equation
a) Laplace’s Equation
b) Poisson’s Equation

5
2/27/2025

Laplace’s Equation
𝜕 𝑢 𝜕 𝑢
+ =0
𝜕𝑥 𝜕𝑦
𝑖. e. 𝑢 + 𝑢 = 0
𝑖. 𝑒. ∇ 𝑢 = 0 - (1)

6
2/27/2025

Poisson’s Equation
𝜕 𝑢 𝜕 𝑢
+ = 𝑓(𝑥, 𝑦)
𝜕𝑥 𝜕𝑦
𝑖. e. 𝑢 + 𝑢 = 𝑓(𝑥, 𝑦)
𝑖. 𝑒. ∇ 𝑢 = 𝑓(𝑥, 𝑦) (2)

7
2/27/2025

Finite Difference Method


𝑢 = 𝑢 𝑥, 𝑦 = 𝑢 𝑥 , 𝑦 =𝑢 , =𝑢,
𝑢
𝜕 𝑢 1
= 𝑢 , − 2𝑢 , + 𝑢 ,
𝜕𝑥 ℎ
𝑦
𝜕 𝑢 1 k
= 𝑢, − 2𝑢 , + 𝑢 ,
𝜕𝑦 𝑘
h
From equation no (1) 𝑥

8
2/27/2025

Laplace’s Equation
𝜕 𝑢 𝜕 𝑢
+ =0
𝜕𝑥 𝜕𝑦
𝑢 , − 2𝑢 , + 𝑢 , + 𝑢, − 2𝑢 , + 𝑢 , =0
……
………

𝑢, = 𝑢 , +𝑢 , +𝑢, +𝑢 , ℎ=𝑘
Standard Five – Point Formula

9
2/27/2025

Laplace’s Equation
𝑢

(i-1,j+1) (i,j+1) (i+1,j+1)

(i-1,j) (i,j) 𝑥 = 𝑥 = 𝑥 + 𝑖ℎ = 𝑖ℎ
(i+1,j)
𝑦 = 𝑦 = 𝑦 + 𝑗ℎ = 𝑗ℎ
(i-1,j-1) 𝑘=ℎ
(i,j-1) (i+1,j-1)

10
2/27/2025

Example
# Solve the Laplace equation 𝑢 + 𝑢 = 0 for the square mesh with
boundary conditions as shown in figure below:
𝑢 60 60 60 60

40 50

20 40

0 10 20 30

11
2/27/2025

Solution
Solution:
Let 𝑢 , 𝑢 , 𝑢 , 𝑢 be the values of 𝑢 at the
interior mesh points.
𝑢 = 𝑢 1,1
𝑢 = 𝑢(2,1)
𝑢 = 𝑢(1,2)
𝑢 = 𝑢(2,2)

12
2/27/2025

Example
The given mesh becomes,
𝑢 60 60 60 60

40 50
𝑢 𝑢

20 40
𝑢 𝑢

0 10 20 30

13
2/27/2025

Example :: Solution
a) Formation of equation using Laplace Standard 5 – point formula. We
have,

1
𝑢, = 𝑢 , +𝑢 , +𝑢, +𝑢, − (1)
4
For 𝑖 = 1 and 𝑗 = 1 in eqn (1). We get,
1
𝑢 , = 𝑢 , +𝑢 , +𝑢 , +𝑢 ,
4
1
𝑢 = 𝑢 + 20 + 𝑢 + 10
4
𝑢 = 𝑢 + 𝑢 + 30 … (2)

14
2/27/2025

Example :: Solution
For 𝑖 = 2 and 𝑗 = 1 in eqn (1). We get,
1
𝑢 = 𝑢 + 20 + 𝑢 + 40
4
𝑢 = 𝑢 + 𝑢 + 60 ……. (3)

For 𝑖 = 1 and 𝑗 = 2 in eqn(1). We get,


1
𝑢 = 𝑢 + 60 + 𝑢 + 40
4
𝑢 = 𝑢 + 𝑢 + 100 … (4)

For 𝑖 = 2 and 𝑗 = 2 in eqn (1). We get,


𝑢 = 𝑢 + 60 + 𝑢 + 50

𝑢 = 𝑢 + 𝑢 + 110 … (5)
15
2/27/2025

Example :: Solution
• 𝑢 = 𝑢 + 𝑢 + 30

• 𝑢 = 𝑢 + 𝑢 + 60

• 𝑢 = 𝑢 + 𝑢 + 100

• 𝑢 = 𝑢 + 𝑢 + 110

16
2/27/2025

Example :: Solution
b) Calculation of initial guesses:

1
𝑢 = 𝑢 + 20 + 𝑢 + 10
4
1
𝑢 = 40 + 20 + 60 + 10
4
1
𝑢 = 130
4
𝑢 = 32.50

17
2/27/2025

Example :: Solution
1
𝑢 = 20 + 20 + 60 + 40
4
𝑢 = 35

1
𝑢 = 10 + 60 + 50 + 40
4
𝑢 = 40

1
𝑢 = 20 + 60 + 40 + 50
4
𝑢 = 42.50

18
2/27/2025

Example :: Solution
Further calculation are shown in the following table
using Gauss – Seidel iteration method.
𝑖 𝒖𝟏 (𝐴) 𝒖𝟐 (𝑩) 𝒖𝟑 (𝑪) 𝒖𝟒 (𝑫)
1 - 35.000 40.000 42.500
2 26.250 32.188 42.188 46.094
3
4
5
6
7
8
𝐻𝑒𝑛𝑐𝑒
19
𝑢 = 26.667 𝑢 = 33.333 𝑢 = 43.333 𝑢 = 46.667
2/27/2025

Example
Solve the equation ∇ 𝑢 = 0 over the square grid
with boundary conditions as shown in the
figure. 0 100 200 100 0

400 400

500 500

400 400

0 100 200 100 0

20
2/27/2025

Solution
𝐶
0 100 200 100 0

400 400
𝑢 𝑢 𝑢

500 500
𝑢 𝑢 𝑢 𝐵
𝐴
400 400
𝑢 𝑢 𝑢

0 100 200 100 0


𝐷
Let 𝑢 , 𝑢 , 𝑢 , … … … 𝑢 denote the values of u at the
different grid points. Since the square mesh is symmetric
about the horizontal line AB and vertical line CD, we have,
21
2/27/2025

Solution
About axis AB,
𝑢 = 𝑢 ,𝑢 = 𝑢 ,𝑢 = 𝑢

About axis CD,


𝑢 = 𝑢 ,𝑢 = 𝑢 ,𝑢 = 𝑢

∴𝑢 =𝑢 =𝑢 =𝑢
Let,
𝑢 = 𝑢 1,1 , 𝑢 = 𝑢 2,1 , 𝑢 = 𝑢 1,2 , 𝑢 = 𝑢(2,2)

22
2/27/2025

Solution
0 100 200 100 0

400 400
𝑢 𝑢 𝑢

500 500
𝑢 𝑢 𝑢
400 400
𝑢 𝑢 𝑢

0 100 200 100 0

23
2/27/2025

Solution
a) Formation of equation using SFPF. We have,
1
𝑢, = 𝑢 , +𝑢 , +𝑢, +𝑢, − (1)
4
For i = 1, j=1 in eqn(1) we get,
1
𝑢 , = 𝑢 , +𝑢 , +𝑢 , +𝑢 ,
4
1
𝑢 = 𝑢 + 400 + 𝑢 + 100
4
𝑢 = 𝑢 + 𝑢 + 500 - (2)
24
2/27/2025

Solution
For i =2 and j = 1 in eqn (1). We get,
1
𝑢 = 𝑢 + 200 + 𝑢 + 𝑢
4
𝑢 = 2𝑢 + 𝑢 + 200 ……. (3)
For i =2, j= 1 in eqn (1) . We get,
1
𝑢 = 𝑢 + 𝑢 + 𝑢 + 500
4
1
𝑢 = (2𝑢 + 𝑢 + 500)
4

Do yourself….

25
2/27/2025

Exercise
A plate of dimension 2.4m x 2.4m is subjected to
temperatures as follows: left side at 750c, right
side at 1000c, upper part at 3000c and lower part
at 500c. If square grid length of 0.8m x 0.8m is
assumed. What will be temperature at the
interior nodes.

A1 = 1 – 4 h =1
A2 = 4 – 14 h =2
A = A1 + A2
26
2/27/2025

Exercise :: Solution
Solution:
Dimension of Plate L = W = 2.4m
Since height and width (Grid)
h = k = 0.8m
Thus, we can divided a plate into m x n grids
where,
m = L/h = 3
n = W/k = 3

27
2/27/2025

Solution
Then the mesh become,
3000

750 𝑡 𝑡 1000

𝑡 𝑡

500

28
2/27/2025

Solution

𝐷𝑜 𝑦𝑜𝑢𝑟𝑠𝑒𝑙𝑓 ⋯ ⋯ ⋯

29
2/27/2025

Poisson’s Equation
𝜕 𝑢 𝜕 𝑢
+ = 𝑓(𝑥, 𝑦)
𝜕𝑥 𝜕𝑦
𝑖. e. 𝑢 + 𝑢 = 𝑓(𝑥, 𝑦)
𝑖. 𝑒. ∇ 𝑢 = 𝑓(𝑥, 𝑦) (2)

30
2/27/2025

Poisson’s Equation
𝜕 𝑢 𝜕 𝑢
+ = 𝑓(𝑥, 𝑦)
𝜕𝑥 𝜕𝑦
𝑖. e. 𝑢 + 𝑢 = 𝑓(𝑥, 𝑦)
𝑖. 𝑒. ∇ 𝑢 = 𝑓(𝑥, 𝑦) (2)

31
2/27/2025

Finite Difference Method


𝜕 𝑢 1
= 𝑢 , − 2𝑢 , + 𝑢 ,
𝜕𝑥 ℎ
𝜕 𝑢 1
= 𝑢, − 2𝑢 , + 𝑢 ,
𝜕𝑦 𝑘
From equation no (2)

32
2/27/2025

Poisson’s Equation
𝜕 𝑢 𝜕 𝑢
+ = 𝑓(𝑥, 𝑦)
𝜕𝑥 𝜕𝑦
𝑢 , − 2𝑢 , + 𝑢 , + 𝑢, − 2𝑢 , + 𝑢 , = 𝑓 𝑖ℎ, 𝑗𝑘
……
………
1
𝑢, = 𝑢 , +𝑢 , +𝑢, +𝑢, − ℎ 𝑓(𝑖ℎ, 𝑗ℎ)
4
ℎ=𝑘
𝐹𝑖𝑣𝑒 – 𝑃𝑜𝑖𝑛𝑡 𝐹𝑜𝑟𝑚𝑢𝑙𝑎
# 𝑊𝑟𝑖𝑡𝑒 𝐷𝑖𝑎𝑔𝑜𝑛𝑎𝑙 𝐹𝑖𝑣𝑒 – 𝑃𝑜𝑖𝑛𝑡 𝐹𝑜𝑟𝑚𝑢𝑙𝑎.
33
2/27/2025

Example
# Solve the equation 𝑢 + 𝑢 = 2𝑥 𝑦 for the square mesh with boundary
conditions as shown in figure below: [Take h = 1]
u 60 60 60 60

40 50

20 40

0 10 20 30

34
2/27/2025

Solution
Solution:
Let 𝑢 , 𝑢 , 𝑢 , 𝑢 be the values of 𝑢 at the interior mesh
points.
𝑢 = 𝑢 1,1
𝑢 = 𝑢(2,1)
𝑢 = 𝑢(1,2)
𝑢 = 𝑢(2,2)
Function:
𝑓 𝑥, 𝑦 = 2𝑥 𝑦
𝑓 𝑖ℎ, 𝑗ℎ = 2 𝑖ℎ ∗ 𝑗ℎ [ℎ = 𝑘]
= 2𝑖 𝑗 [ ℎ = 1]
35
2/27/2025

Example
The given mesh becomes,
u 60 60 60 60

40 50
𝑢 𝑢
20 40
𝑢 𝑢

0 10 20 30

36
2/27/2025

Solution
a) Formation of equation using Poisson Standard 5 – point formula. We have,

1
𝑢, = 𝑢 , +𝑢 , +𝑢, +𝑢, − ℎ 𝑓(𝑖ℎ, 𝑗ℎ)
4
1
𝑢, = 𝑢 , +𝑢 , +𝑢, +𝑢, − 2𝑖 𝑗 − (1)
4
For i =1 and j =1 in eqn (1). We get,
1
𝑢 , = 𝑢 , +𝑢 , +𝑢 , +𝑢 , −2
4
1
𝑢 = 𝑢 + 20 + 𝑢 + 10 − 2
4
𝑢 = 𝑢 + 𝑢 + 28 … (2)

37
2/27/2025

Example :: Solution
For i =2 and j = 1 in eqn (1). We get,
1
𝑢 = 𝑢 + 20 + 𝑢 + 40 − 8
4
𝟏
𝒖𝟐 = 𝟒 𝒖𝟒 + 𝒖𝟏 + 𝟓𝟐 ……. (3)

For i = 1 and j = 2 in eqn(1). We get,


1
𝑢 = 𝑢 + 60 + 𝑢 + 40 − 8
4
𝟏
𝒖𝟑 = 𝒖𝟏 + 𝒖𝟒 + 𝟗𝟐 … (4)
𝟒

For i = 2 and j = 2 in eqn (1). We get,

𝑢 = 𝑢 + 60 + 𝑢 + 50 − 32
𝟏
𝒖𝟒 = 𝒖𝟐 + 𝒖𝟑 + 𝟕𝟖 … (5)
𝟒 38
2/27/2025

Example :: Solution
b) Calculation of initial guesses:
• 𝑢 = 10 + 20 + 60 + 40 − 2
𝑢 = 32
• 𝑢 =
𝑢 = 33
• 𝑢 =
𝑢 = 38
• 𝑢 =
• 𝑢 = = 34.50
39
2/27/2025

Example :: Solution
Further calculation are shown in the following table
using Gauss – Seidel iteration method.
i 𝒖𝟏 (𝐴) 𝒖𝟐 (𝑩) 𝒖𝟑 (𝑪) 𝒖𝟒 (𝑫)
1 - 33 38 34.50
2 24.750 27.813 37.813 35.906
3 23.406 27.828 37.828 35.914
4
5
6
7
8
𝐻𝑒𝑛𝑐𝑒
𝑢 = 23.417, 𝑢 = 27.833, 𝑢 = 37.833, 𝑢 = 35.91640
2/27/2025

Exercise
# Solve the equation ∇ 𝑢 = −10(𝑥 + 𝑦 + 10) over the
square with sides 𝑥 = 0 = 𝑦, 𝑥 = 3 = 𝑦 𝑤𝑖𝑡ℎ 𝑢 = 0 on the
boundary and mesh length = 1
# Solve the Poisson equation 𝑢 + 𝑢 = −81𝑥𝑦,
0 < 𝑥 < 1, 0 < 𝑦 < 1 given that 𝑢 0, 𝑦 = 0, 𝑢 𝑥, 0 =
0, 𝑢 𝑥, 1 = 𝑢 1, 𝑦 = 100 𝑎𝑛𝑑 ℎ = .

# Solve 𝑈 + 𝑈 = 0 for the square mesh bounded by


0 ≤ 𝑥 ≤ 3; 0 ≤ 𝑦 ≤ 3 and the boundary conditions
𝑢 0, 𝑦 = 150, 𝑢 3, 𝑦 = 250, 𝑢 𝑥, 0 = 100, 𝑢 𝑥, 3 =
100; 0 < 𝑥 < 3; 0 ≤ 𝑦 ≤ 3 .Find the values of 𝑢 𝑖, 𝑗

41
2/27/2025

Example
The given mesh becomes,
u 0 100 100 100 (1,1)

0 100
𝑢 𝑢
0 100
𝑢 𝑢

0 0 0 0

42
2/27/2025

PARABOLIC EQUATIONS
• The one – dimensional heat conduction
equation
𝜕𝑢 𝜕 𝑢
=𝑐 − (1)
𝜕𝑡 𝜕𝑥
Is a well – known example parabolic partial
differential equation.

43
2/27/2025

Parabolic Equations
The solution of this equation is temperature
function 𝑢 𝑥, 𝑡 . Which is define for values of 𝑥
from 0 to 𝑙 and for values of time t from 0 to ∞.

44
2/27/2025

Parabolic Equations
𝑅𝑜𝑑
𝑢(𝑥, 𝑡)

𝑢(𝑥, 𝑡)
𝑢(𝑙, 𝑡)

𝑥=0 𝑥=𝑙
𝑥 𝐼𝑛𝑠𝑢𝑙𝑎𝑡𝑖𝑜𝑛

𝐹𝑖𝑔𝑢𝑟𝑒: 𝐻𝑒𝑎𝑡 𝑓𝑙𝑜𝑤 𝑖𝑛 𝑅𝑜𝑑

45
2/27/2025

Parabolic Equations
1. Schmidt Method
Consider a rectangular mesh in the 𝑥 − 𝑡 plane
with spacing ℎ along 𝑥 direction and 𝑘 along
time 𝑡 direction. Denoting a mesh point 𝑥, 𝑡 =
(𝑖ℎ, 𝑗𝑘) as simply 𝑖, 𝑗. We have,

46
2/27/2025

Schmidt Method
𝜕𝑢 𝑢, −𝑢 ,
= 2
𝜕𝑡 𝑘

𝜕 𝑢 𝑢 , − 2𝑢 , + 𝑢 ,
= 3
𝜕𝑥 ℎ

Substituting in eqn (1). We get,

47
2/27/2025

Schmidt Method
𝜕𝑢 𝜕 𝑢
=𝑐
𝜕𝑡 𝜕𝑥

𝑢, −𝑢, 𝑢 , − 2𝑢 , + 𝑢 ,
=𝑐
𝑘 ℎ

𝑘𝑐
𝑢, −𝑢, = 𝑢 , − 2𝑢 , + 𝑢 ,

𝑜𝑟, 𝑢 , −𝑢, =𝛼 𝑢 , − 2𝑢 , + 𝑢 ,
Where,
𝑘𝑐
𝛼= ∶ 𝑖𝑠 𝑡ℎ𝑒 𝑚𝑒𝑠ℎ 𝑟𝑎𝑡𝑖𝑜 𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟.

48
2/27/2025

Schmidt Method
𝑢, = 𝛼𝑢 , + 1 − 2𝛼 𝑢 , + 𝛼𝑢 , − (4)
This is called the Schmidt explicit formula which is
valid only for 0 < 𝛼 ≤ ⁄ .

2. Bender – Schmidt Recurrence Relation


1
𝛼=
2
1
∴ 𝑢, = (𝑢 , + 𝑢 , )
2
49
2/27/2025

Bender – Schmidt Recurrence Relation

(𝑖 − 1, 𝑗 + 1) (𝑖, 𝑗 + 1) (𝑖 + 1, 𝑗 + 1)

(𝑖 − 1, 𝑗) (𝑖, 𝑗) (𝑖 + 1, 𝑗)

𝐴+𝐵
𝐶=
2

50
2/27/2025

Example:
# Solve = boundary condition 𝑢 0, 𝑡 = 0,
𝑢 5, 𝑡 = 0, 𝑢 𝑥, 0 = 𝑥 25 − 𝑥 taking ℎ = 1
upto 3 seconds only. Using Bender – Schmidt
recurrence relation.

51
2/27/2025

Example
Solution:
Given relation:
𝜕𝑢 𝜕 𝑢
= − (1)
𝜕𝑡 𝜕𝑥
ℎ=1
Parabolic equation, we have
𝜕𝑢 𝜕 𝑢
=𝑐 − 2
𝜕𝑡 𝜕𝑥
Comparing eqn (1 and 2)
52
2/27/2025

Example
𝑐 =1
We have,
𝑘𝑐
𝛼= (3)

𝛼= (in Bender – Schmidt )
From eqn(3)
∴ 𝑘 = 0.5

Bender – Schmidt, we have,


1
𝑢, = 𝑢 , +𝑢 , (4)
2
53
2/27/2025

Now,
𝑡 = 0, 𝑡 = 0.5, 𝑡 = 1, 𝑡 = 1.5, 𝑡 = 2, 𝑡 = 2.5, 𝑡 = 3
𝑥 = 0, 𝑥 = 1, 𝑥 = 2, 𝑥 = 3, 𝑥 = 4, 𝑥 = 5
Given boundary condition,
𝒖 𝟎, 𝒕 = 𝟎 𝒖 𝟓, 𝒕 = 𝟎
𝑢 0,0 = 0 𝑢 5,0 = 0
𝑢 0,0.5 = 0 𝑢 5,0.5 = 0
𝑢 0,1 = 0 𝑢 5,1 = 0
𝑢 0,1.5 = 0 𝑢 5,1.5 = 0
𝑢 0,2 = 0 𝑢 5,2 = 0
𝑢 0,2.5 = 0 𝑢 5,2.5 = 0
𝑢 0,3 = 0 𝑢 5,3 = 0

54
2/27/2025

Cont’d…
𝑢 𝑥, 0 = 𝑥 (25 − 𝑥 )

𝑡 = 0, 𝑥 = 0, 𝑢 0,0 = 0 25 − 0 = 0
𝑡 = 0, 𝑥 = 1, 𝑢 1,0 = 1 25 − 1 = 24
𝑡 = 0, 𝑥 = 2, 𝑢 2,0 = 4 25 − 4 = 84
𝑡 = 0, 𝑥 = 3, 𝑢 3,0 = 9 25 − 9 = 144
𝑡 = 0, 𝑥 = 4, 𝑢 4,0 = 16 25 − 16 = 144
𝑡 = 0, 𝑥 = 5, 𝑢 5,0 = 25 25 − 25 = 0
55
2/27/2025

Cont’d…
0 0
0 0
0 0
0 0
0 0
0 0

0 24 84 144 144 0

56
2/27/2025

Example::Solution
The further calculations are shown in the following
table using eqn (4)
𝑥
i 0 1 2 3 4 5
t j
0 0 0 24 84 144 144 0
0.5 1 0 42 84 114 72 0
1.0 2 0 42 78 78 57 0
1.5 3 0 39 60 67.50 39 0
2.0 4 0 30 53.25 49.50 33.75 0
2.5 5 0 ? ? ? ? 0
3.0 6 0 ? ? ? ? 0
57
2/27/2025

Example
𝑇𝑜 𝐶𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒 𝑠𝑒𝑐𝑜𝑛𝑑 𝑟𝑜𝑤,
𝐹𝑜𝑟 𝑖 = 1,2,3,4 𝑎𝑛𝑑 𝑗 = 0 𝑢𝑠𝑖𝑛𝑔 𝑒𝑞𝑛 (4)
1
𝑢, = 𝑢 , +𝑢 ,
2
1
𝑢 , = 𝑢 , +𝑢 ,
2
1
𝑢 , = 0 + 84 = 42
2

58
2/27/2025

Exercise
# Solve the boundary value problem 2𝑢 = 𝑢
under conditions 𝑢 0, 𝑡 = 𝑢 1, 𝑡 = 0 𝑎𝑛𝑑
𝑢 𝑥, 0 = sin 𝜋𝑥, 0 ≤ 𝑥 ≤ 1 using Bender –
Schmidt method. [Take h = 0.2]

59
2/27/2025

CRANK - NICOLSON

𝐶𝑜𝑛𝑠𝑖𝑑𝑒𝑟 𝑡ℎ𝑒 𝑝𝑎𝑟𝑎𝑏𝑜𝑙𝑖𝑐 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛


𝜕𝑢 𝜕 𝑢
=𝑐 … 1
𝜕𝑡 𝜕𝑥
𝜕 𝑢
𝑖𝑠 𝑟𝑒𝑝𝑙𝑎𝑐𝑒𝑑 𝑏𝑦 𝑡ℎ𝑒 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑖𝑡𝑠 𝑓𝑖𝑛𝑖𝑡𝑒
𝜕𝑥
𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛𝑠 𝑜𝑛 𝑡ℎ𝑒 𝑗 𝑎𝑛𝑑 𝑗 + 1 𝑟𝑜𝑤𝑠
𝑖𝑚𝑝𝑙𝑦𝑖𝑛𝑔
𝜕 𝑢 𝑢 , − 2𝑢 , + 𝑢 ,
=
𝜕𝑥 ℎ

𝜕 𝑢 𝑢 , − 2𝑢 , +𝑢 ,
=
𝜕𝑥 ℎ 60
2/27/2025

CRANK - NICOLSON

𝜕 𝑢 1 𝑢 , − 2𝑢 , + 𝑢 , 𝑢 , − 2𝑢 , +𝑢 ,
= ( + )
𝜕𝑥 2 ℎ ℎ

(𝑖 − 1, 𝑗 + 1) (𝑖, 𝑗 + 1) (𝑖 + 1, 𝑗 + 1)

(𝑖 − 1, 𝑗) (𝑖, 𝑗) (𝑖 + 1, 𝑗)

61
2/27/2025

CRANK – NICOLSON
𝜕𝑢 𝑢 , −𝑢,
=
𝜕𝑡 𝑘
𝜕 𝑢 𝜕𝑢
𝑁𝑜𝑤 𝑝𝑢𝑡𝑡𝑖𝑛𝑔 𝑡ℎ𝑖𝑠 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑎𝑛𝑑 𝑖𝑛 𝑒𝑞𝑛 1 . 𝑊𝑒 𝑔𝑒𝑡,
𝜕𝑥 𝜕𝑡
𝜕𝑢 𝜕 𝑢
=𝑐
𝜕𝑡 𝜕𝑥
𝑢, −𝑢, 1 𝑢 , − 2𝑢 , + 𝑢 , 𝑢 , − 2𝑢 , +𝑢 ,
=c ( + )
𝑘 2 ℎ ℎ

62
2/27/2025

CRANK – NICOLSON

𝑘𝑐
2𝑢 , − 2𝑢 , = (𝑢 , − 2𝑢 , + 𝑢 , +𝑢 , − 2𝑢 , +𝑢 , )

𝐿𝑒𝑡,
𝑘𝑐
𝛼=

2𝑢 , − 2𝑢 , = 𝛼 𝑢 , − 2𝑢 , + 𝑢 , +𝑢 , − 2𝑢 , +𝑢 ,

−𝛼𝑢 , + 2𝑢 , 1 + 𝛼 − 𝛼𝑢 , = 𝛼𝑢 , + 2𝑢 , 1 − 𝛼 + 𝛼𝑢 ,

𝑂𝑛 𝑡ℎ𝑒 𝐿𝐻𝑆 𝑜𝑓 𝑡ℎ𝑖𝑠 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 𝑤𝑒 ℎ𝑎𝑣𝑒 𝑡ℎ𝑟𝑒𝑒 𝑢𝑛𝑘𝑛𝑜𝑤𝑛𝑠 𝑤ℎ𝑖𝑙𝑒 𝑜𝑛 𝑅𝐻𝑆 𝑎𝑙𝑙
𝑡ℎ𝑒 𝑡ℎ𝑟𝑒𝑒 𝑎𝑟𝑒 𝑘𝑛𝑜𝑤𝑛. 𝑇ℎ𝑖𝑠 𝑖𝑚𝑝𝑙𝑖𝑐𝑖𝑡 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝑖𝑠 𝑘𝑛𝑜𝑤𝑛 𝑎𝑠 𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛
𝐿𝑒𝑡,
𝛼=1
4𝑢 , =𝑢 , +𝑢 , +𝑢 , +𝑢 , 63
2/27/2025

CRANK – NICOLSON

(𝑖 − 1, 𝑗 + 1) (𝑖, 𝑗 + 1) (𝑖 + 1, 𝑗 + 1)
𝐴 𝐸 𝐵

(𝑖 − 1, 𝑗) (𝑖, 𝑗) (𝑖 + 1, 𝑗)
𝐶 𝐷

1
𝐸= (𝐴 + 𝐵 + 𝐶 + 𝐷)
4

64
2/27/2025

Example:
 𝑈𝑠𝑖𝑛𝑔 𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑠 𝑚𝑒𝑡ℎ𝑜𝑑, 𝑠𝑜𝑙𝑣𝑒 16𝑢 = 𝑢 ,
0 < 𝑥 < 1, 𝑡 > 0 𝑔𝑖𝑣𝑒𝑛 𝑢 𝑥, 0 = 0, 𝑢 0, 𝑡 = 0,
𝑢 1, 𝑡 = 50𝑡. 𝐶𝑜𝑚𝑝𝑢𝑡𝑒 𝑢 𝑓𝑜𝑟 𝑜𝑛𝑒 𝑠𝑡𝑒𝑝 𝑖𝑛 𝑡 𝑑𝑖𝑟𝑒𝑐𝑡𝑖𝑜𝑛,
1
𝑡𝑎𝑘𝑖𝑛𝑔 ℎ = 𝑎𝑛𝑑 𝛼 = 1
4

65
2/27/2025

Example:: Solution
𝑆𝑜𝑙𝑢𝑡𝑖𝑜𝑛:
𝐺𝑖𝑣𝑒𝑛 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛:
𝜕𝑢 𝜕 𝑢
16 = − (1)
𝜕𝑡 𝜕𝑥
1
ℎ=
4
𝑃𝑎𝑟𝑎𝑏𝑜𝑙𝑖𝑐 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛, 𝑤𝑒 ℎ𝑎𝑣𝑒
𝜕𝑢 𝜕 𝑢
=𝑐 − 2
𝜕𝑡 𝜕𝑥
𝐶𝑜𝑚𝑝𝑎𝑟𝑖𝑛𝑔 𝑒𝑞𝑛 (1 𝑎𝑛𝑑 2)

66
2/27/2025

Example:: Solution
1
𝑐 =
16
𝑊𝑒 ℎ𝑎𝑣𝑒,
𝑘𝑐
𝛼= (3)

𝐿𝑒𝑡, 𝛼 = 1
𝐹𝑟𝑜𝑚 𝑒𝑞𝑛(3)
∴𝑘=1
𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑓𝑜𝑟𝑚𝑢𝑙𝑎. 𝑊𝑒 ℎ𝑎𝑣𝑒,
−𝛼𝑢 , + 2𝑢 , 1 + 𝛼 − 𝛼𝑢 , = 𝛼𝑢 , + 2𝑢 , 1 − 𝛼 + 𝛼𝑢 ,

1
𝑢, = 𝑢 , +𝑢 , +𝑢 , +𝑢 , … (4)
4
67
2/27/2025

Example:: Solution
Now,
𝑡 = 0, 𝑡 = 1
𝑥 = 0, 𝑥 = 0.25, 𝑥 = 0.50, 𝑥 = 0.75, 𝑥 = 1
𝐺𝑖𝑣𝑒𝑛 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛,
𝒖 𝒙, 𝟎 = 𝟎 𝒖 𝟎, 𝒕 = 𝟎
𝑢 0,0 = 0 𝒖 𝟎, 𝟏 = 𝟎
𝑢 0.25,0 = 0
𝑢 0.50,0 = 0
𝑢 0.75,0 = 0
𝑢 1,0 = 0

68
2/27/2025

Example:: Solution
𝑢 1, 𝑡 = 50𝑡
𝑡 = 1, 𝑥 = 1, 𝑢 1,1 = 50 ∗ 1 = 50

69
2/27/2025

Example:: Solution
0 50
0
0 0 0 0

70
2/27/2025

Example:: Solution
𝑥
0 0.25 0.50 0.75 1
i 0 1 2 3 4
t j
0 0 0 0 0 0 0
1 1 0 𝑢 𝑢 𝑢 50

71
2/27/2025

Example:: Solution
𝐴𝑝𝑝𝑙𝑦 𝑒𝑞𝑛 4 𝑎𝑡 𝑡ℎ𝑒 𝑚𝑒𝑠ℎ 𝑝𝑜𝑖𝑛𝑡 𝑢 , 𝑢 𝑎𝑛𝑑 𝑢 , 𝑤𝑒 𝑔𝑒𝑡,
1
𝑢 = 0+0+0+𝑢
4
1
𝑢 = 𝑢
4
4𝑢 − 𝑢 = 0 … 5
1
𝑢 = 0+0+𝑢 +𝑢
4
1
𝑢 = 𝑢 +𝑢
4
−𝑢 + 4𝑢 − 𝑢 = 0 … 6
1
𝑢 = 0 + 0 + 𝑢 + 50
4
1
𝑢 = 𝑢 + 50
4
−𝑢 + 4𝑢 = 50 … (7)
72
2/27/2025

Example:: Solution
𝑂𝑛 𝑠𝑜𝑙𝑣𝑖𝑛𝑔 𝑒𝑞𝑛 5, 6, 𝑎𝑛𝑑 7. 𝑊𝑒 𝑔𝑒𝑡,
𝑢 = 0.8929
𝑢 = 3.5714
𝑢 = 13.3929

𝐻𝑒𝑛𝑐𝑒
𝑥
0 0.25 0.50 0.75 1
i 0 1 2 3 4
t j
0 0 0 0 0 0 0
1 1 0 0.8929 3.5714 13.3929 50

73
2/27/2025

Example:
𝜕𝑢 𝜕 𝑢
# 𝑆𝑜𝑙𝑣𝑒 = 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 𝑢 0, 𝑡 = 0,
𝜕𝑡 𝜕𝑥
𝑢 5, 𝑡 = 0, 𝑢 𝑥, 0 = 𝑥 25 − 𝑥 𝑡𝑎𝑘𝑖𝑛𝑔 ℎ = 1 𝑢𝑝𝑡𝑜 2 𝑠𝑒𝑐𝑜𝑛𝑑𝑠
𝑜𝑛𝑙𝑦. 𝑈𝑠𝑖𝑛𝑔 𝐶𝑟𝑎𝑛𝑘 – 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑚𝑒𝑡ℎ𝑜𝑑.

74
2/27/2025

Example
𝑆𝑜𝑙𝑢𝑡𝑖𝑜𝑛:
𝐺𝑖𝑣𝑒𝑛 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛:
𝜕𝑢 𝜕 𝑢
= − (1)
𝜕𝑡 𝜕𝑥
ℎ=1
𝑃𝑎𝑟𝑎𝑏𝑜𝑙𝑖𝑐 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛, 𝑤𝑒 ℎ𝑎𝑣𝑒
𝜕𝑢 𝜕 𝑢
=𝑐 − 2
𝜕𝑡 𝜕𝑥

𝐶𝑜𝑚𝑝𝑎𝑟𝑖𝑛𝑔 𝑒𝑞𝑛 (1 𝑎𝑛𝑑 2)

75
2/27/2025

Example::Solution
𝑐 =1
We have,
𝑘𝑐
𝛼= …… (3)

𝑙𝑒𝑡, 𝛼 = 1

𝐹𝑟𝑜𝑚 𝑒𝑞𝑛 (3)


∴𝑘=1

𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑓𝑜𝑟𝑚𝑢𝑙𝑎. 𝑊𝑒 ℎ𝑎𝑣𝑒,


−𝛼𝑢 , + 2𝑢 , 1 + 𝛼 − 𝛼𝑢 , = 𝛼𝑢 , + 2𝑢 , 1 − 𝛼 + 𝛼𝑢 ,

1
𝑢, = 𝑢 , +𝑢 , +𝑢 , +𝑢 , … (4)
4

76
2/27/2025

Example::Solution
𝑁𝑜𝑤,
𝑡 = 0, 𝑡 = 1, 𝑡 = 2
𝑥 = 0, 𝑥 = 1, 𝑥 = 2, 𝑥 = 3, 𝑥 = 4, 𝑥 = 5

𝐺𝑖𝑣𝑒𝑛 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛,


𝒖 𝟎, 𝒕 = 𝟎 𝒖 𝟓, 𝒕 =𝟎
𝑢 0,0 = 0 𝑢 5,0 =0
𝑢 0,1 = 0 𝑢 5,1 =0
𝑢 0,2 = 0 𝑢 5,2 =0

77
2/27/2025

Example::Solution…
𝑢 𝑥, 0 = 𝑥 (25 − 𝑥 )

𝑡 = 0, 𝑥 = 0, 𝑢 0,0 = 0 25 − 0 = 0
𝑡 = 0, 𝑥 = 1, 𝑢 1,0 = 1 25 − 1 = 24
𝑡 = 0, 𝑥 = 2, 𝑢 2,0 = 4 25 − 4 = 84
𝑡 = 0, 𝑥 = 3, 𝑢 3,0 = 9 25 − 9 = 144
𝑡 = 0, 𝑥 = 4, 𝑢 4,0 = 16 25 − 16 = 144
𝑡 = 0, 𝑥 = 5, 𝑢 5,0 = 25 25 − 25 = 0
78
2/27/2025

Example::Solution
0 0
0 0
0 0
24 84 144 144

79
2/27/2025

Example::Solution

𝑥
i 0 1 2 3 4 5
t j
0 0 0 24 84 144 144 0
1 1 0 𝑢 𝑢 𝑢 𝑢 0
2 2 0 𝑢 𝑢 𝑢 𝑢 0

80
2/27/2025

Example::Solution
𝐴𝑝𝑝𝑙𝑦 𝑒𝑞𝑛 4 𝑎𝑡 𝑡ℎ𝑒 𝑚𝑒𝑠ℎ 𝑝𝑜𝑖𝑛𝑡 𝑢 , 𝑢 , 𝑢 , 𝑎𝑛𝑑 𝑢 . 𝑊𝑒 𝑔𝑒𝑡,
1
𝑢 = 0 + 84 + 0 + 𝑢
4
4𝑢 − 𝑢 = 84 … 5
1
𝑢 = 24 + 144 + 𝑢 + 𝑢
4
−𝑢 + 4𝑢 − 𝑢 = 168 … 6
1
𝑢 = 84 + 144 + 𝑢 + 𝑢
4
−𝑢 + 4𝑢 − 𝑢 = 228 … 7
1
𝑢 = 144 + 0 + 𝑢
4
−𝑢 + 4𝑢 = 144 … 8
81
2/27/2025

Example::Solution
𝑂𝑛 𝑠𝑜𝑙𝑣𝑖𝑛𝑔 𝑒𝑞𝑛 5, 6, 7 𝑎𝑛𝑑 8. 𝑊𝑒 𝑔𝑒𝑡,
𝑢 = 39.6172
𝑢 = 74.4689
𝑢 = 90.2584
𝑢 = 58.5646

𝑁𝑜𝑤, 𝑥
i 0 1 2 3 4 5
t j
0 0 0 24 84 144 144 0
1 1 0 𝑥
39.6172 74.4689 90.2584 58.5646 0
2 2 0 0 𝑢 0.25 𝑢 0.50 𝑢 0.75 𝑢 1 0

82
2/27/2025

Example::Solution
𝐴𝑔𝑎𝑖𝑛, 𝑎𝑝𝑝𝑙𝑦 𝑒𝑞𝑛 4 𝑎𝑡 𝑡ℎ𝑒 𝑚𝑒𝑠ℎ 𝑝𝑜𝑖𝑛𝑡 𝑢 , 𝑢 , 𝑢 , 𝑎𝑛𝑑 𝑢 . 𝑊𝑒 𝑔𝑒𝑡,

𝐷𝑜 𝑦𝑜𝑢𝑟𝑠𝑒𝑙𝑓 … … …

83
2/27/2025

Example::Solution
𝐻𝑒𝑛𝑐𝑒,
𝑥
i 0 1 2 3 4 5
t j
0 0 24 84 144 144 0
1 0 39.6172 74.4689 90.2584 58.5646 0
2 0 ? ? ? ? 0

84
2/27/2025

Exercise

𝜕 𝑢 𝜕𝑢
𝑈𝑠𝑖𝑛𝑔 𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑚𝑒𝑡ℎ𝑜𝑑, 𝑠𝑜𝑙𝑣𝑒 − 16 = 0. 𝐺𝑖𝑣𝑒𝑛 𝑢 𝑥, 0 = 0,
𝜕𝑥 𝜕𝑡
𝑢 0, 𝑡 = 0, 𝑢 1, 𝑡 = 200𝑡. 𝐶𝑜𝑚𝑝𝑢𝑡𝑒 𝑢 𝑓𝑜𝑟 𝑡𝑤𝑜 𝑠𝑡𝑒𝑝 𝑖𝑛 𝑡 𝑑𝑖𝑣𝑖𝑠𝑖𝑜𝑛 ℎ = 0.25
[3.5714,14.2857,53.5714]
𝜕 𝑢 𝜕𝑢
𝑈𝑠𝑖𝑛𝑔 𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑚𝑒𝑡ℎ𝑜𝑑, 𝑠𝑜𝑙𝑣𝑒 − = 0 𝑤𝑖𝑡ℎ 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦
𝜕𝑥 𝜕𝑡
𝑥
𝑢 𝑥, 0 = 0, 𝑢 0, 𝑡 = 0, 𝑢 1, 𝑡 = 16 − 𝑥 . 𝐹𝑖𝑛𝑑 𝑢 , 𝑓𝑜𝑟 𝑖 = 0,1,2,3,4;
3
𝑗 = 0,1,2. 𝑇𝑎𝑘𝑒 ℎ = 1

𝜕 𝑢 𝜕𝑢
𝑆𝑜𝑙𝑣𝑒 𝑏𝑦 𝐶𝑟𝑎𝑛𝑘 − 𝑁𝑖𝑐𝑜𝑙𝑠𝑜𝑛 𝑚𝑒𝑡ℎ𝑜𝑑, − = 0; 0 ≤ 𝑥 ≤ 1 𝑠𝑢𝑏𝑗𝑒𝑐𝑡𝑒𝑑 𝑡𝑜
𝑑𝑥 𝜕𝑡
𝑡ℎ𝑒 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 𝑢 0, 𝑡 = 0, 𝑢 1, 𝑡 = 0, 𝑢 𝑥, 0 = 100𝑥 1 − 𝑥 , 𝑡𝑎𝑘𝑖𝑛𝑔 ℎ = 0.25
𝑓𝑜𝑟 𝑜𝑛𝑒 𝑠𝑡𝑒𝑝. [19.821, 14.286, 19.821]

85
2/27/2025

Hyperbolic Equation
𝜕 𝑢 𝜕 𝑢
𝑐 =𝑇 1
𝜕𝑡 𝜕𝑥
𝑇 – 𝑇ℎ𝑒 𝑡𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑠𝑡𝑟𝑖𝑛𝑔.
𝑐 – 𝑖𝑠 𝑡ℎ𝑒 𝑚𝑎𝑠𝑠 𝑝𝑒𝑟 𝑢𝑛𝑖𝑡 𝑙𝑒𝑛𝑔𝑡ℎ.
𝑢 0, 𝑡 = 0 ≤ 𝑡 ≤ 𝑏
𝑢 𝑙, 𝑡 = 0 ≤ 𝑡 ≤ 𝑏
𝑇𝑤𝑜 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 𝑎𝑟𝑒:

86
2/27/2025

Hyperbolic Equation
𝑢 𝑥, 0 = 𝑢 𝑥 0 ≤ 𝑥 ≤ 𝑎
𝑢 𝑥, 0 = 𝑔 𝑥 0 ≤ 𝑥 ≤ 𝑎

1
𝑢 = 𝑢 , − 2𝑢 , + 𝑢 ,

1
u = 𝑢, − 2𝑢 , + 𝑢 ,
𝑘

87
2/27/2025

Hyperbolic Equation
𝐹𝑟𝑜𝑚 𝑒𝑞𝑛 (1)
𝜕 𝑢 𝜕 𝑢
𝑐 =𝑇
𝜕𝑡 𝜕𝑥

1 1
𝑇 𝑢 , − 2𝑢 , + 𝑢 , =c 𝑢, − 2𝑢 , + 𝑢 ,
ℎ 𝑘
𝑂𝑛 𝑠𝑜𝑙𝑣𝑖𝑛𝑔,
𝑇𝑘 𝑇𝑘
𝑢, = −𝑢 , +2 1− 𝑢, + (𝑢 , +𝑢 , )
𝑐ℎ 𝑐ℎ
𝐼𝑓 𝑤𝑒 𝑐𝑎𝑛 𝑚𝑎𝑘𝑒,
= 1
88
2/27/2025

𝑇ℎ𝑒𝑛 𝑤𝑒 ℎ𝑎𝑣𝑒,
𝑢, =𝑢 , +𝑢 , −𝑢, (2)
𝑢 , = (𝑢 , +𝑢 , ) (3)

(𝑖 − 1, 𝑗 − 1) (𝑖, 𝑗 + 1) (𝑖 + 1, 𝑗 + 1)

(𝑖 − 1, 𝑗) (𝑖, 𝑗) (𝑖 + 1, 𝑗)

(𝑖, 𝑗 − 1)

89
2/27/2025

# 𝑆𝑜𝑙𝑣𝑒 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙𝑙𝑦 𝑡ℎ𝑒 𝑤𝑎𝑣𝑒 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛


𝑢 𝑥, 𝑡 = 4𝑢 𝑥, 𝑡 ; 0 ≤ 𝑥 ≤ 5
𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛𝑠
𝑢 0, 𝑡 = 0 𝑎𝑛𝑑 𝑢 5, 𝑡 = 0
𝑎𝑛𝑑 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑣𝑎𝑙𝑢𝑒𝑠,
𝑢 𝑥, 0 = 𝑓 𝑥 = 𝑥 5 − 𝑥
𝑢 𝑥, 0 = 𝑔 𝑥 = 0
[𝑇𝑎𝑘𝑒 ℎ = 1]

90
2/27/2025

Solution
Hyperbolic equation, we have,
𝜕 𝑢 𝜕 𝑢
𝑐 =𝑇
𝜕𝑡 𝜕𝑥
𝜕 𝑢 𝑇𝜕 𝑢
∴ = 1
𝜕𝑡 𝑐 𝜕𝑥
Given Relation,
𝑢 𝑥, 𝑡 = 4𝑢 𝑥, 𝑡
𝜕 𝑢 𝜕 𝑢
𝑖. 𝑒. =4 (2)
𝜕𝑡 𝜕𝑥
91
2/27/2025

Solution
𝐶𝑜𝑚𝑝𝑎𝑟𝑖𝑛𝑔 𝑒𝑞𝑛 (1) 𝑎𝑛𝑑 (2)
𝑇
=4
𝑐
𝑊𝑒 ℎ𝑎𝑣𝑒,
𝑇𝑘
=1
𝑐ℎ

∴ 𝑘 = 0.5

92
2/27/2025

Solution
𝑊𝑒 ℎ𝑎𝑣𝑒,
𝑢, =𝑢 , +𝑢 , −𝑢, (3)
1
𝑢 , = (𝑢 , +𝑢 , ) (4)
2

𝐺𝑖𝑣𝑒𝑛 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛


𝑢 0, 𝑡 = 𝑡 = 𝑡 = 𝑡 = 𝑡 = 𝑡 = 𝑡 = 0
𝑢 5, 𝑡 = 𝑡 = 𝑡 = 𝑡 = 𝑡 = 𝑡 = 𝑡 = 0

93
2/27/2025

Solution
𝑢 𝑥, 0 =𝑢 0,0 =𝑥 5−𝑥 =0 5−0 =0
𝑢 𝑥, 0 =𝑢 1,0 =𝑥 5−𝑥 =1 5−1 =4
𝑢 𝑥, 0 =𝑢 2,0 =𝑥 5−𝑥 =2 5−2 =6
𝑢 𝑥, 0 =𝑢 3,0 =𝑥 5−𝑥 =3 5−3 =6
𝑢 𝑥, 0 =𝑢 4,0 =𝑥 5−𝑥 =4 5−4 =4
𝑢 𝑥, 0 =𝑢 5,0 =𝑥 5−𝑥 =5 5−5 =0

94
2/27/2025

Solution
𝑇𝑜 𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒 𝑡ℎ𝑒 𝑠𝑒𝑐𝑜𝑛𝑑 𝑟𝑜𝑤, 𝑤𝑒 ℎ𝑎𝑣𝑒,
1
𝑢 , = (𝑢 , +𝑢 , )
2
𝐹𝑜𝑟 𝑖 = 1,2,3,4 𝑗 = 0 𝑖𝑛 𝑒𝑞𝑛 (4). 𝑊𝑒 𝑔𝑒𝑡,
1 1
𝑢 , = (𝑢 , + 𝑢 , ) = 6+0 =3
2 2
1 1
𝑢 , = (𝑢 , + 𝑢 , ) = 6+4 =5
2 2
1 1
𝑢 , = (𝑢 , + 𝑢 , ) = 4+6 =5
2 2
1 1
𝑢 , = (𝑢 , + 𝑢 , ) = 0+6 =3
2 2

95
2/27/2025

Solution
𝑇𝑜 𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒 𝑓𝑜𝑟 𝑟𝑜𝑤 3𝑟𝑑 𝑡𝑜 5𝑡ℎ. 𝑊𝑒 ℎ𝑎𝑣𝑒,
𝑢, =𝑢 , +𝑢 , −𝑢, (4)

𝐹𝑜𝑟 𝑖 = 1,2,3,4 𝑗 = 1 𝑖𝑛 𝑒𝑞𝑛 (4). 𝑊𝑒 𝑔𝑒𝑡,


𝑢 , = (𝑢 , + 𝑢 , − 𝑢 , ) = 1
𝑢 , =2
𝑢 , =2
𝑢 , =1

96
2/27/2025

Example::Solution
𝑇ℎ𝑒 𝑓𝑢𝑟𝑡ℎ𝑒𝑟 𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑠 𝑎𝑟𝑒 𝑠ℎ𝑜𝑤𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑓𝑜𝑙𝑙𝑜𝑤𝑖𝑛𝑔
𝑡𝑎𝑏𝑙𝑒 𝑢𝑠𝑖𝑛𝑔 𝑒𝑞𝑛 (3) 𝑎𝑛𝑑 (4)
𝑥
i 0 1 2 3 4 5
t j
0 0 0 4 6 6 4 0
0.5 1 0 3 5 5 3 0
1.0 2 0 1 2 2 1 0
1.5 3 0 -1 -2 -2 -1 0
2.0 4 0 -3 -5 -5 -3 0
2.5 5 0 -4 -6 -6 -4 0

97
2/27/2025

Exercise
# 𝑆𝑜𝑙𝑣𝑒 𝑡ℎ𝑒 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 𝑢 = 16𝑢 , 𝑇𝑎𝑘𝑖𝑛𝑔 ∆𝑥 = 1 𝑢𝑝𝑡𝑜
𝑡 = 1.25. 𝑇ℎ𝑒 𝑏𝑜𝑢𝑛𝑑𝑎𝑟𝑦 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛𝑠 𝑎𝑟𝑒:
𝑢 0, 𝑡 = 𝑢 5, 𝑡 = 0; 𝑢 𝑥, 0 = 0 𝑎𝑛𝑑 𝑢 𝑥, 0 = 𝑥 (5 − 𝑥);

98

You might also like