Sie sind auf Seite 1von 13

MODULE-3

Finite Differences and Interpolation

Finite difference operators:

Let y  f ( x) be a function in x which takes the values f ( x0 ), f ( x1 ), f ( x2 ),..., f ( xn )


corresponding the values x0 , x1  x0  h, x2  x0  2h, ..., xn  x0  nh of x . Here x0 , x1 ,
x2 ,..., xn are called arguments (or nodes), f ( x0 ), f ( x1 ), f ( x2 ),..., f ( xn ) are called entries and
h is the length of the interval.

1. Forward difference operator:


It is denoted by  (delta) and defined as  f ( x)  f ( x  h)  f ( x) .
2. Backward difference operator:
It is denoted by  (tilda or nabla) and defined as  f ( x)  f ( x)  f ( x  h) .
3. Shifting operator: It is denoted by E h and defined as E h f ( x)  f ( x  h) .
4. Central difference operator: It is denoted by  and defined as
 
h   h
 f ( x)  f  x    f  x   .
 2   2 

Note: Generally we consider h as 1 unit.

Interpolation with equal intervals:

Newton’s forward interpolation formula:

u (u  1) 2 u (u  1)(u  2) 3
y  f ( x)  f ( x0 )  u  f ( x0 )   f ( x0 )   f ( x0 )
2! 3!

u (u  1)...(u  (n  1)) n x  x0
...   f ( x0 ) , where u  .
n! h

Note: We can also write f ( x0 )  y0 , f ( x1 )  y1 ,..., f ( xn )  yn .

Newton’s backward interpolation formula:

u (u  1) 2 u (u  1)(u  2) 3
y  f ( x)  f ( xn )  u f ( xn )   f ( xn )   f ( xn )
2! 3!

u (u  1)...(u  (n  1)) n
...   f ( xn ) ,
n!

x  xn
where u  .
h
Construction of the forward difference table:

x f ( x)  f ( x)  2 f ( x)  3 f ( x)  4 f ( x)

x0 f ( x0 )
 f ( x0 )

x1  x0  h f ( x1 )  2 f ( x0 )
 f ( x1 )  3 f ( x0 )

x2  x0  2h f ( x2 )  2 f ( x1 )  4 f ( x0 )
 f ( x2 )  3 f ( x1 )

x3  x0  3h f ( x3 )  2 f ( x2 )
 f ( x3 )

x4  x0  4h f ( x4 )

Construction of the backward difference table:

x f ( x)  f ( x)  2 f ( x) 3 f ( x)  4 f ( x)

x0 f ( x0 )
 f ( x1 )

x1  x0  h f ( x1 ) 2 f ( x2 )
 f ( x2 ) 3 f ( x3 )

x2  x0  2h f ( x2 ) 2 f ( x3 ) 4 f ( x4 )
 f ( x3 ) 3 f ( x4 )

x3  x0  3h f ( x3 ) 2 f ( x4 )
 f ( x4 )

x4  x0  4h f ( x4 )
1. Construct the forward difference table for the following data

x 0 1 2 3 4 5 6

y  f ( x) 176 185 194 203 212 220 229

Solution: Construction of the forward difference table for the given data is

x f ( x)  f ( x)  2 f ( x)  3 f ( x)  4 f ( x)  5 f ( x)  6 f ( x)
0 176
9
1 185 0
9 0
2 194 0 0
9 0 1
3 203 0 1 5
9 1 4
4 212 1 3
8 2

5 220 1
9
6 229

2. Find a cubic polynomial y  f ( x) which takes the following values

x 0 1 2 3

y 1 2 1 10

and hence find f (2.5) using Newton’s forward formula.


Solution: The difference table for the given data is

x f ( x)  f ( x)  2 f ( x)  3 f ( x)
0 1
1
1 2 -2
-1 12
2 1 10
9

3 10

x  x0 x  0
Here x0  0, h  1 . Therefore u   x.
h 1

By the Newton’s forward formula, we have

u (u  1) 2 u (u  1)(u  2) 3
y  f ( x)  f ( x0 )  u  f ( x0 )   f ( x0 )   f ( x0 )
2! 3!

