Unit v Maths
Unit v Maths
u
2
u
2
u
2
u u
A 2 +B + C 2 + D + E + Fu = 0
x xy y x y
ie., Au xx + Bu xy + Cu yy + Du x + Eu y + Fu = 0
where A, B,C, D, E, F are in general function of x and y.
The above equation of sec ond order (linear)is
said to
(i) elliptic if B − 4AC 0
2
B − 4AC = −4x (1 − y ) = 4x (y − 1)
2 2 2 2 2
If − 1 y 1, y − 1 is negative.
2
B − 4AC is negative if − 1 y 1, x 0
2
For − x (x 0), − 1 y 1,
the equation is ellipse.
For − x (x 0), y −1 or y 1,
the equation is hyperbola.
For x = 0, for all y or for all x, y 1,
the equation is parabolic.
Elliptic Equations:
u u
2 2
+ 2 =0 − − − −(1)
x 2
y
ie., u xx + u yy = 0 or u = 0
2
1
u i, j = u i −1, j + u i +1, j + u i, j−1 + u i, j+1 − − − −(2)
4
This is called standard five point formula.
1
u i, j = u i −1, j−1 + u i −1, j+1 + u i +1, j−1 + u i +1, j+1 − − − −(3)
4
Ui,j+1
Ui,j-1
Ui-1,j+1 Ui+1,j+1
Ui,j
Ui-1,j-1 Ui+1,j-1
0 21.9
0 21.0
0 17.0
0 9.0
8.7 12.1 12.8
Solution:
Since u is harmonic, it satisfies Laplace’s
equation 2
u 2
u in the square.
+ = 0
x 2 y 2
A 1 2 B
u1 u2
1 2
u3 u4
2 1
D C
2 1
Solution:
u1 u2
1 2
u2 u1
2 1
D C
2 1
1 1
u1 = (1 + u 2 ) ; u 2 = (2 + u1 )
2 2
4
solving, u1 = = 1.3333
3
5
u 2 = = 1.6666.
3
Poisson’s Equation
Solution: u=0
A B
D u1 E u2
u=0 u=0
F u3 G u4
C
u=0
The P.D.E is 2u = −10( x 2 + y 2 + 10)
here h = 1
ui −1, j + ui +1, j + ui , j −1 + ui , j +1 − 4ui , j = −10( x 2 + y 2 + 10)
Applying the formula (2) at D(i = 1, j = 2)
0 + 0 + u 2 + u 3 − 4u1 = −10(15) = −150
u 2 + u 3 − 4u1 = −150 − − − −(3)
Applying at E(i = 2, j = 2)
u1 + u 4 − 4u 2 = −180 − − − −(4)
Applying (2) at F(i = 1, j = 1)
u1 + u 4 − 4u 3 = −120 − − − −(5)
Applying (2) at G(i = 2, j = 1)
u 2 + u 3 − 4u 4 = −10(2 + 1 + 10) = −150 − − − −(6)
2 2
(5) − (4) gives, 4(u 2 − u 3 ) = 60
u 2 − u 3 = 15 − − − −(7)
E lim inate u1 from (3) and (4), (3) + 4(4) gives,
−15u 2 + u 3 + 4u 4 = −870 − − − −(8)
Adding (6) and (8) − 7u 2 + u 3 = −510 − − − (9)
From (7) , (9) adding, u 2 = 82.5
u sin g (7), u 3 = u 2 − 15 = 82.5 − 15 = 67.5
Put in (3), 4u1 = 300 u1 = 75
4u 4 = 150 + 150 u 4 = 75
u1 = u 4 = 75, u 2 = 82.5, u 3 = 67.5.
Note: we can solve the equation (3),(4),(5),(6) either by direct
elimination or by Gauss-seidel method
PARABOLIC EQUATIONS:
The one dimensional heat equation is
u 2 u
2
k
= where =
2
t x 2
c
1. Bender-Schmidt Method
2. Crank-Nicholson Difference Method.
Bender-Schmidt Method
B C
Schematic diagram
Example 1:
2 f f
Solve = given f (0, t ) = f (5, t ) = 0,
x 2
t
f ( x,0) = x 2 (25 − x 2 ), find f in the range taking h = 1 and
upto 5 seconds.
Solution :
Given : u xx = aut a = 1, h = 1
a 2 1
To use Bender − Schmidt' s equation, k = h =
2 2
1
Step − size in time = , Step − size of x = 1.
2
f (0,0) = 0, f (1,0) = 24, f (2,0) = 84, f (3,0) = 144
f (4,0) = 144, f (5,0) = 0.
we have, ui , j +1 =
(ui −1, j + ui +1, j )
2
→ x direction
i 0 1 2 3 4 5
j
0 0 24 84 144 144 0
0.5 0 42 84 114 72 0
1 0 42 78 78 57 0
1.5 0 39 60 67.5 39 0
2 0 30 53.25 49.5 33.75 0
t − direction
2.5 0 26.625 39.75 43.5 24.75 0
3 0 19.875 35.0625 32.25 21.75 0
3.5 0 17.5312 26.0625 28.4062 16.125 0
4 0 13.0312 22.9687 21.0938 14.2031 0
i 0 1 2 3 4
j
0 0 3 4 3 0
1 0 1 2 1 0
2 0 1 0 1 0
t − direction
3 0 -1 2 -1 0
4 0 3 -4 3 0
5 0 -7 10 -7 0
Crank-Nicholson Difference Method:
Note:
Setting = 1 i.e., k = ah 2 . The Crank-Nicholson
formula reduces to
1
ui , j +1 = ui −1, j +1 + ui +1, j +1 + ui −1, j + ui +1, j
4
Crank-Nicholson Difference Method
E D
Ui-1,j Ui+1,j
B A C
Schematic diagram
Example: 1
Solve by Crank − Nicholson method the
2u u
equation 2 = subject to u ( x,0) = 0, u (0, t ) = 0,
x t
u (1, t ) = t , for two time steps.
Solution :
1
Given : u xx = aut a = 1, Take h =
4
2
1 1
k = ah = 1 =2
4 16
we have
1
ui , j +1 = ui −1, j +1 + ui +1, j +1 + ui −1, j + ui +1, j
4
− − − −(A)
→ x direction
1 0 u1 u2 u3 1
t − direction 16 16
0 u4 u5 u6 2
2
16 16
Using the equation (A), we get
u1 = (0 + 0 + 0 + u2 ) (i.e., ) u1 = u2 − − − (1)
1 1
4 4
u2 = (0 + 0 + u1 + u3 )
1 1
u2 = (u1 + u3 ) − − − (2)
4 4
1 1 1 1
u3 = 0 + 0 + u 2 + u3 = u2 + − − − (3)
4 16 4 16
Solving the three equations given by (1), (2), (3)
we get u1 , u2 , u3 . Substitute u3 , u1 values in (2)
1 1 1 1
u2 = u 2 + u2 +
4 4 4 16
1 1
u2 = = 0.0045 ; u1 = = 0.0011;
224 896
u3 = 0.0168.
Similarly, u4 , u5 , u6 can be got again
getting 3 equations in unknowns u4 , u5 , u6 .
we get u4 = 0.005899, u5 = 0.01913, u6 = 0.05277.
Example: 2
i 0 0.5 1
j
0 0 0 0
(u i, j )
t − direction
1 0
u1 1
8 (u i, j+1 ) 8
→ x direction
i 0 0.25 0.5 0.75 1
j
0 0 0 0 0 0
t − direction
1 0
1
u1 u2 u3
8 8