Beruflich Dokumente
Kultur Dokumente
(S. A. Sahu)
Bessel’s Formula
Stirling Formula
P.D.E.
•Laplace & Poisson Equations
•Heat Conduction
• Wave Equations
Solution of Non-linear
Simultaneous Equations
(Newton-Raphson Method)
This Method is extension of N-R Method for Non-Linear Equation
f ( x, y) 0 & g ( x, y) 0 …(1)
Why simultaneous..?
We consider that ( x0 , y0 ) be the first approximation
f ( x0 h, y0 k ) 0
….(2)
and
g ( x0 h, y0 k ) 0
Now we expand the relation, we had in eq. (2)
Using Taylor Series Expansion
h2
f ( x0 h) f ( x0 ) h f ( x0 ) f ( x0 ) .............
2
f f
f ( x0 h, y0 k ) f ( x0 , y0 ) h k ....... (3)
x 0 y 0
(similarly for g ( x0 h, y0 k ) )
Now since h and k are very small, we can neglect the terms
containing h2 (or k 2)and higher order terms…
• Now, eq.(2), eq.(3) and assumption suggests
f f
f ( x0 h, y0 k ) 0 f ( x0 , y0 ) h k ..(4a)
x 0 y 0
g g
g ( x0 h, y0 k ) 0 g ( x0 , y0 ) h k
x 0 y 0 ..(4b)
• Or simply:
f f
h k f ( x0 , y0 ) …5(a)
x 0 y 0
g g
h k g ( x0 , y0 ) ..5(b)
x 0 y 0
Let us say
f ( x0 , y0 ) f 0
and
g ( x0 , y0 ) g0
Cramer’s Rule for or the solution of
a system of linear equation
• We have from Eqs. 5(a) & 5(b)
f f
h k f0
x 0 y 0
g g
h k g0
x 0 y 0
Or in matrix form
f f h f0
x 0 y 0
g g
x 0 y 0 k g0
Now let us call
f f
x 0 y 0
D,
g g
x 0
y 0
f f
f0 f0
y 0 x 0 D
Dx g y
g g
g0
0
y 0 x 0
x1 x0 h and y1 y0 k
f ( x, y ) 2 x y 1 0
3 2
g ( x, y ) xy y 4 0
3
take
x0 1.2, y0 1.7
Q.2
f ( x, y ) x 3log x y 0
2
g ( x, y ) 2 x xy 5 x 1 0
2
take
x0 3.4 , y0 2.2
Solution of Q.2
f 0 3.4 3* log(3.4) (2.2) 0.1545
2
f 3 3 f
1 1 1.88235 2 y 4.4
x 0 x 3.4 y 0
g g
4 x y 5 6.4 x 3.4
x 0 y 0
1.88235 4.4
D1 21.76001
6.4 3.4
Dx1 2.1093
h 0.09693
D1 21.76001
0.1545 4.4
Dx1 2.1093
0.36 3.4
Dy1 1.6664
k 0.0766
D1 21.76001
1.88235 0.1545
Dy1 1.6664
6.4 0.36
• And hence we have the second approximation as
equations
(Thomas algorithm)
• In applications, many times we can have system of
equations which gives a coefficient matrix of special
structure, majority of zeros . Sparse matrices
TRIDIAGONAL MATRIX
Something which looks like…….
Tridiagonal Systems
Tridiagonal Systems:
• The non-zero elements are in the
main diagonal, super diagonal
5 1 0 0 0 x1 b1
and subdiagonal. 3
4 1 0 0 x2 b2
• aij=0 if |i-j| > 1 0 2 6 2 0 x3 b3
0 0 1 4 1 x4 b4
0 0 0 1 6 x5 b5
CISE301_Topic3 25
Mathematically….
Tridiagonal System of
Equations
A tridiagonal system for n unknowns may be written as
ai xi 1 bi xi ci xi 1 di …(1)
a1 x0 b1 x1 c1 x2 d1 ..2(a)
..2(b)
a2 x1 b2 x2 c2 x3 d 2
a3 x2 b3 x3 c3 x4 d3 ..2(c)
….. + …… +……. = ……
Which in matrix form can be written as
b1 c1 0 0 0.....0 x1 d1
a b c 0 0 ....0 x d
2 2 2 2 2
0 a3 b3 c3 0....0 x3 d3
............................... .. ..
.............................c .. ..
n
0 0 0 0 0 an bn xn d n
• Thomas algorithm (named after L. H. Thomas), is
a simplified form of Gauss elimination method
Where
d1 di ai i 1
1 and i ( for i 2,3,4....n)
b1 bi aii 1
and
c1 ci
1 and i ( for i 2,3,4....n)
b1 bi aii 1
Q.1
Solve the following system of equations
5 x1 2 x2 12
x1 5 x2 2 x3 9
x2 5 x3 2 x4 8
x3 5 x4 6
In matrix form
5 2 0 0 x1 12
1 5 2
0 x2 9
0 1 5 2 x3 8
0 0 1 5 x4 6
CISE301_Topic3 34
2 2
1 0.4 2 0.43478 0.4348 and so on ..........
5 4.6
4 x4 1
Finite Difference
Interpolation
Numerical Integration
Finite Differences
Let we have
y f ( x) ..(1)
x x0 , x0 h, ...... x0 nh
And returns the following values
y0 , y1 , ........... yn
It means
f ( x0 ) y0
f ( x0 h) f ( x1 ) y1
.
.
.
f ( x0 nh) f ( xn ) yn
Then we can define the following Differences
y1 y2 y1
.
.
yr yr 1 yr
Second Forward Differences are given by
y0 y1 y0
2
y1 y2 y1
2
.
.
yr yr 1 yr
2
• And hence in general the pth Forward Diff.
p 1 p 1
yr
p
yr 1 yr ..(2)
• Forward Difference Table
• Forward Diff. Terms
x Argument
y function / Entry
y0 Leading term
y1 y1 y0
y2 y2 y1
.
.
yr yr yr 1
Following the concept of Forward Diff.
y1/ 2 y1 y0
y3/ 2 y2 y1
x : 10 20 30 40
y : 1.1 2.0 4.4 7.9
• Other operators
Shift Operator E
Average Operator
Shift Operator is the operation of increasing of argument x by h
Ef ( x) f ( x h)
E 2 f ( x ) f ( x 2h)
E 3 f ( x) f ( x 3h)
..........
The inverse shift operator is defined by
1
E f ( x) f ( x h)
We have defined the following Differences
• Shift Operator E E 1 f ( x) f ( x h)
• Average Operator yx ( y
x
h
2
y
x
h
2
)
Relations among the operators
(i ) E 1 or E 1
(ii ) 1 E 1 or E 1 1
1 1/ 2
(iii ) E 1/ 2
E 1/ 2
(iv) ( E E 1/ 2 )
2
• Proof of (i)
yx yx h yx
Eyx yx ( y0 f ( x0 ) yx h f ( x h) Eyx )
( E 1) yx
E 1
Interpolation
x : x0 x1 x2 ... xn
y : y0 y1 y2 ... yn
• Interpolation is the technique of estimating the
value of a function for any intermediate value of
the independent variable
y0 , y1 , ........... yn
• Suppose we have to calculate f(x) at x=x0+ph
(p is any real number), then we have
y p f ( x0 ph) E p f ( x0 ) (1 ) p y0
(sinceif y f ( x) is polynomial of nth degree then n 1 y0 and other terms will be zero )
x x0
Re member : x ( x0 ph) p
h
61
Solution
First let us form the difference table
62
Solution
p= x x0
h
= 0.07
0 .1
= 0.7
P(x) = y0 + py0+ p( p2! 1) 2y0+ p(p 13)(! p 2) 3y0+ p(p 1)( p 2)( p 3)
4!
4y0
= 0.4384
Thus f(3.17) = 0.4384.
63
Newton’s Backward Interpolation
y0 , y1 , ........... yn
• Suppose we have to calculate f(x) at x=xn+ph
(p is any real number, may be -ve), then we have
( 1)( p ) p
y p f ( xn ph) E f ( xn ) E
p
(1 ) yn
we have (1 ) for E 1
x xn
Re member : x ( xn ph) p
h
NEWTON GREGORY BACKWARD
INTERPOLATION FORMULA
66
Example
Estimate f(42) from the following data using newton
backward interpolation.
x: 20 25 30 35 40 45
f(x): 354 332 291 260 231 204
67
Solution
The difference table is:
x f f 2f 3f 4f 5f Here xn = 45, h = 5, x = 42
20 354
- 22 and p = - 0.6
25 332 - 19
- 41 29
30 291 10 -37
- 31 -8 45
35 260 2 8
- 29 0
40 231 2
- 27
45 204
68
Solution
Newton backward formula is:
P(x) =
yn+pyn+ p(p2!+ 1) 2yn+ p(p + 1)(p
3!
+ 2)
3
yn + p(p + 1)(p + 2)(p + 3)
4!
4
yn +
p( p 1)( p 2)( p 3)( p 4)
5!
5yn
P(42)=204+(-0.6)(-27)+ (-0.6)(0.4)
2
2+ (-0.6)(0.40(1.4)
6
0+
(-0.6)(0.4)(1.4)(2.4)
24
8+ (-0.6)(0.4)(1.4)(2.4)(3.4)
120
45 = 219.1430
• Gauss Forward
• Gauss Backward
• Stirling Formula
• Bessel’s Formula
• Everett’s Formula
• If y=f(x) is any function, which takes values
x0 2h, x0 h, x0 , x0 h, x0 2h
y2 , y1 , y0 , y1 , y2
Table-1
1. GAUSS FORWARD INTERPOLATION FORMULA
p p p 1 3 p 1 4 p 2 5
P(x) = y0+ y0+ 2y-1+ y-1+ y-2 + y-2 + where
1
2 3 4 5
x - x0 p = p( p -1) ( p - 2) ( p -r +1)
p=
h
and
r () r!
OR
p ( p 1) 2 ( p 1) p( p 1) 3 ( p 1) p( p 1)( p 2) 4
y p y0 py0 y1 y1 y2 .....
2! 3! 4!
…..(A)
74
Derivation of Gauss Fwd. Int. Formula
x: 21 25 29 33 37
F(x): 18.4708 17.8144 17.1070 16.3432 15.5154
78
Solution
The difference table is
x f f 2f 3f 4f
21 18.4708
-0.6564
25 17.8144 - 0.0510
-0.7074 - 0.0054
-0.7638 - 0.0076
33 16.3432 - 0.0640
-0.8278
37 15.5154
p p 2 p 1 3 p 1 4
P(x) = y0 + y0 + y-1 + y-1 + y-2 +
1 2 3 4
f (30) = 16.9217
79
2. Gauss Backward interpolation formula
we have
y0 y1 2 y1 y0 2 y1 y1
similarly
2 y0 3 y1 2 y1 and 3 y0 4 y1 3 y1
Also we can have
3 y1 3 y2 4 y2 3 y1 4 y2 3 y2
And similarly other differences..
Putting these values we finally get
83
Solution
x0 = 52, x = 51 42' = 51.7, h = 1
x x0 51.7 52
P= h
= 1
= -0.3
50 0.6428
- 0.0135
51 0.6293 - 0.0001
- 0.0136 - 0.0002
x0 = 52 0.6157 - 0.0003 0.0004
- 0.0139 - 0.0002
53 0.6018 - 0.0001
- 0.0140
54 0.5878
84
Solution
The Gauss backward formula is:
p p 1 2 p 1 3 p 2 4
P(x) = y0 + y-1 + y-1 + y-2 + y-2
1 2 3 3
P(51.7) = 0.6198
85
3. STIRLING’S FORMULA
• This formula gives the average of the values obtained by
Gauss forward and backward interpolation formulae. For
using this formula we should have – ½ < p< ½.
We can get very good estimates if - ¼ < p < ¼.
The formula is:
y 0 y 1 p 2 p(p 2 1) 3 y 1 3 y 2 p 2 (p 1) 4
P(x) = y0+p + y-1+
2
+ y-2 + ...
2 2! 3! 2 4!
86
• Stirling Formula (Derivation) [Mean of Gauss Fwd. & Gauss Bkwd]
Solution
X0 = 1.60, x = 1.63, h = 0.1
1.63 – 1.60
p= = 0.3
0.1
89
Solution
• Difference table
x y y 2y 3y 2y
1.50 17.609
2.803
x0= 1.60 20.412 -0.170
2.633 0.019
1.70 23.045 -0.151 -0.02
2.482 0.017
1.80 25.527 -0.134
2.348
1.90 27.875
90
4. BESSELS’ INTERPOLATION FORMULA
p ( p 1) 2 ( p 1) p( p 1) 3 ( p 1) p( p 1)( p 2) 4
y p y p py0 y1 y1 y2 .....
2! 3! 4!
and similarly
1
p ( p 1) y1 y0 ( p ) p( p 1)
2 2
2 ( p 1) p ( p 1)( p 2) 4 y2 4 y1
y p y0 py0 y1
3
...
2! 2 3! 4! 2
….(B)
BESSELS’ INTERPOLATION FORMULA/other way
y 0 + y1 æ 1 ö p (p – 1) æD2 y- 1 + D2 y0 ö
+ çp – ÷ Dy 0 + ç ÷
P(x) = 2 è 2ø 2! è 2 ø
æ 1ö
ç p - ÷ p (p – 1) æD4 y –2 + D4 y –1 ö
è 2ø (p + 1) (p – 1) (p – 2)
+ 3y-1 + 4! ç
è 2 ÷
ø
3!
93
BESSELS’ INTERPOLATION FORMULA
Note
• When p = 1/2 , the terms containing odd differences vanish.
• Then we get the formula in a more simple form:
y 0 + y1 p (p – 1) æD2 y- 1 + D2 y0 ö
P(x) = + ç ÷
2 2! è 2 ø
(p + 1) p(p – 1)(p – 2) æD4 y –2 + D4 y –1 ö
+ ç ÷ +
4! è 2 ø
94
Example
Use Bessels’ Formula to find (46.24)1/3 from the
following table of x1/3.
X: 41 45 49 53
X1/3: 3.4482 3.5569 3.6593 3.7563
95
Solution
x0 = 45, x = 46.24, h = 4 p = 0.31
Difference table is:
x Y y 2y 3y
41 3.4482
0.1087
x0 = 45 3.5569 -0.0063
0.1024 -0.00091
49 3.6593 -0.0054
0.0970
53 3.7563
…(E)