x( x  1) x( x  1)( x  2)
 1  x (1)  (2)  (12)
2! 3!

 2 x3  7 x 2  6 x  1 . Hence f (2.5)  3.5

3. Find the value of y at x  22 using Newton’s forward formula, given that

x 20 25 30 35 40 45

y 354 332 291 260 231 204

4. Find the curve y  f ( x) which passes through the points (0,  1), (1, 1), (2, 1) and
(3,  2)
Using Newton’s forward formula and hence find its slope at x  3.5

5. Find the value of y at x  2.65 using Newton’s backward formula, given that

x -1 0 1 2 3

y -21 6 15 12 3
Solution: Let y  f ( x) . To find f (2.65)

The difference table for the given data is

x f ( x)  f ( x)  2 f ( x) 3 f ( x)  4 f ( x)

-1 -21
27
0 6 -18
9 6
1 15 -12 0
-3 6
2 12 -6
-9
3 3

x  xn 2.65  3
Here x  2.65, x0  3 and h  1 . Therefore u    0.35 .
h 1

By the Newton’s backward formula, we have

u (u  1) 2 u (u  1)(u  2) 3
y  f ( x)  f ( xn )  u f ( xn )   f ( xn )   f ( xn )
2! 3!

(0.35)(0.35  1) (0.35)(0.35  1)(0.35  2)


f (2.65)  3  (0.35)(9)  (6)  (6)
2! 3!

Therefore, f (2.65)  6.4571

6. From the following table estimate the number of persons whose daily wage is
between Rs.150 and Rs.175

Daily wage 50-100 100-150 150-200 200-250 250-300

No. of persons 120 145 200 250 150


7. The following data is taken from the steam table. Find the pressure at 1420 using
Newton’s backward formula.

Temperature C 0 140 150 160 170 180

Pressure kg / cm2 3.685 4.854 6.302 8.076 10.225

Central Differences:

Gauss forward interpolation formula:

u (u  1) 2 (u  1)u (u  1) 3
yu  f (u )  f (0)  u f (0)   f (1)   f (1)
2! 3!

(u  1)u (u  1)(u  2) 4 (u  2)(u  1)u (u  1)(u  2) 5


  f (2)   f (2)  ... ,
4! 5!

x  x0
where u  .
h

Gauss backward interpolation formula:

(u  1)u 2 (u  1)u (u  1) 3
yu  f (u )  f (0)  u f (1)   f (1)   f (2)
2! 3!

(u  2)(u  1)u (u  1) 4 (u  2)(u  1)u (u  1)(u  2) 5


  f (2)   f (3)  ... ,
4! 5!

x  x0
where u  .
h

The following is the average of Gauss forward and backward formulas

Stirling’s interpolation formula:

  f (0)   f (1)  u 2 2 u (u 2  12 )  3 f (1)   3 f (2) 


yu  f (u )  f (0)  u  
 2!  f ( 1)   
 2  3!  2 

u 2 (u 2  12 ) 4 x  x0
  f (2)  …, where u  .
4! h
Construction of the central difference table:

x x  x0 f (u)  f (u )  2 f (u ) 3 f (u )  4 f (u )
u
h

x0  2h 2 f (2)
 f (2)

x0  h 1 f (1)  2 f (2)

 f (1) 3 f (2)

x0 0 f (0)  2 f (1)  4 f (2)

 f (0)  3 f (1)
x0  h 1 f (1)  2 f (0)

 f (1)
x0  2h 2 f (2)

1. Use Stirling’s formula to find tan160 from the following data

0 0 5 10 15 20 25 30

tan  0 0.0875 0.1763 0.2679 0.3640 0.4663 0.5774

2. The following table gives the specific heat of the ethyl alcohol at different
temperatures.
0 0 10 20 30 40 50
Temperature ( x C )

Specific heat 0.51 0.55 0.57 0.59 0.62 0.67

Estimate the specific heat at 250 C .


3. Using Stirling’s formula find f (30) from the following data

x 21 25 29 33 37

f ( x) 18.4708 17.8144 17.1070 16.3432 15.5154

Solution: Let y  f ( x) . To find f (30) we take x0  29 as origin.

