Ajiet: Lecture Notes VTU - 21MAT31, Module 4 - Numerical Solution of PDE
Ajiet: Lecture Notes VTU - 21MAT31, Module 4 - Numerical Solution of PDE
Ajiet: Lecture Notes VTU - 21MAT31, Module 4 - Numerical Solution of PDE
Lecture Notes
Prepared By
AJIET, Mangaluru
Module 4
The general second order linear PDE in two independent variables x, y is of the form
1. Parabolic if B 2 − 4AC = 0
Now let us examine the nature of three PDEs which are under our discussion.
PDE A B C B 2 − 4AC Nature of the PDE
One dimensional wave equation: c2 uxx − utt = 0 c2 0 −1 4c2 > 0 Hyperbolic
One dimensional heat equation: c2 uxx − ut = 0 c2 0 0 0 Parabolic
Two dimensional Laplace’s equation: uxx + uyy = 0 1 0 1 −4 < 0 Elliptic
1
Lecture Notes - 21MAT31, Module 4 - Numerical Solution of PDE Page 2
we find that
A = 1, B = 4, C = 4
∴ B 2 − 4AC = (4)2 − 4 × 1 × 4 = 0
So the equation is parabolic.
(ii) Here A = x2 , B = 0, C = 1 − y 2
B 2 − 4AC < 0
∴ B 2 − 4AC = 4y 2 − 4y 2 = 0
Let u = u(x, y) be a function of two independent variables. The finite difference approximation
for the first order partial derivatives: ux , uy and second order partial derivatives: uxx , yyy are as
follows.
∂u u(x + h, y) − u(x, y)
ux = =
∂x h
∂u u(x, y) − u(x − h, y)
ux = =
∂x h
∂u u(x + h, y) − u(x − h, y)
ux = =
∂x 2h
∂u u(x, y + k) − u(x, y)
uy = =
∂y k
∂u u(x, y) − u(x, y − k)
uy = =
∂y k
∂u u(x, y + k) − u(x, y − k)
uy = =
∂y 2k
∂ 2u 1
uxx = = [u(x + h, y) − 2u(x, y) + u(x − h, y)]
∂x2 h2
∂ 2u 1
uyy = = [u(x, y + k) − 2u(x, y) + u(x, y − k)]
∂y 2 k2
IET
4.2 Numerical solution of a PDE
Consider a rectangular region R in the x − y plane. Let us divide this region into a network of
reetangles of sides h and k. In other words, we draw lines x = ih, y = jk; i, j = 1, 2, 3, · · ·
being parallel to the Y - axis and X axis respectively resulting lito a network of rectangles. The
points of intersection of these lines are called mesh points or grid points or pivotal points.
AJ
We write u(x, y) = u(ih, jk) and the finite difference approximation for the partial derivatives
approximation for the partial derivatives given above are put in the following modified form.
1
ux = [ui+1,j − ui,j ]
h
1
ux = [ui,j − ui−1,j ]
h
1
ux = [ui+1,j − ui−1,j ]
2h
1
uy = [ui,j+1 − ui,j ]
k
1
uy = [ui,j − ui,j−1 ]
k
1
uy = [ui,j+1 − ui,j−1 ]
2k
1
uxx = [ui−1,j − 2ui,j + ui+1,j ]
h2
1
uyy = [ui,j−1 − 2ui,j + ui,j+1 ]
k2
IET
4.3 Numerical solution of the Laplace’s equation :
∂ 2u ∂ 2u
+ =0
∂x2 ∂y 2
AJ
We consider a rectangular region R for which u(x, y) is known at the boundary. Let us suppose that
the region is such that it can be divided into a network of square mesh of side h. Then the value of
ui,j at any interior mesh point is given by
1
ui,j = [ui−1,j + ui+1,j + ui,j+1 + ui,j−1 ]
4
This is called the standard five point formula. This shows that the value of ui,j at any interior mesh
point is the average of its values at four neighbouring points to the left, right, above and below.
we repeatedly use the following formula by substituting the latest values available and this procedure
is called Liebmann’s iteration process.
1
IE
ui,j = [ui−1,j+1 + ui+1,j−1 + ui+1,j+1 + ui−1,j−1 ]
4
AJ
This is called the diagonal 5-point formula. This shows that the value of ui,j is the average of its val-
ues at the four neighbouring diagonal mesh points. diagonal 5-point formula serves as a reasonably
good approximation for obtaining the starting values at the mesh points.
4
1
u2 = (17 + 12.5 + 7.4 + 17.3) = 13.55 (Std. formula)
4
1
u4 = (7.4 + 6.2 + 0 + 12.5) = 6.52 (Std. formula)
4
1
u6 = (17.3 + 13.7 + 12.5 + 21) = 16.12 (Std. formula)
4
1
u8 = (12.5 + 12.1 + 6.2 + 13.7) = 11.12 (Std. formula)
4
Now we carry out the iteration process using the Standard formula:
(1)
u3 = (13.64 + 19.7 + 16.12 + 21.9) = 12.84
4
(1) 1
u4 = (0 + 7.79 + 6.15 + 12.5) = 6.61
4
(1) 1
u5 = (6.61 + 13.64 + 11.12 + 16.12) = 11.88
4
(1) 1
u6 = (11.88 + 17.84 + 13.65 + 21) = 16.09
4
(1) 1
u7 = (0 + 6.61 + 8.7 + 11.12) = 6.61
4
(1) 1
u8 = (6.61 + 11.88 + 12.1 + 13.65) = 11.06
4
(1) 1
u9 = (11.06 + 16.09 + 12.8 + 17) = 12.238
4
(2) 1
u1 = (0 + 11.1 + 6.61 + 13.64) = 7.84
4
(2) 1
u2 = (7.84 + 17 + 11.88 + 17.84) = 16.64
4
(2) 1
u3 = (13.64 + 19.7 + 16.09 + 21.9) = 17.83
4
(2) 1
u4 = (0 + 7.84 + 6.61 + 11.88) = 6.58
4
(2) 1
u5 = (6.58 + 13.64 + 11.06 + 16.09) = 11.84
4
(2) 1
u6 = (11.84 + 17.83 + 14.24 + 21) = 16.23
4
(2) 1
u7 = (0 + 6.58 + 8.7 + 11.06) = 6.58
4
(2) 1
u8 = (6.58 + 11.84 + 12.1 + 14.24) = 11.19
4
(2) 1
u9 = (11.19 + 16.23 + 12.8 + 17) = 14.30
4
IET
Third iteration (put n = 2 )
(3) 1
u1 = (0 + 11.1 + 6.58 + 13.64) = 7.83
4
(3) 1
u2 = (7.83 + 17 + 11.84 + 17.83) = 13.637
4
1
AJ
(4)
u3 = (13.63 + 19.7 + 16.23 + 21.9) = 17.86
4
(3) 1
u4 = (0 + 7.83 + 6.58 + 11.84) = 6.56
4
(3) 1
u5 = (6.56 + 13.63 + 11.19 + 16.23) = 11.90
4
(3) 1
u6 = (11.90 + 17.86 + 14.30 + 21) = 16.27
4
(3) 1
u7 = (0 + 6.56 + 8.7 + 11.19) = 6.61
4
(3) 1
u8 = (6.61 + 11.90 + 12.1 + 14.30) = 11.23
4
(3) 1
u9 = (11.23 + 16.27 + 12.8 + 17) = 14.32
4
Similarly,
(4) (4) (4) (4) (4) (4)
u1 = 7.82, u2 = 13.65, u3 = 17.88, u4 = 6.58, u5 = 11.94, u6 = 16.28,
(4) (4) (4)
u7 = 6.63, u8 = 11.25, u9 = 14.33
(5) (5) (5) (5) (5) (5)
u1 = 7.83, u2 = 13.66, u3 = 17.89, u4 = 6.50, u5 = 11.95, u6 = 16.29,
(5) (5) (5)
u7 = 6.64, u8 = 11.25, u9 = 14.34
Problem 3. Given the values of u(x, y) on the boundary of the square in the Fig., evaluate the
function u(x, y) satisfying the Laplace equation ∇2 u = 0 at the pivotal points of this figure.
IET
AJ
(2) 1
u1 = (2000 + 750 + 1000 + 1000) ≈ 1188
4
(2) 1
u2 = (1188 + 500 + 1000 + 438) ≈ 782
4
(2) 1
u3 = (2000 + 438 + 1188 + 500) ≈ 1032
4
(2) 1
u4 = (1032 + 0 + 782 + 0) ≈ 454
4
T
Third iteration: (put n = 2 )
IE
(3) 1
u1 = (2000 + 782 + 1000 + 1032) ≈ 1204
4
(3) 1
u2 = (1204 + 500 + 1000 + 454) ≈ 789
4
AJ
(3) 1
u3 = (2000 + 454 + 1204 + 500) ≈ 1040
4
(3) 1
Similarly, u4 = (1040 + 0 + 789 + 0) ≈ 458
4
(4) (4) (4) (4)
u1 ≈ 1207, u2 ≈ 791, u3 ≈ 1041, u4 = 458
(5) (5) (5) (5)
u1 = 1208, u2 = 791.5, u3 = 1041.5, u4 = 458.25
Thus there is no significant difference between the fourth and fifth iteration values. Hence u1 =
1208, u2 = 792, u3 = 1042 and u4 = 458.
Problem 4. Solve the elliptic equation uxx + uyy = 0 for the square mash of Figure with boundary
values as shown.
Solution. Let u1 , u2 , . . . , u9 be the values of u at the interior mesh-points. Since the boundary
values of u are symmetrical about AB.
T
∴ u7 = u1 , u8 = u2 , u9 = u3 . Also the values of u being symmetrical about CD, u3 = u1 ,
u6 = u4 , u9 = u7 Thus it is sufficient to find the values u1 , u2 , u4 and u5 . Now we find their
IE
initial value in the following order:
1
u5 = (2000 + 2000 + 1000 + 1000) = 1500 (Std. formula)
4
AJ
1
u1 = (0 + 1500 + 1000 + 2000) = 1125 (Diag. formula)
4
1
u2 = (1125 + 1125 + 1000 + 1500) ≈ 1188 (Std. formula)
4
1
u4 = (2000 + 1500 + 1125 + 1125) ≈ 1438 (Std. formula)
4
We carry out the iteration process using the formulae:
(n+1) 1h (n) 1
(n)
i
u1 = 1000 + u2 + 500 + u4
= [1500 + u2 + u4 ]
4 4
(n+1) 1 h (n+1) (n) (n)
i 1
u2 = u1 + u1 + 1000 + u5 = [1000 + 2u1 + u5 ]
4 4
(n+1) 1h (n) (n+1) (n)
i 1
u4 = 2000 + u5 + u1 + u1 = [2000 + 2u1 + u5 ]
4 4
(n+1) 1 h (n+1) (n) (n+1) (n)
i 1
u5 = u4 + u4 + u2 + u2 = [2u2 + 2u4 ]
4 4
iteration u1 = u2 = u4 = u5 =
1 1 1 1
number 4
[1500 + u2 + u4 ] 4
[1000 + 2u1 + u5 ] 4
[2000 + 2u1 + u5 ] 4
[2u2 + 2u4 ]
0 1125 1188 1438 1500
1 1032 1141 1391 1266
2 1088 1069 1321 1195
3 973 1035 1288 1162
4 956 1019 1269 1144
5 947 1010 1260 1135
6 942 1005 1255 1130
7 940 1003 1253 1128
8 939 1002 1252 1127
9 939 1001 1251 1126
Problem 5. Solve ∇2 u = 0 in the square region bounded by the co ordinate axes and the lines
x = 4, y = 4 with the boundary conditions given by the analytical expressions,
(i) u(0, y) = 0 for 0 ≤ y ≤ 4
(ii) u(4, y) = 12 + y for 0 ≤ y ≤ 4
(iii) u(x, 0) = 3x for 0 ≤ x ≤ 4
IET
(iv) u(x, 4) = x2 for 0 ≤ x ≤ 4
Also employ Liebmann’s iteration process to compute the second iterative values of u(x, y) correct
to two decimal places.
2 2
Solution : We have ∇2 u = 0 represented by ∂∂xu2 + ∂∂yu2 = 0 in two dimensions. We shall divide
the square region into 16 squares of side one unit.
AJ
We shall derive the values of u(x, y) on the boundary from the given expressions. (i) u(0, y) =
0⇒
u(0, 1) = 0 = u(0, 2) = u(0, 3) = u(0, 4)
(ii) u(4, y) = 12 + y ⇒ u(4, 0) = 12; u(4, 1) = 13;
We shall represent these values on the square region and let u1 , u2 , · · · u9 be the interior mesh points
of the region.
1
u6 = (6 + 14 + 10 + 9.5) = 9.875
4
1
u8 = (3 + 9.5 + 6 + 6) = 6.125
4
These values are regarded as the initial approximations to commence the Liebmann’s iterative process
for greater accuracy. We compute ui (i = 1 to 9) in the serial order by using the latest iterative value
on hand by applying the standard five point formula only. First iteration
1
u1 = (0 + 5.625 + 1 + 2.875) = 2.375
4
1
u2 = (2.375 + 10 + 4 + 6) = 5.59375
4
1
u3 = (5.59375 + 15 + 9 + 9.875) = 9.8671875
4
1
u4 = (0 + 6 + 2.375 + 3) = 2.84375
4
1
u5 = (2.84375 + 9.875 + 5.59375 + 6.125) = 6.109375
4
1
u6 = (6.109375 + 14 + 9.8671875 + 9.5) = 9.8691406
4
1
u7 = (0 + 6.125 + 2.84375 + 3) = 2.9921875
4
1
u8 = (2.99218i5 + 9.5 + 6.109375 + 6) = 6.1503906
4
1
u9 = (6.1503906 + 13 + 9.8691406 + 9) = 9.5048828
4
Thus we have the first iterative values correct to three decimal places
Second iteration
1
u1 = (0 + 5.594 + 1 + 2.844) = 2.36
IET
4
1
u2 = (2.36 + 9.867 + 4 + 6.109) = 5.584
4
1
u3 = (5.584 + 15 + 9 + 9.869) = 9.863
4
1
u4 = (0 + 6.109 + 2.36 + 2.992) = 2.865
4
AJ
1
u5 = (2.865 + 9.869 + 5.586 + 6.150) = 6.118
4
1
u6 = (6.118 + 14 + 9.864 + 9.506) = 9.872
4
1
u7 = (0 + 6.150 + 2.867 + 3) = 3.004
4
1
u8 = (3.004 + 9.505 + 6.118 + 6) = 6.157
4
1
u9 = (6.157 + 13 + 9.872 + 9) = 9.507
4
1. Solve uxx + uyy = 0 fo the following square mesh with boundary values as shown in the
following figure (Model 2022)
2. Solve uxx + uyy = 0 fo the following square mesh with boundary values as shown in the
following figure (Model 2022)
IET
AJ
3. Solve uxx + uyy = 0 fo the following square mesh with boundary values as shown in the
following figure
4. Solve the elliptic equation uxx + uyy = 0 for the following square mesh with boundary values
as shown. Find the first iterative values of ui (i = 1 to 9) to the nearest integer.
5. Solve uxx + uyy = 0 fo the following square mesh with boundary values as shown in the
following figure
IET
Ans : u1 = 45.825, u2 = 40.4, u3 = 22.9, u4 = 15.825
6. Solve uxx + uyy = 0 fo the following square mesh with boundary values as shown in the
following figure
AJ
have
ui,j+1 = αui−1,j + (1 − 2α)ui,j + αui+1,j
IET
In particular when α = 21 , above formula reduces to
1
ui,j+1 = (ui−1,j + ui+1,j )
2
AJ
Crank-Nicolson method:
Clearly the left side of the above formula (**) contains three unknown values of u at the (j + 1)th
level while all the three values on the right are known values at the jth level.
2
Problem 6. Find the numerical solution of the parabolic equation ∂∂xu2 = 2 ∂u
∂t
when u(0, t) = 0 =
u(4, t) and u(x, 0) = x(4 − x) by taking h = 1 find the values up to t = 5.
Sol : The standard form of the one dimensional heat equation is ut = c2 uxx and the given equation
IET
can be put in the form ut = (1/2)uxx
∴ c2 = 1/2. Since h = 1, k = h2 /2c2 = 1
The values of x in 0 ≤ x ≤ 4 with h = 1 are 0, 1, 2, 3, 4 and the values of t with k = 1 are
0, 1, 2, 3, 4, 5.
We have the following initial table wherein the values in the first and last column are zero since
u(0, t) = 0, u(4, t) = 0
AJ
Consider the initial condition u(x, 0) = x(4 − x) ∴ u1,0 = u(1, 0) = 3; u2,0 = 4; u3,0 = 3
(First row in the table is completed) Now we consider the relation
1
ui,j+1 = [ui−1,j + ui+1,j ]
2
Using this formula for i = 1, 2, 3 and j = 0, 1, 2, 3, 4 we get the following table containing re-
quired values of ui,j
t\x x=0 x=1 x=2 x=3 x=4
t=0 0 3 4 3 0
t=1 0 2 3 2 0
t=2 0 1.5 2 1.5 0
t=3 0 1 1.5 1 0
t=4 0 0.75 1 0.75 0
t=5 0 0.5 0.75 0.5 0
Problem 7. Solve numerically the equation ut = uxx Subject to the conditions u(0, t) = 0 =
u(1, t), t ≥ 0 and u(x, 0) = sin πx, 0 ≤ x ≤ 1. Carryout computations for two levels taking
h = 1/3 and k = 1/36.
i.e.
1 1 1 1 1
ui,j+1 = ui−1,j + ui,j + ui+1,j = ui−1,j + 2ui,j + ui+1,j
4 2 4 4 4
We shall compute u1,1 , u2,1 (first level) and u1,2 , u2,2 (second level) by using the above formula.
IET
Thus we have,
1
u1,1 = [u0,0 + 2u1,0 + u2,0 ] = 0.6495
4
1
u2,1 = [u1,0 + 2u2,0 + u3,0 ] = 0.6495
4
1
u1,2 = [u0,1 + 2u1,1 + u2,1 ] = 0.487125
4
AJ
1
u2,2 = [u1,1 + 2u2,1 + u3,1 ] = 0.487125
4
Problem 8. Solve the heat conduction problem
∂u ∂ 2u
=
∂t ∂x2
subject to the conditions u(x, 0) = sin πx, 0 ≤ x ≤ 1, and u(0, t) = u(1, t) = 0. Use
Bender-Schmidt’s formula to compute the value of u(0.6, 0.04).Take h = 0.2 and α 21
Here c2 = 1 ⇒ c = 1
Given that h = 0.2 and α = 12
2
Then α = kc h2
⇒ 12 = 0.04k
⇒ k = 21 (0.04) = 0.02.
The initial values of u are
1
Using the Bendre-Schmidt formula ui,j+1 = 2
[ui−1,j + ui+1,j ] we have
1 1
u1,1 = (0.9510) = 0.4755, u2,1 = (0.5878 + 0.9510) = 0.7694,
2 2
u3,1 = 0.7694, u4,1 = 0.4755.
Also,
1
u1,2 = (0.7694) = 0.3847, u2,2 = 0.62245,
2
u3,2 = 0.62245, u4,2 = 0.3847.
Therefore, u(0.6, 0.04) = u3,2 = 0.6224.
Problem 9. Find the values of u(x, t) satisfying the parabolic equation ut = 4uxx and the bound-
2
ary conditions u(0, t) = 0 = u(8, t) and u(x, 0) = 4x − x2 at the points x = i : i =
0, 1, 2, . . . , 8 and t = 8j : j = 0, 1, 2, 3, 4, 5
∴ ui,0 = 4i −
2
= 0, 3.5, 6, 7.5, 8, 7.5, 6, 3.5 for i = 0, 1, 2, 3, 4, 5, 6, 7
at t = 0
These are the entries of the first row.
The entries for second and higher rows (i.e. t = 1/8 to t = 5/8) are given by using Bendre-Schmidt
formula.
2
Problem 10. Solve ∂u
∂t
= ∂∂2 xu2 in 0 < x < 5, t ≥ 0 given that u(x, 0) = 20, u(0, t) =
0, u(5, t) = 100. Compute u for the time-step with h = 1 by Crank-Nicholson method.
2
Problem 11. Solve the equation ∂u
∂t
= ∂∂xu2 subject to the conditions u(x, 0) = sin πx, 0 ≤ x ≤
1
1, u(0, t) = u(1, t) = 0, Carry out computations for two levels, taking h = 13 and k = 36
For i = 1, 2; j = 1 :
1
u1,2 = (u0,1 + 2u1,1 + u2,1 ) = 0.49
4
1
u2,2 = (u1,1 + 2u2,1 + u3,1 ) = 0.49
4
This is called the explicit formula for the solution of the wave equation.
2 2
Problem 12. Solve the wave equation ∂∂tu2 = 4 ∂∂xu2 Subject to u(0, t) = 0 = u(4, t), ut (x, 0) =
0 and u(x, 0) = x(4 − x) by taking h = 1, k = 0.5 up to four steps.
(The first row(i.e. 0th level) in the table is completed ) The values in the 2nd row (i.e. level 1) are
obtained by using
1
Next consider ui,1 = [ui−1,0 + ui+1,0 ]
2
1 1
∴ u1,1 = [u0,0 + u2,0 ] = (0 + 4) = 2
2 2
1 1
u2,1 = [u1,0 + u3,0 ] = (3 + 3) = 3
2 2
1 1
u3,1 = [u2,0 + u4,0 ] = (4 + 0) = 2
2 2
We now consider the explicit formula to find the remaining values in the table.
(The last rowe is completed) Thus the required values of ui,j are tabulated.
t\x x0 = 0h x1 = 1h x2 = 2h x3 = 3h x4 = 4h
t0 = 0k = 0 0 1 2 3 4
t1 = 1k = 0.5 0 3 4 3 0
t2 = 2k = 1 0 2 3 2 0
t3 = 3k = 1.5 0 0 0 0 0
t4 = 4k = 2 0 −2 −3 −2 0
t5 = 5k = 2.5 0 −3 −4 −3 0
Problem 13. Solve numerically uxx = 0.0625utt Subject to the conditions u(0, t) = 0 =
u(5, t), u(x, 0) = x2 (x − 5) by taking h = 1 for 0 ≤ t ≤ 1
(The first row(i.e. 0th level) in the table is completed ) The values in the 2nd row (i.e. level 1) are
obtained by using
1
Next consider ui,1 = [ui−1,0 + ui+1,0 ]
2
1 1
∴ u1,1 = [u0,0 + u2,0 ] = (0 − 12) = −6
2 2
1 1
u2,1 = [u1,0 + u3,0 ] = (−4 − 18) = −11
2 2
1 1
u3,1 = [u2,0 + u4,0 ] = (−12 − 16) = −14
2 2
1 1
u4,1 = [u3,0 + u5,0 ] = (−18 + 0) = −9
2 2
We now consider the explicit formula to find the remaining values in the table.
t\x x0 = 0h x1 = 1h x2 = 2h x3 = 3h x4 = 4h x5 = 5h
t0 = 0k = 0 x=0 x=1 x=2 x=3 x=4 x=5
t1 = 1k = 0.25 0 −4 −12 −18 −16 0
t2 = 2k = 0.5 0 −6 −11 −14 −9 0
t3 = 3k = 0.75 0 −7 −8 −2 2 0
t4 = 4k = 1 0 −2 2 8 7 0
Problem 14. The transverse displacement u of a point at a distance x from one end and at any time
t of a vibrating string satisfies the equation utt = (
25uxx , with the boundary conditions u(x, t) =
20x, 0≤x≤1
u(5, t) = 0 and the initial conditions u(x, 0) = and ut (x, 0) = 0.
5(5 − x), 1 ≤ x ≤ 5
Solve this equation numerically up to t = 5 taking h = 1, k = 0.2.
Sol : Comparing the wave equation c2 uxx = ut+ with the given equation 25uxx = ut1 , we have
c2 = 25 or c = 5. Also k = h/c = 1/5 = 0.2
Since h = 1, the values of x in 0 ≤ x ≤ 5
i.e. 0, 1, 2, 3, 4, 5 and the values of t are 0, 0.2, 0.4, 0.6, 0.8, 1
t\x x0 = 0h x1 = 1h x2 = 2h x3 = 3h x4 = 4h x5 = 5h
t0 = 0k = 0 0 1 2 3 4 5
t1 = 1k = 0.2 u0,0 = 0 u1,0 u2,0 u3,0 u4,0 u5,0 = 0
t2 = 2k = 0.4 u0,1 = 0 u1,1 u2,1 u3,1 u4,1 u5,1 = 0
t3 = 3k = 0.6 u0,2 = 0 u1,2 u2,2 u3,2 u4,2 u5,2 = 0
t4 = 4k = 0.8 u0,3 = 0 u1,3 u2,3 u3,3 u4,3 u5,3 = 0
t5 = 5k = 1 u0,4 = 0 u1,4 u2,4 u3,4 u4,4 u5,4 = 0
20x ,
i 0≤x≤1
We have u(x, 0) =
5(5 − x), 1 ≤ x ≤ 5
1 1
u4,1 = [u3,0 + u5,0 ] = (10 + 0) = 5
2 2
t1 = 1k = 0.2 0 20 15 10 5 0
t2 = 2k = 0.4 0 7.5 15 10 5 0
t3 = 3k = 0.6 0 −5 2.5 10 5 0
t4 = 4k = 0.8 0 −5 −10 −2.5 5 0
t5 = 5k = 1 0 −5 −10 −15 −20 0