x  x0 30  29
Here h  4 and x  30 . Therefore u    0.25
h 4

The central difference table for the given data is

x x  x0 f (u)  f (u )  2 f (u ) 3 f (u )  4 f (u )
u
h

21 2 18.4708
-0.6564

25 1 17.8144 -0.0510

-0.7074 -0.0054

29 0 17.1070 -0.0564 -0.0022

-0.7638 -0.0076

33 1 -0.0640
16.3432

-0.8278
37 2 15.5154

By the Stirling’s formula, we have


  f (0)   f (1)  u 2 2 u (u 2  12 )  3 f (1)  3 f (2) 
f (u )  f (0)  u  
 2!  f ( 1)   
 2  3!  2 

u 2 (u 2  12 ) 4
  f (2)
4!
Therefore,
 0.7638  0.7074  (0.25)2
f (0.25)  17.1070  0.25    2!  0.0564
 2 

0.25((0.25) 2  12 )  0.0076  0.0054  (0.25) 2 ((0.25) 2  12 )



3!  2   4!
(0.0022)

 16.9217

4. Using Stirling’s formula compute y35 given that y10  600, y20  512, y30  439,

y40  346, y50  243 .

Interpolation with unequal intervals:

Let y  f ( x) be a function in x which takes the values f ( x0 ), f ( x1 ), f ( x2 ),..., f ( xn )


corresponding the values x0 , x1 , x2 ,..., xn of x . Here x0 , x1 , x2 ,..., xn are not necessarily at
equal interval.

Divided differences: The first divided difference of f ( x) for the arguments x0 , x1 is denoted
by f ( x0 , x1 ) or [ x0 , x1 ] and defined as

f ( x1 )  f ( x0 )
[ x0 , x1 ]  .
x1  x0

The second divided difference of f ( x) for the arguments x0 , x1 , x2 is denoted by


f ( x0 , x1 , x2 ) or [ x0 , x1 , x2 ] and defined as

[ x1 , x2 ]  [ x0 , x1 ]
[ x0 , x1 , x2 ]  .
x2  x0

The third divided difference of f ( x) for the arguments x0 , x1 , x2 , x3 is denoted by


f ( x0 , x1 , x2 , x3 ) or [ x0 , x1 , x2 , x3 ] and defined as

[ x1 , x2 , x3 ]  [ x0 , x1 , x2 ]
[ x0 , x1 , x2 , x3 ]  .
x3  x0

And so on the nth divided difference of f ( x) for the arguments x0 , x1 ,..., xn is denoted by
f ( x0 , x1 ,..., xn ) or [ x0 , x1 ,..., xn ] and defined as

[ x1 , x2 ,..., xn ]  [ x0 , x1 ,..., xn 1 ]
[ x0 , x1 ,..., xn ]  .
xn  x0
Construction of the divided difference table:

x f ( x) First Second Third divided


divided divided difference
difference difference
x0 f ( x0 )

[ x0 , x1 ]
x1 f ( x1 ) [ x0 , x1 , x2 ]
[ x1 , x2 ] [ x0 , x1, x2 , x3 ]
x2 f ( x2 ) [ x1 , x2 , x3 ]
[ x2 , x3 ]
x3 f ( x3 )

1. Find the divided difference table for the function f ( x)  x 2  2 x  2 whose


arguments are 1, 2, 4, 7, 10 .

Solution: The divided difference table is

x f ( x) First Second Third divide Fourth divided


divided divided difference difference
difference difference
1 5

10  5
5
2 1
2 10 85
1
4 1
11
0
26  10 7 1
8
42
00
0
10  1
4 26 13  8
1
72

65  26 1 1
 13 0
74 10  2

7 65 19  13
1
10  4

122  65
 19
10  7

10 122
Newton’s divided difference formula:

f ( x)  f ( x0 )  ( x  x0 )[ x0 , x1 ]  ( x  x0 )( x  x1 )[ x0 , x1, x2 ]  ( x  x0 )( x  x1 )( x  x2 )[ x0 , x1 , x2 , x3 ]
 . . .  ( x  x0 )( x  x1)...( x  xn1)[ x0 , x1,..., xn ] .
1. Find the value of y at x  9 using Newton’s divided difference formula, given that

x 5 7 11 13 17

y 150 392 1452 2366 5202

Solution: Let y  f ( x ) .

The divided difference table for the given data is

x f ( x) First Second Third divide Fourth divided


divided divided difference difference
differen difference
ce
5 150
121
7 392 24
1
265 0
11 1452 32
457
1
13 2366 42
709
17 5202

By the Newton’s divided difference formula, we have

f ( x)  f ( x0 )  ( x  x0 )[ x0 , x1 ]  ( x  x0 )( x  x1 )[ x0 , x1, x2 ]  ( x  x0 )( x  x1 )( x  x2 )[ x0 , x1 , x2 , x3 ]
( x  x0 )( x  x1)( x  x2 )( x  x3 )[ x0 , x1, x2 , x3 , x4 ]
f (9)  150  (9  5)(121)  (9  5)(9  7)(24)  (9  5)(9  7)(9 11)(1)

(9  5)(9  7)(9 11)(9 13)(0)


 810
2. Find the equation of the cubic curve which passes through the points
(4,  43), (7, 83), (9, 327) and (12, 1053) . Hence find f (10) using Newton’s divided
difference formula.

Lagrange’s interpolation formula:

( x  x1 )( x  x2 )( x  x3 )...( x  xn ) ( x  x0 )( x  x2 )( x  x3 )...( x  xn )
f ( x)  f ( x0 )  f ( x1 )
( x0  x1 )( x0  x2 )( x0  x3 )...( x0  xn ) ( x1  x0 )( x1  x2 )( x1  x3 )...( x1  xn )

( x  x0 )( x  x1 )( x  x2 )...( x  xn 1 )
. . .  f ( xn ) .
( xn  x0 )( xn  x1 )( xn  x2 )...( xn  xn 1 )

1. Find the form of the function y  f ( x ) for the following data. Hence find y at x  3 .

x 0 1 2 5

y 2 3 12 147

Solution: Given x0  0; x1  1; x2  2; x3  5

and f ( x0 )  2; f ( x1 )  3; f ( x2 )  12; f ( x3 )  147 .

By the Lagrange’s formula, we have

( x  x1 )( x  x2 )( x  x3 ) ( x  x0 )( x  x2 )( x  x3 )
f ( x)  f ( x0 )  f ( x1 )
( x0  x1 )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 )

( x  x0 )( x  x1 )( x  x3 ) ( x  x0 )( x  x1 )( x  x2 )
 f ( x2 )  f ( x3 )
( x2  x0 )( x2  x1 )( x2  x3 ) ( x3  x0 )( x3  x1 )( x1  x2 )

 x3  x 2  x  2
Therefore, f (3)  35.

2. Apply Lagrange’s formula to find y2 , given that y0  2; y1  5; y3  29 and y7  19 .


Lagrange’s inverse interpolation formula:

( f ( x)  f ( x1))( f ( x)  f ( x2 ))( f ( x)  f ( x3 ))...( f ( x)  f ( xn ))


x x
( f ( x0 )  f ( x1))( f ( x0 )  f ( x2 ))( f ( x0 )  f ( x3 ))...( f ( x0 )  f ( xn )) 0

( f ( x)  f ( x0 ))( f ( x)  f ( x2 ))( f ( x)  f ( x3 ))...( f ( x)  f ( xn ))


 x
( f ( x1 )  f ( x0 ))( f ( x1 )  f ( x2 ))( f ( x1 )  f ( x3 ))...( f ( x1)  f ( xn )) 1
( f ( x)  f ( x0 ))( f ( x)  f ( x1 ))( f ( x)  f ( x2 ))...( f ( x)  f ( xn1 ))
 ...  x .
( f ( xn )  f ( x0 ))( f ( xn )  f ( x1))( f ( xn )  f ( x2 ))...( f ( xn )  f ( xn1)) n
1. Form the following table find x when y  28 using Lagrange’s inverse interpolation
formula.

x 0 1 2 5

y 2 3 12 147

Das könnte Ihnen auch gefallen