Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

UNIT III

INTERPOLATION

1. Finite Differences

2. Relation between operators

3. Interpolation by Newton’s forward and backward difference formula for equal intervals

4. Newton’s divided difference method and Lagrange’s method for unequal intervals

5. Differentiation based on finite differences

6. Integrations by Trapezoidal and Simpson’s rules.

Part-A(2 marks)
1. What Is Interpolation?

Solution:
A process used to estimate an intermediate value of one (dependent) variable which is a function
of a second (independent) variable when values of the dependent variable corresponding to
several discrete values of the independent variable are known.
2. What are the disadvantages of Lagrange interpolation method?
Solution:
 The amount of computation required is large.
 Interpolation for additional values, requires the same amount of effort as the first value
(i.e. no part of the previous calculation can be used)
 When the numbers of interpolation points are changed (increased/decreased), the results
of the previous computations cannot be used.
 Error estimation is difficult (at least may not be convenient).
3. Write down Newton’s forward and backward difference formula.
Solution:
Newton’s forward difference formula
3
ny 0 n ( n  1)  y 0
2
n ( n  1)( n  2)  y0
y ( x )  f ( x0  nh )  y 0     ...
1! 2! 3!
Newton’s backward difference formula
3
n ( n  1)  y 0
2
ny 0 n ( n  1)( n  2)  y0
y ( x )  f ( x0  nh )  y 0     ...
1! 2! 3!

dy d 2 y d3y
4. Write down the expressions for , and by Newton’s Forward Difference
dx dx 2 dx 3
formula.

Solution:

2u  1 2 3u 2  6u  2 3 4u 3  18u 2  22u  6 4
dy
dx
 f ' ( x0  uh)  [ 1
h
y0 
2
 y0 
6
 y0 
24
 y  ... ]
d2y 1 6u 2  18u  11 4

dx 2 h 2
[  2
y0  (u  1)  3
y0 
12
 y0...... ]
d3y 1 12u  18 4
dx 3
h
[
 3 3 y0 
12
]
 y0 ...

dy d 2 y d3y
5. Write down the expressions for , and by Newton’s Forward Formula for
dx dx 2 dx 3
u=0.
Solution:
dy 1  2 y0  3 y0  4 y0
dx

h
[
y0 
2

3

4
 ... ]
d2y 1 11 4
dx 2
h
[
 2  2 y0   3 y0 
12
 y0  ..... ]
d3y 1 3
dx 3
h
[
 3  3 y0   4 y0  .....
2
]
dy d 2 y d3y
6. Write down the expressions for , and by Newton’s Backward formula.
dx dx 2 dx 3
Solution:
2v  1 2 3v 2  6v  2 3 4v3  18v 2  22v  6 4
dy
dx
'
[
1
 f ( x0  vh)  y0 
h 2
 y0 
6
 y0 
24
 y  ... ]
d2y 1 6v 2  18v  11 4

dx 2 h 2
[ 
2
y0  ( v  1) 3
y0 
12
 y0...... ]
d3y 1 3 12v  18 4
dx 3
h
[
 3  y0 
12
 y0 ... ]
7. Give the Newton’s Divided Difference formula for unequal intervals.
Solution:
f ( x)  f ( x0 )  ( x  x0 )# f ( x0 )  ( x  x0 )( x  x1 )# 2 f ( x0 )  ( x  x0 )( x  x1 )( x  x2 )# 3 f ( x0 )  .. .

8. State Lagrange’s interpolation formula.


Solution:
The Lagrange’s interpolation formula is
( x  x1 )( x  x 2 ).....( x  x n ) ( x  x0 )( x  x 2 ).....( x  x n )
f ( x)  f ( x0 )  f ( x1 )  ....
( x0  x1 )( x0  x 2 ).....( x0  x n ) ( x1  x0 )( x1  x 2 ).....( x1  x n )
( x  x0 )( x  x1 )( x  x 2 ).....( x  x n 1 )
...  f ( xn )
( x n  x0 )( x n  x1 ).....( x n  x n 1 )
1 1
  
3
9. Show that .
b ,c , d  a  abcd
Solution:
1 1
If f ( x)   f (a) 
x a
1 1

1 1
f ( a, b)      b a  
b a ba ab
1 1
 
f (b, c)  f (a, b) 1 ca 1
f (a, b, c)   bc ab   
ca ca abc  c  a  abc
1 1

f (b, c, d )  f (a, b, c) bcd abc 1 ad  1
f (a, b, c, d )      .
d a d a abcd  d  a  abcd

10. State any two properties of divided difference.


Solution:
 The divided differences are symmetrical in all their arguments (i.e) the value of any
difference is independent of the order of the arguments.
 The divided differences of the sum or difference of two functions is equal to the sum
or
difference of the corresponding separate divided differences (or) Divided difference is
linear operator.
11. What is the assumption we make when Lagrange’s formula is used?
Solution:
Lagrange’s interpolation formula can be used whether the value of x, the
independent variables are equally spaced or not and whether the differences of
y become smaller or not.
12. Using Lagrange’s Interpolation Formula, find the value of sin( 6) from the table
below.

x 0  4  2
y  sin x 0 0.70711 1.0

         
  0      0   
y  f (sin( 6))    6 2  (.70711)   6  6 4  (1)
6
Solution:
           
  0      0   
4  4 2  2  2 4 
8 1
 (.70711)   .51743
9 9

13. Compare trapezoidal rule and Simpson’s 1/3 rule for evaluating numerical
differentiation.
Solution:
 In a trapezoidal rule, y(x) is a linear function of x. The rule is the simplest one, but it is
least accurate.
 In Simpson’s one-third rule, y(x) is polynomial of degree two. This rule is applicable, the
number of intervals must be even.
14. Define Forward , Backward, Central Differences And Divided Difference.

Solution:
Forward Difference f ( x)  f ( x  h)  f ( x)
Backward Difference f ( x)  f ( x)  f ( x  h)

Central Difference  f ( x )  f ( x  h)  f ( x  h)
f ( x1 )  f ( x0 )
Divided Difference # f ( x) 
x1  x0

xn
15. State trapezoidal rule to evaluate  y( x)dx
x0
.

Solution:
xn

 y( x)dx  2 h { y  y n }  2{ y1  y 2  y 3  ...  y n 1 }
1
Trapezoidal rule is given by 0
x0

16. Using trapezoidal rule evaluate  0
sin x dx into six equal parts.

Solution:
 0 
Here h  .
6 6

x 0    2 5 
6 3 2 3 6
y 0 1 3 1 3 1 0
2 2 2 2

xn h
 x0
f ( x)dx  [( y0  yn )  2( y1  y2  ...  yn 1 )]
2

   
sin x dx  6 (0  0)  2( 1  1 ) 
0 2  2
 3
2
1 3
2 2
1.9541

17. State Simpson’s 1/3 and Simpson 3/8 Formula.

Solution:

Simpson’s 1 rd Rule:
3

xn h
 x0
f ( x)dx  [( y0  yn )  2( y2  y4  y6 )  4( y1  y3  y5 )]
3

Simpson’s 3 th Rule:
8

xn 3h
 x0
f ( x)dx 
8
[( y0  yn )  3( y1  y2  y4  y5  ...)  2( y3  y6  y9  ...)]

18. Obtain the divided difference table for the Following data.

x : 1 0 2 3
f ( x):  8 3 1 12
Solution:
x f ( x) f ( x )  2 f ( x) 3 f ( x)

-1 -8

11

0 3 -4

-1 2

2 1 4

11

3 12

19. Find the polynomial which takes the following values

x : 0 1 2
y : 1 2 1

Solution:

x y y 2 y

0 1

1 2 -2

-1

2 1

ny 0 n ( n  1)  y 0
2

y ( x )  y0    ...
1! 2!

x  x0
Where n
h
x( x 2  1)
 1 x  (2) nx
2
 1  2x  x2

20. Find (log x) .

Solution:
f ( x)  f ( x  1)  f ( x).
(log x)  log( x  1)  log x.
 x  1
(log x)  log  .
 x 
b
21. When does the Simpson’s 1/3 rule for integrating 
a
f ( x)dx gives exact result?

Solution:
Simpson’s 1/3 rule gives exact results when f(x) is a polynomial of degree  3.

22. What are the disadvantages of the Simpson’s 3/8 rule compared with the 1/3 rd rule?

Solution:

The disadvantages of the simpson’s 3/8 rule are

(i) The number of subintervals must be divisible by 3. It is of the same order as the
Simpson’s 1/3 rule, which only requires that the number of nodal points must be
odd.

(ii) The error constant c in the case of Simpson’s 3/8 rule is c = 3/80, which is much
larger than the error constant c = 1/90, in the case of Simpson’s 1/3 rule.

(iii) Therefore, the error in the case of the Simpson’s 3/8 rule is larger than the error in
the case Simpson 1/3 rule.

23. Taking h to be the interval of differencing, find  2 (e x ).

Solution:
(e x )  e( x  h )  e x  e x (eh  1)
m 2 x
 (e )  (e x )   e x (eh 1 ) 
n
 (eh 1 )e x ( eh  1is a constant)
 (eh 1 )e x (eh 1 )  e x (eh 1 ) 2 .

24. Find f (x ) if f ( x)  x 2  2 x  2 and the interval of differencing as unity.


Solution:
f ( x)  f ( x  1)  f ( x)
 {( x  1) 2  2( x  1)  2}  {x 2  2 x  2}
 x 2  2x  1  2x  2  2  x 2  2x  2
= 2x  3

25. Define the operator E .

Solution:

Let y  f ( x) be a function of x and x, x  h, x  2h. be the consecutive values of x . The


operator E is defined such that Ef ( x)  f ( x  h) . Thus when E operators on f ( x) , the result
is the next value of the function. So E is called the shifting or translation operator, if y x is the
function of f ( x) , we have Eyx  yx  h .

PART – B

Newton’s Gregory Forward Interpolation formula for equal intervals

n n(n  1) 2 n(n  1)(n  2) 3


y ( x)  f ( x 0  nh)  y 0  y 0   y0   y0  .................
1! 2! 3!

Newton’s Gregory Backward Interpolation formula for equal intervals

n n(n  1) 2 n(n  1)(n  2) 3


y ( x)  f ( x n  nh)  yn  yn   yn   yn  ............
1! 2! 3!

Problems:

1) Find the value of y at x = 21 x = 28 from the following data

X 20 23 26 29
Y 0.3420 0.3907 0.4387 0.4848
Solution:

Since x=21 is nearer to the beginning of the table, we use Newton’s Forward Formula

We form the difference table


X y y 2 y 3 y
20 0.3420
0.0487
23 0.3907 - 0.0007
0.048 - 0.0012
26 0.4387 - 0.0019
0.0461
29 0.4848
n n(n  1) 2 n(n  1)(n  2) 3
y ( x)  f ( x 0  nh)  y 0  y 0   y0   y0  .................
1! 2! 3!

Q O
n
x  x 0  nh h
21  20 1
21  20  n(3) n , n
3 3
1
n   0.333 n  0.333
3

0.333 (0.33)(0.33  1) (0.33)(0.33  1)(0.33  2)


y (21)  0.3420  (0.0487)  (0.0007)  (0.0012)
1 2 6

y(21)  0.3420  0.01621  (7.7385 105 )  (7.3847 105 )

y (21)  0.35821

NEWTON’S BACKWARD:

Let x = 28

x  xn 28  29
xn  nh  x  n    0.3333
h 3

[OR]

Q O 28  29 1
n n , n    n  0.333
h 3 3
n n(n  1) 2 n(n  1)(n  2) 3
y ( x )  yn  yn   yn   yn  ............
1! 2! 3!
(0.3333) (0.3333)(0.3333  1)
y (28)  0.4848   0.0461   0.0019 
1! 2!
(0.3333)(0.3333  1)(0.3333  2)
  0.0012   ............
3!

y (28)  0.4848  0.0158  0.000211  0.000074

y (28)  0.4697

2. Form the following half yearly premium policy at different ages, estimate the premium for
policy at the age of 63
X (Age) 45 50 55 60 65
Y (premium) 114.84 96.16 83.32 74.48 68.48
Solution:

Since x= 63 is nearer to the end of the table, we use Newton’s Backward Formula

We form the difference table

X y y n  2 yn  3 yn  4 yn
45 114.84
-18.68
50 96.16 5.84
-12.84 -1.84
55 83.32 4 0.68
- 8.84 - 1.16
60 74.48 2.84
-6
65 68.48

2
x  x 0  nh  63  65  n(5)  2  5n  n   0.4
5

[OR]

Q O 63  65 2
n n , n    n  0.4
h 5 5
n n(n  1) 2 n(n  1)(n  2) 3
y ( x )  yn yn   yn   yn  ............
1! 2! 3!
 0.4  6   0.4  0.4  1 2.84   0.4  0.4  1 0.4  2  1.16 
y (63)  68.48       
1! 2! 3!
 0.4  0.4  1 0.4  2  0.4  3 0.68  ...........
  
4!
y (63)  68.48  2.4  0.3408  0.07424  0.028288

y (63)  70.58

3. The population of the town has the following data, estimate the population during the
period 1946 and 1976
X 1941 1951 1961 1971 1981 1991
Y 20 24 29 36 46 51
Solution:

Since x = 1946 is nearer to the beginning of the table, we use Newton’s Forward Formula

We form the difference table

X y y y 2 y 2 y  3 y 3 y 4 y 4 y  5 y 5 y
1941 20
4
1951 24 1
5 1
1961 29 2 0
7 1 -9
1971 36 3 -9
10 -8
1981 46 -5
5
1991 51

Newton’s forward:

1
x  x 0  nh  1946  1941  n(10)  n   0.5
2

[OR]

Q O 1946  1941 5
n n , n   n  0.5
h 10 10
n n(n  1) 2 n(n  1)(n  2) 3
y ( x)  f ( x 0  nh)  y 0  y 0   y0   y0  .................
1! 2! 3!

0.5(0.5  1) (0.5)(0.5  1)(0.5  2)


y (1946)  20  (0.5  4)  (1)  (1) 
2 6
(0.5)(0.5  1)(0.5  2)(0.5  3) (0.5)(0.5  1)(0.5  2)(0.5  3)(0.5  4)
(0)  (9)
4! 5!

y (1946)  20  2  0.125  0.0625  0  0.2460

y (1946)  21.6915

NEWTON’S BACKWARD:

Since x = 1976 is nearer to the end of the table, we use Newton’s Backward Formula

We form the difference table

x0  nh  x  1991  n(10)  1976  n  1.5

[OR]

Q O 1976  1991 15


n n , n  n  1.5
h 10 10

n n(n  1) 2 n(n  1)(n  2) 3


y ( x)  y0  y0   y0   y0  ............
1! 2! 3!

(1.5) (1.5)(1.5  1) (1.5)(1.5  1)(1.5  2)


y (1976)  51  (5)  (5)  (8) 
1 2 6
(1.5)(1.5  1)(1.5  2)(1.5  3) (1.5)(1.5  1)(1.5  2)(1.5  3)(1.5  4)
(9)  (9)
4! 5!

y (1976)  51  7.5  1.875  0.5  0.2109  0.1054

y (1976)  40.8087

 Increase in the population during the period = y(1976)  y 1946

 40.8087  21.6915
 19.1172

4. From the following data, find the no of students whose weight is between 60 and 70. The
data is
Weight 0 – 40 40 – 60 60 – 80 80 – 100 100 – 120
No of
250 120 100 70 50
students
Solution:

Let us calculate the no of students whose weight is less than 70

We form the difference table

X y y y 2 y 2 y  3 y 3 y 4 y 4 y
< 40 250
120
< 60 370 – 20
100 – 10
< 80 470 –30 20
70 10
< 100 540 –20
50
< 120 590
Newton’s forward:

1
x  x 0  nh  1946  1941  n(10)  n   0.5
2

[OR]

Q O 70  40 30
n n , n  n  1.5
h 20 20

n n(n  1) 2 n(n  1)(n  2) 3


y ( x)  f ( x 0  nh)  y 0  y 0   y0   y0  .................
1! 2! 3!

1.5(1.5  1) (1.5)(1.5  1)(1.5  2)


y (70)  250  (1.5 120)  (20)   10  
2 6
(1.5)(1.5  1)(1.5  2)(1.5  3)
(20)
4!

1.5(0.5) (1.5)(0.5  1)(0.5)


y (70)  250  (1.5 120)  (20)   10  
2 6
(1.5)(0.5)(0.5)(1.5)
(20)
4!
y (70)  250  180  7.5  0.625  2.8125

y (70)  423.59  424

 The no of students whose weight is between 60 and 70 is

y  70  y  60  424  370  54

HW

5. Find f(1.5)

x 0 1 2 3 4
F(x) 858.3 869.6 880.9 802.3 903.6

[Answer 889.29]

NEWTON’S INTERPOLATION FORMULA FOR UNEQUAL INTERVALS

NEWTON’S DIVIDED DIFFERENCE

f ( x)  f ( x0 )  ( x  x0 )f  x 0   ( x  x0 )( x  x1 )2 f  x 0   ( x  x0 )( x  x1 )( x  x2 )3 f  x 0 


PROBLEMS:

1. From the table find f(x) and find f(6) by using Newton’s Interpolation formula

X 1 2 7 8
f(x) 1 5 5 4

Solution:

The given intervals are not equal

So we can use Newton’s divided difference formula.

X y ⍋𝑓(𝑥) ⍋2 𝑓(𝑥) ⍋3 𝑓(𝑥)


1 x0 1 y0
5 1
 4
2 1
2 x1 5 y1 0  4 2

7 1 3
55 1 2
 0 
72 6 3 1
8 1 14
7 x2 5 y2 1  0 1

82 6
45
 1
87
8 x3 4 y3
w.k.t
f ( x)  f ( x0 )  ( x  x0 )f  x 0   ( x  x0 )( x  x1 )2 f  x 0   ( x  x0 )( x  x1 )( x  x2 )3 f  x 0 


f ( x)  1   x  1 4    x  1 x  2  2
3    x 1 x  2 x  7  114
f ( x)  1  4 x  4 
3
x  2 x    x 3  3x 2  2 x  7 x 2  21x  14  1
2 2 4
3 14  
2 2 4 x3 5 23
f ( x)  1  4 x  4  x  2 x    x2  x 1
3 3 14 7 14

x3  2 5  23   4
f ( x)   x 2      x  4  2    1  4  1  
14  3 7  14   3
x3  29   107   16 
f ( x)   x 2     x   
14  21   14   3 

f ( x)  0.0714 x3  1.3809 x 2  7.6428x  5.3333

Sub x = 6
f (6)  0.0714  6   1.3809  6   7.6428  6   5.3333
3 2

f (6)  6.2335

2. Using Newton’s Divided Difference Formula, Find the value of f(2), f(3)and f(15) given
the following table

X 4 5 7 10 11 13
F(x) 48 100 294 900 1210 2028

Solution:

x f(x) ⍋𝑓(𝑥) ⍋2 𝑓(𝑥) ⍋3 𝑓(𝑥) ⍋4 𝑓(𝑥)


4 48
52
5 100 15
97 1
7 294 21 0
202 1
10 900 27 0
310 1
11 1210 33
409
13 2028

f ( x)  f ( x0 )  ( x  x0 )f  x 0   ( x  x0 )( x  x1 )2 f  x 0   ( x  x0 )( x  x1 )( x  x2 )3 f  x 0 

f ( x)  48   x  4 52   x  4 x  515   x  4 x  5 x  7 1

f ( x)  48  52 x  208   x 2  9 x  20  15   x3  16 x 2  83x  140

f (2)  48  104  90  30

f (2)  4
f (8)  48  4  52   4 315   4 31

f (8)  448

f (15)  48  11 52  111015  11108

f (15)  48  572  1650  880

f (15)  3150

3. Using Newton’s Divided Difference Formula, Find the value of f(656) from the
following table

X 654 658 659 661


F(x) 2.8156 2.8182 2.8189 2.8202

Solution:

x f(x) ⍋𝑓(𝑥) ⍋2 𝑓(𝑥) ⍋3 𝑓(𝑥)


654 2.8156
6.5 104
658 2.8182 1 10 5
7  10 4 3.8 106
659 2.8189 1.66 105
6.5 104
661 2.8202

f ( x)  f ( x0 )  ( x  x0 )f  x 0   ( x  x0 )( x  x1 )2 f  x 0   ( x  x0 )( x  x1 )( x  x2 )3 f  x 0 

f ( x)  2.8156   x  654   6.5 10 4    x  654  x  658  110 5 


  x  654  x  658  x  659   3.8 106 

f ( x)  2.8156  6.5 104 x  654   x 2  430332  658 x  654 x 1 105 


  x3  430332 x  658 x 2  654 x 2  659 x 2  283588788 x  433622 x 2  430986 x 2  3.8  106 
f ( x)  2.81648
LAGRANGE’S INTERPOLATION FORMULA FOR UNEQUAL INTERVALS

( x  x1 )( x  x2 )...( x  xn ) ( x  x0 )( x  x2 )...( x  xn )
y ( x)  f ( x)  y0  y1
( x0  x1 )( x0  x2 )...( x0  xn ) ( x1  x0 )( x1  x2 )...( x1  xn )

( x  x0 )( x  x1 )...( x  xn 1 )
... yn
( xn  x0 )( xn  x1 )...( xn  xn 1 )

Example: 1

Using Lagrange’s interpolation formula find y (10) from the following table.

x: 5 6 9 11
y: 12 13 14 16

Solution:

x: 5 6 9 11
x0 x1 x2 x3
Given
y: 12 13 14 16
y0 y1 y2 y3

( x  x1 )( x  x2 )( x  x3 ) ( x  x0 )( x  x2 )( x  x3 )
y ( x)  f ( x)  y0  y1
( x0  x1 )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 )
( x  x0 )( x  x1 )( x  x3 ) ( x  x0 )( x  x1 )( x  x2 )
 y2  y3
( x2  x0 )( x2  x1 )( x2  x3 ) ( x3  x0 )( x3  x1 )( x3  x2 )

Therefore x = 10

(10  6)(10  9)(10  11) (10  5)(10  9)(10  11)


y (10)  (12)  (13)
(5  6)(5  9)(5  11) (6  5)(6  9)(6  11)
(10  5)(10  6)(10  11) (10  5)(10  6)(10  9)
 (14)  (16)
(9  5)(9  6)(9  11) (11  5)(11  6)(11  9)

y (10)  2  (4.333)  11.667  5.333

y (10)  14.6670

Example: 2

Using Lagrange’s interpolation formula find f (5) from the following table.
x: 1 2 3 4 7
y: 2 4 8 16 128

Solution:

x: 1 2 3 4 7
x0 x1 x2 x3 x4
Given
y: 2 4 8 16 128
y0 y1 y2 y3 y4

( x  x1 )( x  x2 )( x  x3 )( x  x4 ) ( x  x0 )( x  x2 )( x  x3 )( x  x4 )
y ( x)  f ( x)  y0  y1
( x0  x1 )( x0  x2 )( x0  x3 )( x0  x4 ) ( x1  x0 )( x1  x2 )( x1  x3 )( x1  x4 )
( x  x0 )( x  x1 )( x  x3 )( x  x4 ) ( x  x0 )( x  x1 )( x  x2 )( x  x4 )
 y2  y3
( x2  x0 )( x2  x1 )( x2  x3 )( x2  x4 ) ( x3  x0 )( x3  x1 )( x3  x2 )( x3  x4 )
( x  x0 )( x  x1 )( x  x2 )( x  x3 )
 y4
( x4  x0 )( x4  x1 )( x4  x2 )( x4  x3 )

Therefore x = 5

(5  2)(5  3)(5  4)(5  7) (5  1)(5  3)(5  4)(5  7)


f(5)  (2)  (4)
(1  2)(1  3)(1  4)(1  7) (2  1)(2  3)(2  4)(2  7)
(5  1)(5  2)(5  4)(5  7) (5  1)(5  2)(5  3)(5  7) (5  1)(5  2)(5  3)(5  4)
 (8)  (16)  (128)
(3  1)(3  2)(3  4)(3  7) (4  1)(4  2)(4  3)(4  7) (7  1)(7  2)(7  3)(7  4)

f(5)  32.93

Example: 3

Using Lagrange’s interpolation formula prove that y1  y3  0.3( y5  y3 )  0.2( y3  y5 ) nearly.

Solution:

x: 5 3 3 5
x0 x1 x2 x3
Given
y: y5 y3 y3 y5
y0 y1 y2 y3
( x  x1 )( x  x2 )( x  x3 ) ( x  x0 )( x  x2 )( x  x3 )
y ( x)  f ( x)  y0  y1
( x0  x1 )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 )
( x  x0 )( x  x1 )( x  x3 ) ( x  x0 )( x  x1 )( x  x2 )
 y2  y3
( x2  x0 )( x2  x1 )( x2  x3 ) ( x3  x0 )( x3  x1 )( x3  x2 )

( x  3)( x  3)( x  5) ( x  5)( x  3)( x  5)


yx  y ( x)  y5  y3
(5  3)(5  3)(5  5) (3  5)(3  3)(3  5)
( x  5)( x  3)( x  5) ( x  5)( x  3)( x  3)
 y3  y5
(3  5)(3  3)(3  5) (5  5)(5  3)(5  3)

Therefore x = 1

4(2)(4) 6(2)(4) 6(4)(4) 6(4)(2)


y1  y5  y3  y3  y5
(2)(8)(10) (2)(6)(8) 8(6)(2) (10)(8)(2)

y1   0.2 y5  0.5 y3  y3  0.3 y5

y1   0.2 y5  0.3 y3  0.2 y3  y3  0.3 y5

y1  y3  0.3( y5  y3 )  0.2( y3  y5 )

Example: 4

Using Lagrange’s interpolation formula to fit a polynomial to the following table.

x: 1 0 2 3
y: 8 3 1 12

And hence find y (x = 1)

Solution:

x: 1 0 2 3
x0 x1 x2 x3
Given
y: 8 3 1 12
y0 y1 y2 y3

( x  x1 )( x  x2 )( x  x3 ) ( x  x0 )( x  x2 )( x  x3 )
y ( x)  f ( x)  y0  y1
( x0  x1 )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 )
( x  x0 )( x  x1 )( x  x3 ) ( x  x0 )( x  x1 )( x  x2 )
 y2  y3
( x2  x0 )( x2  x1 )( x2  x3 ) ( x3  x0 )( x3  x1 )( x3  x2 )
( x  0)( x  2)( x  3) ( x  1)( x  2)( x  3)
y ( x)  (8)  (3)
(1  0)(1  2)(1  3) (0  1)(0  2)(0  3)
( x  1)( x  0)( x  3) ( x  1)( x  0)( x  2)
 (1)  (2)
(2  1)(2  0)(2  3) (3  1)(3  0)(3  2)

2 1 1 1
y  ( x3  5 x 2  6 x)  ( x 3  4 x 2  x  6)  ( x3  2 x 2  3x)  ( x 3  x 2  2 x)
3 2 6 6

2 1 1 1  10 4 2 1   12 1 3 2  6
y  x3       x 2       x     
3 2 6 6  3 2 6 6  3 2 6 6 2

7 3 31 2 14 7 x3  31x 2  28 x  18
y x  x  x  3
6 6 3 6

6 y  7 x3  31x 2  28x  18

Therefore y( x = 1)

y  2  6  3  3 2

LAGRANGE’S INVERSE INTERPOLATION FORMULA FOR UNEQUAL INTERVALS

(y y1 )(y y 2 )...(y y n ) (y y 0 )(y y 2 )(y y3 )(y y 4 )


x( y )  x0  x1
(y0  y1 )(y0  y 2 )...(y0  y n ) (y1  y0 )( y1  y2 )( y1  y3 )( y1  y4 )
( y  y0 )( y  y1 )( y  y3 )( y  y4 ) ( y  y0 )( y  y1 )( y  y2 )( y  y4 )
 x2  x3
( y2  y0 )( y2  y1 )( y2  y3 )( y2  y4 ) ( y3  y0 )( y3  y1 )( y3  y2 )( y3  y4 )
( y  y0 )( y  y1 )( y  y2 )(y y3 )
 x4
( y4  y0 )( y4  y1 )( y4  y2 )( y4  y3 )

( x  x0 )( x  x1 )...( x  xn 1 )
... yn
( xn  x0 )( xn  x1 )...( xn  xn 1 )

Example: 5

Find the age corresponding to the annuity value 13.6 from the given table.

Age x: 30 35 40 45 50
Annuity value y : 15.9 14.9 14.1 13.3 12.5

Solution:
Given
Age x: 30 35 40 45 50
x0 x1 x2 x3 x4
Annuity value y : 15.9 14.9 14.1 13.3 12.5
y0 y1 y2 y3 y4

(y y1 )(y y 2 )(y y3 )(y y 4 ) (y y 0 )(y y 2 )(y y3 )(y y 4 )


x( y )  x0  x1
(y0  y1 )(y0  y 2 )(y0  y3 )(y0  y 4 ) (y1  y0 )( y1  y2 )( y1  y3 )( y1  y4 )
( y  y0 )( y  y1 )( y  y3 )( y  y4 ) ( y  y0 )( y  y1 )( y  y2 )( y  y4 )
 x2  x3
( y2  y0 )( y2  y1 )( y2  y3 )( y2  y4 ) ( y3  y0 )( y3  y1 )( y3  y2 )( y3  y4 )
( y  y0 )( y  y1 )( y  y2 )(y y3 )
 x4
( y4  y0 )( y4  y1 )( y4  y2 )( y4  y3 )
Therefore y = 13.6

(10  6)(10  9)(10  11) (10  5)(10  9)(10  11)


y (10)  (12)  (13)
(5  6)(5  9)(5  11) (6  5)(6  9)(6  11)
(10  5)(10  6)(10  11) (10  5)(10  6)(10  9) (10  5)(10  6)(10  9)
 (14)  (16)  (16)
(9  5)(9  6)(9  11) (11  5)(11  6)(11  9) (11  5)(11  6)(11  9)

y (10)  2  (4.333)  11.667  5.333

y (10)  14.6670

Exercise

1. Using Lagrange’s interpolation formula find f (4) from the following table.

x: 1 3 5 7
y: 24 120 336 720

2. Using Lagrange’s interpolation formula find the value of x when y = 20 and when y = 40 from the
following table.

x: 1 2 3 4
y: 1 8 27 64

3. Using Lagrange’s interpolation formula to fit a polynomial to the following table.

x: 0 1 3 4
also find at x = 2
y:  12 0 6 12
NUMERICAL DIFFERENTIATION – NEWTON’S FORWARD DIFFERRENCE
FORMULA

[OR]

NEWTON’S INTERPOLATION FOR DERIVATIVES

Newton’s Forward Interpolation for Derivatives

In general x  x0

First Derivative

dy 1  2u  1 2 3u 2  6u  2 3 4u 3  18u 2  22u  6 4 
 y0   y0   y0   y0  .........
dx h  2 6 24 

Second Derivative

d2y 1  2 6u 2  18u  11 4 
2
 2 
 y0   u  1  3
y0   y0  ......
dx h  12 

Third Derivative

d3y 1  3 12u  18 4 
   y0  12  y0  ......
dx3 h2

Newton’s Forward Interpolation for Derivatives when x  x0 , i.e) u  0

First Derivative

 dy   dy  1 1 1 1 
      y0   2 y0   3 y0   4 y0  ....
  x  x0  u u0
dx dx h  2 3 4 

Second Derivative

 d2y   d2y  1  2 11 4 
 2   2  2   y0   3
y0   y0  ....
 dx  x  x0  dx u u0 h 12 

Third Derivative

 d3y   d3y  1  3 3 4 
 3  3   3   y0  2  y0  ....
 dx  x  x0  dx u u0 h
Newton’s Backward Interpolation for Derivatives

In general x  x0

First Derivative

dy 1  2v  1 2 3v 2  6v  2 3 4v3  18v 2  22v  6 4 


 yn   yn   yn   yn  ....
dx h  2 6 24 

Second Derivative

d2y 1  2 6v 2  18v  11 4 
2
 2 
 yn  ( v  1) 3
yn   yn  .....
dx h  12 

Third Derivative

d3y 1  3 12v  18 4 
 3  yn   yn  .....
dx 3
h  12 

Newton’s Forward Interpolation for Derivatives when x  x0 i.e) v  0

First Derivative

 dy  1 1 1 1 
   yn   2 yn   3 yn   4 yn  ....
 dx  x  xn h  2 3 4 

Second Derivative

d2y 1  2 11 4 
  yn   yn  12  yn  ....
3

dx 2 h2

Third Derivative

d3y 1  3 3 
 3  yn  4 yn  ....
dx 3
h  2 

PROBLEMS
1
3
1. Find the first two derivatives of x and x=50 and x=56 given the table below

X 50 51 52 53 54 55 56
y 3.6840 3.7084 3.7325 3.7563 3.7798 3.8030 3.8259
Solution:
Since x=50 we use Newton Forward difference formula since x+56, we use Newton’s Backward
difference formula

x y y0  2 y0 3 y0
y0  y0
2
3 y0
50 3.6840
0.0244
51 3.7084 3  10 4
0.0241 0
4
52 3.7325 3  10
0.0238 0
4
53 3.7563 3  10
0.0235 0
4
54 3.7798 3  10
0.0232 0
4
55 3.8030 3  10
0.0229
56 3.8259

Consider x=50

x0  uh  x , 50  u (1)  50  u =0

[OR]

QO 50  50
u  u , u0
h 1

Newton’s Forward Interpolation for Derivatives

First Derivative u  0

dy 1   2 y0 3 y0 
  y0    .....
dx h  2 3 

dy 1  1 
 0.0244  (3 104 )  0 
dx 1  2 
dy
 0.02425
dx

Second Derivative u  0

d2y 1
2
 2   2 y0  3 y0  ...
dx h

d2 y
2
 1  3  10 4 
dx

d2y
2
  3 10 4   0.0003
dx
NEWTON’S BACKWARD FORMULA:

Consider x=56

x0  vh  x, 56  v(1)  x, v0

[OR]

Q O 56  56
v  v , v0
h 1

First Derivative v  0

dy 1  1 1 1 
 y0   2 y0  3 yo   4 yo  ...
dx h  2 3 4 

dy 1 
 0.0229 
 3 104  

dx 1  2 

dy
 0.02275
dx
Second Derivative v  0

d2 y 1
2
 2  2 y0  3 y0 
dx h
d2y
2
 1  3 104  0
dx

d2y
2
 3 104  0.0003
dx
2. The table given below reviles the velocity ‘v’ of a body during the time ‘ t’, find its
acceleration at t = 1.1

t 1.0 1.1 1.2 1.3 1.4


v 43.1 47.7 52.1 56.4 60.8

Solution:
Here velocity is given,

dv
Hence Acceleration 
dt
Since t = 1.1 lies in the beginning of the data so we can use Newton’s forward
difference formula.

Now the difference table is

x f(x) v  2v  3v  4v
1.0 43.1
4.6
1.1 47.7  0.2
4.4 0.1
1.2 52.1  0.1 0.1
4.3 0.2
1.3 56.4 0.1
4.4
1.4 60.8

Q O 1.1  1.0
u  u , u 1
h 0.1

Newton’s Forward Interpolation for Derivatives

First Derivative u  0
dy 1  2u  1 2 3u 2  6u  2 3 4u 3  18u 2  22u  6 4 
 y0   y0   y0   y0  .........
dx h  2 6 24 

dy 1  2 1 3 1  6 1  2 4 1  18 1  22 1  6 


 4.6   0.2   0.1   0.1
dx 0.1  2 6 24 

dv dy
i.e)   44.916
dt dx

3. The population of a certain town is given. Find the rate of growth of the population in
the year 1931 – 1971, except 1951.

x 1931 1941 1951 1961 1971


y 40.62 60.80 79.95 103.56 132.65

Solution:
Since x = 1931 lies in the beginning of the data so we can use Newton’s forward
difference formula.

Now the difference table is

x f(x) v  2v  3v  4v
1931 40.62
20.18
1941 60.80  1.03
19.15 5.49
1951 79.95 4.46  4.47
23.61 1.02
1961 103.56 5.48
29.09
1971 132.65

QO 1931  1931


u  u , u0
h 10

The rate of growth of the population

Newton’s Forward Interpolation for Derivatives

First Derivative u  0
dy 1   2 y0 3 y0 
  y0    .....
dx h  2 3 

dy 1  1 1 1 
  20.18   1.03   5.49    4.47  
dx 1  2 3 4 

dy
 23.6425
dx

dy 1  2u  1 2 3u 2  6u  2 3 4u 3  18u 2  22u  6 4 
 y0   y0   y0   y0  .........
dx h  2 6 24 

dy 1  2 1 3 1  6 1  2 4 1  18 1  22 1  6 


 4.6   0.2   0.1   0.1
dx 0.1  2 6 24 

dv dy
i.e)   44.916
dt dx

The rate of growth of the population in 1941

Q O 1941  1971 10
u  u u   u 1
h 10 10

Newton’s Forward Interpolation for Derivatives

First Derivative u  0

dy 1  2u  1 2 3u 2  6u  2 3 4u 3  18u 2  22u  6 4 
 y0   y0   y0   y0  .........
dx h  2 6 24 

dy 1  2(1)  1 3(1)2  6(1)  2 4(1)3  18(1) 2  22(1)  6 


y ' (1941)    20.18   1.03   5.49  (4.47) 
dx 10  2 6 24 
dy 1
y ' (1941)    20.18  0.515  0.915  0.3725
dx 10

dy
y ' (1941)   1.8378
dx

The rate of growth of the population in 1961

Q O 1961  1971
v  v , v  1
h 10
Newton’s Backward Interpolation for Derivatives

First Derivative v  0

dy 1  2v  1 2 3v 2  6v  2 3 4v3  18v 2  22v  6 4 


 yn   yn   yn   yn  ....
dx h  2 6 24 

dy 1  2(1)  1 3(1)2  6(1)  2 4(1)3  18(1)2  22(1)  6 


y ' (1961)   29.09  5.4  0.8  (4.9) 
dx 10  2 6 24 
dy 1  1 1 1 
y ' (1961)    29.09  (5.4)  (0.8)  (4.9) 
dx 10  2 6 12 

dy
y ' (1961)   2.6675
dx

Newton’s Backward Interpolation for Derivatives

First Derivative v  0

 dy  1 1 1 1 
   yn   2 yn   3 yn   4 yn  ....
 dx  x  xn h  2 3 4 
 dy  1 5.41 1.02 4.47 
y 1971      29.09   
 dx  x  xn h  2 3 4 

 dy 
y 1971    3.0105
 dx  x  xn
4. A rod is rotating in a plane. The following table gives the angle 𝜽(in rod) through
which the rod has turned for various values of time‘t’ (in sec). Calculate the angular
velocity and angular acceleration of the rod at t=0.6 sec

t 0 0.2 0.4 0.6 0.8 1.0


𝜽 0 0.12 0.49 1.12 2.02 3.20

Solution:
The difference table is
t 𝜃 ∇𝑦𝑜  2 y0  3 y0  4 y0
0 0
0.12
0.2 0.12 0.25
0.37 0.01
0.4 0.49 0.26 0
0.63 0.01
0.6 1.12 0.27 0
0.9 0.01
0.8 2.02 0.28
1.18
1.0 3.20

Since t = 0.6 lies in end of the table (Backward Difference Formula)


to  vh  t  v(0.2) = 0.6  v = -2
[OR]
Q O 0.6  0.1 0.4
v  v   v  2
h 0.2 0.2
To find Angular velocity
dy 1  2v  1 2 3v 2  6v  2 3 4v3  18v 2  22v  6 4 
 yn   yn   yn   yn  ...
dx h  2 6 24 
dy 1   3  12  12  2 
 1.18     0.28  (0.01) 
dx 0.2   2  6 
d
 3.8166
dt
To find Angular acceleration
d 2 1
2
 2 yo  (v  1)3 yo 
dt h
1
2 
0.28  (2  1)(0.01) 
 
0.2
d 2
 6.75
dt 2
 Angular velocity= 3.8166 rad/sec
Angular acceleration = 6.75 rad/ sec 2
Numerical Integration
TRAPEZOIDAL RULE:

xn h
 x0
f ( x)dx  [( y0  yn )  2( y1  y2  ...  yn 1 )]
2

SIMPSON’S 1/3 AND SIMPSON 3/8 FORMULA.

SIMPSON’S 1 rd RULE:
3

xn h
 x0
f ( x)dx  [( y0  yn )  2( y2  y4  y6  ...)  4( y1  y3  y5  ...)]
3

SIMPSON’S 3 th RULE:
8

xn 3h
 x0
f ( x)dx 
8
[( y0  yn )  3( y1  y2  y4  y5  ...)  2( y3  y6  y9  ...)]

Example: 1
3

 x dx by using (i) Trapezoidal rule (ii) Simpson’s rule verify your results
4
Evaluate by actual
3

integration.

Solution:

Here f ( x)  x  y
4

Integration length b-a = 3+3 = 6 (a = -3, b = 3)

6
So we divided the interval into 6 equal parts with h  1
6

x: 3 2 1 0 1 2 3
y: 81 16 1 0 1 16 81
y0 y1 y2 y3 y4 y5 y6

(i) Trapezoidal rule

xn h
 x0
f ( x)dx  [( y0  yn )  2( y1  y2  ...  yn 1 )]
2
3
h
 x dx  2 ( y  y6 )  2( y1  y2  y3  y4  y5 ) 
4
0
3

3
1
 x dx 
4
(81  81)  2(16  1  0  1  16)
3
2

 x dx  115
4

3

(ii) Simpson’s 1/3rd rule

xn h
 x0
f ( x)dx  [( y0  yn )  2( y2  y4  y6  ...)  4( y1  y3  y5  ...)]
3
3
h
 x dx 
4
( y0  y6 )  2( y2  y4 )  4( y1  y3  y5 )
3
3

3
1
 x dx  3 (81  81)  2(1  1)  4(16  0  16)
4

3

 x dx  98
4

3

(iii) Simpson’s 3/8th rule

xn 3h
 x0
f ( x)dx 
8
[( y0  yn )  3( y1  y2  y4  y5  ...)  2( y3  y6  y9  ...)]

3
3h
 x dx  [( y0  y6 )  3( y1  y2  y4  y5 )  2( y3 )]
4

3
8

3
3
 x dx  8 (81  81)  3(16  1  1  16)  2(0)
4

3

 x dx  99
4

3

(iv)Actual integration
3
3
 x5   35 (3)5 
3     5 
4
x dx 5
  3  5 
3

 x dx  97.2
4

3

Example: 2
6
1
Evaluate I   1  x dx
0
by using (i) Trapezoidal rule (ii) Simpson’s rule

Solution:

1
Here f ( x ) 
1 x

Integration length b-a = 6 - 0 = 6 (a = 0, b =6)

6
So we divided the interval into 6 equal parts with h  1
6

x: 0 1 2 3 4 5 6
y: 1 12 13 14 15 16 17
y0 y1 y2 y3 y4 y5 y6

(i) Trapezoidal rule

xn
h
 f ( x)dx  2 [( y
x0
0  yn )  2( y1  y2  ...  yn 1 )]

6
1 h
0 1  x dx  ( y0  y6 )  2( y1  y2  y3  y4  y5 )
2

6
1 1
 1  x dx  2 (1  1 7)  2(1 2  1 3  1 4  1 5  1 6)
0

6
1
 1  x dx  2.0214
0

(ii) Simpson’s 1/3rd rule


xn
h

x0
f ( x)dx  [( y0  yn )  2( y2  y4  y6  ...)  4( y1  y3  y5  ...)]
3

6
1 h
 1  x dx  3 ( y
0
0  y6 )  2( y2  y4 )  4( y1  y3  y5 ) 

6
1 1
0 1  x dx  (1  1 7)  2(1 3  1 5)  4(1 2  1 4  1 6)
3

6
1
 1  x dx  1.9587
0

(iii) Simpson’s 3/8th rule

xn
3h
 f ( x)dx 
x0
8
[( y0  yn )  3( y1  y2  y4  y5  ...)  2( y3  y6  y9  ...)]

6
1 3h
 1  x dx 
0
8
[( y0  y6 )  3( y1  y2  y4  y5 )  2( y3 )]

6
1 3
 1  x dx  8 (1  1 7)  3(1 2  1 3  1 5  1 6)  2(1 4)
0

6
1
 1  x dx  1.96607
0

Example: 3
5.2
Evaluate I   log
4
e x dx by using (i) Trapezoidal rule (ii) Simpson’s rule

Solution:

Here f ( x)  loge x

Integration length b-a = 5.2 - 4 = 1.2 (a = 4, b = 5.2)

1.2
So we divided the interval into 6 equal parts with h   0.2
6
x: 4 4.2 4.4 4.6 4.8 5 5.2
y  f ( x) : 1.3863 1.4351 1.4816 1.526 1.5686 1.6094 1.6487
 log e x y0 y1 y2 y3 y4 y5 y6

(i) Trapezoidal rule

xn
h
 f ( x)dx  2 [( y
x0
0  yn )  2( y1  y2  ...  yn 1 )]

5.2
0.2
 loge x dx  (1.3863  1.6487)  2(1.4351  1.4816  1.5261  1.5686  1.6094)
4
2

5.2
0.2
 log e x dx  (3.071  15.2416)  1.8276
4
2

(ii) Simpson’s 1/3rd rule

xn
h
 f ( x)dx  3 [( y
x0
0  yn )  2( y2  y4  y6  ...)  4( y1  y3  y5  ...)]

5.2
0.2
 log e x dx  (1.3863  1.6487)  2(1.4816  1.5686)  4(1.4351  1.5261  1.6094)
4
3
5.2

 log
4
e x dx  1.8278

(iii) Simpson’s 3/8th rule

xn
3h
 f ( x)dx 
x0
8
[( y0  yn )  3( y1  y2  y4  y5  ...)  2( y3  y6  y9  ...)]

5.2
3(0.2)
 log e x dx  (1.3863  1.6487)  3(1.4351  1.4816  1.5686  1.6094)  2(1.5261)
4
8
5.2

 log
4
e x dx  1.8278
Example: 4


Evaluate I  sin x dx by using (i) Trapezoidal rule (ii) Simpson’s rule
0

Solution:

Here f ( x)  sin x

Integration length b  a    0  


So we divided the interval into 8 equal parts with h 
8

 2 3 4 5 6 7 8
x: 0
8 8 8 8 8 8 8 8
y  f ( x) : 0 0.3827 0.7071 0.9239 1 0.9239 0.7071 0.3827 0
 sin x y0 y1 y2 y3 y4 y5 y6 y7 y8

(i) Trapezoidal rule

xn
h
 f ( x)dx  2 [( y
x0
0  yn )  2( y1  y2  ...  yn 1 )]



 sin x dx  (0  0)  2(0.3827  0.7071  0.9239  1  0.9239  0.7071  0.3827)
0
16

 sin x dx  1.9743
0

(ii) Simpson’s 1/3rd rule

xn
h
 f ( x)dx  3 [( y
x0
0  yn )  2( y2  y4  y6  ...)  4( y1  y3  y5  ...)]

5.2
0.2
 log e x dx  (1.3863  1.6487)  2(1.4816  1.5686)  4(1.4351  1.5261  1.6094)
4
3
5.2

 log
4
e x dx  1.8278
(iii) Simpson’s 3/8th rule

xn
3h
 f ( x)dx 
x0
8
[( y0  yn )  3( y1  y2  y4  y5  ...)  2( y3  y6  y9  ...)]

5.2
3(0.2)
 loge x dx  (1.3863  1.6487)  3(1.4351  1.4816  1.5686  1.6094)  2(1.5261)
4
8
5.2

 log
4
e x dx  1.8278

Example: 5
6
1
Evaluate  1 x
0
2
dx by using Trapezoidal rule. Verify the answer with direct integration.

Solution:

1
Here y  f ( x) 
1  x2

Integration length b-a = 6 - 0 = 6 (a = 0, b =6)

6
So we divided the interval into 6 equal parts with h  1
6

x: 0 1 2 3 4 5 6
1
y : 1 12 15 1 10 1 17 1 26 1 37
1  x2
y0 y1 y2 y3 y4 y5 y6

There are 7 ordinates (n = 6)

Trapezoidal rule

xn
h
 f ( x)dx  2 [( y
x0
0  yn )  2( y1  y2  ...  yn 1 )]

6
1 h
 1 x
0
2
dx  [( y0  y6 )  2( y1  y2  y3  y4  y5 )]
2
6
1 1
 1 x 2
dx  (1  1 37)  2(1 2  1 5  1 10  1 26  1 37) 
0
2

6
1
0 1  x 2 dx  1.41079950
We know that

6
1
0 1  x 2  
1 6
dx  tan x  tan 1 6 1.4056
0

Exercise
1
1
1. Evaluate  1 x
0
2
dx by using Trapezoidal rule. Verify the answer with direct integration.

e
 x2
2. Evaluate dx by using Trapezoidal rule.
0

6
3. Evaluate  y dx
0
by using (i) Trapezoidal rule (ii) Simpson’s rule.

DOUBLE INTEGRATION

Trapezoidal Rule
y0  k x0  h
hk
  f ( x)dx   Sum of the values of f at the four corners 
y0 x0
4 
 Sum of the values of f at the remaining 
 2 
 nodes on theboundary 
 4  Sum of the values of f at the int erior nodes  
Simpson’s rule

y0  k x0  h
 Sum of the values of f at the four corners 
hk 
 
y0 x0
f ( x)dx    Sum of the values of f at the odd positions 
9 2  
  on the boundary except the corners 
 Sum of the values of f at the even positions 
 4 
 on the boundary 
4  Sum of the values of f at odd positions  
 
 8  Sum of the values of f at even positions  on 
the odd rows of the matrix except boundary rows 
 
8  Sum of the values of f at odd positions  
 
 16  Sum of the values of f at even positions  on 
the even rows of the matrix . 
 
2 2
dxdy
1.Evaluate   by using Trapezoidal rule and Simpson’s rule with h = k = 0.25
1 1
x y

Solution:

1
Given h = k = 0.25 and f ( x) 
x y

x
1 1.25 1.5 1.75 2
y
1 0.5 0.444 0.4 0.3636 0.33

1.25 0.444 0.4 0.3636 0.333 0.3076

1.5 0.4 0.3636 0.33 0.3076 0.2857

1.75 0.3636 0.33 0.3076 0.2857 0.2666

2 0.33 0.3076 0.2857 0.2666 0.25


Trapezoidal Rule:
0.25  0.25
2 2
dxdy
 x y   0.5  0.33  0.25  0.33  2  0.444  0.4  0.3636  0.3076  0.2857  0.2666 
1 1
4
0.2666  0.2857  0.3076  0.3636  0.4  0.444   4  0.4  0.3636  0.333 
0.3076  0.2857  0.3076  0.33  0.3636  0.33 
 0.015625 1.41  2  4.135   4  3.0211 
 0.3401

Simpson’s Rule:

x y 1 1.25 1.5 1.75 2


Boun Even Odd Even Boun
1 Boun 0.5 0.444 0.4 0.3636 0.33

1.25 Even 0.444 0.4 0.3636 0.333 0.3076

1.5 Odd 0.4 0.3636 0.33 0.3076 0.2857

1.75 Even 0.3636 0.33 0.3076 0.2857 0.2666

2 Boun 0.33 0.3076 0.2857 0.2666 0.25

0.25  0.25
2 2
dxdy
 x y   0.5  0.33  0.25  0.33  2  0.4  0.2857  0.4  0.2857  
1 1
9
4  0.444  0.3636  0.3076  0.2666  0.444  0.3636  0.3076  0.2666  
4  0.33  8  0.3636  0.3076   8  0.3636  0.3076   16  0.4  0.333  0.33  0.2857 
 .0069  1.41  2 1.3714   4  2.7636   4  0.33  8  0.6712   8  0.6712   16 1.3487 
 0.337

METHOD TWO

1
Given h = k = 0.25 and f ( x) 
x y

x y 1 1.25 1.5 1.75 2


2 2 2
1 0.5 0.444 0.4 0.3636 0.33

1.25 2 0.444 0.4 0.3636 0.333 0.3076

1.5 2 0.4 0.3636 0.33 0.3076 0.2857

1.75 2 0.3636 0.33 0.3076 0.2857 0.2666

2 0.33 0.3076 0.2857 0.2666 0.25


Trapezoidal Rule:

0.25  0.25
2 2
dxdy
 x y   0.5  0.33  0.25  0.33  2  0.444  0.4  0.3636  0.3076  0.2857  0.2666 
1 1
4
0.2666  0.2857  0.3076  0.3636  0.4  0.444   4  0.4  0.3636  0.333 
0.3076  0.2857  0.3076  0.33  0.3636  0.33 
 0.015625 1.41  2  4.135   4  3.0211 
 0.3401

Simpson’s Rule:

x y 1 1.25 1.5 1.75 2


Boun Even Odd Even Boun
1 Boun 0.5 0.444 0.4 0.3636 0.33

1.25 Even 0.444 0.4 0.3636 0.333 0.3076

1.5 Odd 0.4 0.3636 0.33 0.3076 0.2857

1.75 Even 0.3636 0.33 0.3076 0.2857 0.2666

2 Boun 0.33 0.3076 0.2857 0.2666 0.25


0.25  0.25
2 2
dxdy
 x y   0.5  0.33  0.25  0.33  2  0.4  0.2857  0.4  0.2857  
1 1
9
4  0.444  0.3636  0.3076  0.2666  0.444  0.3636  0.3076  0.2666  
4  0.33  8  0.3636  0.3076   8  0.3636  0.3076   16  0.4  0.333  0.33  0.2857 
 .0069  1.41  2 1.3714   4  2.7636   4  0.33  8  0.6712   8  0.6712   16 1.3487 
 0.337

1.4 2.4
1
2.Evaluate   xy dxdy by using Trapezoidal rule and Simpson’s rule with h = k = 0.25
1 2

Solution:
Divide the range of x and y in to four equal parts.

2.4  2 1.4  1
h  0.1, k  0.1
4 4
1
Given f ( x) 
xy

x
2 2.1 2.2 2.3 2.4
y
1 0.5 0.4762 0.4545 0.4348 0.4167

1.1 0.4545 0.4329 0.4132 0.3953 0.3788

1.2 0.4167 0.3968 0.3788 0.3623 0.3472

1.3 0.3846 0.3663 0.3497 0.3344 0.3205

1.4 0.3571 0.3401 0.3247 0.3106 0.2976


Trapezoidal Rule:
0.1 0.1
1.4 2.4
1
  xy dxdy   0.5  0.4167  0.3571  0.2976   2  0.3846  0.4167  0.4545  0.4762  0.4545 
1 2
4
0.4348  0.3788  0.3472  0.3205  0.3106  0.3247  0.3401  4  0.4329  0.4132 
0.3953  0.3968  0.3788  0.3623  0.3663  0.3497  0.3344  
 0.0025 1.5714  9.2864  13.7188
 0.0614

Simpson’s Rule:

x y 2 2.1 2.2 2.3 2.4


Boun Even Odd Even Boun
1 0.5 0.4762 0.4545 0.4348 0.4167
Boun
1.1 0.4545 0.4329 0.4132 0.3953 0.3788
Even
1.2 0.4167 0.3968 0.3788 0.3623 0.3472
Odd
1.3 0.3846 0.3663 0.3497 0.3344 0.3205
Even
1.4 0.3571 0.3401 0.3247 0.3106 0.2976
Boun

0.1 0.1
1.4 2.4
 0.5  0.4167  0.3571  0.2976   2  0.4167  0.4545  0.3742  0.3247   4
1
  xy dxdy 
1 2
9
 0.3846  0.4545  0.4762  0.4348  0.3788  0.3205  0.3106  0.3401  0.3788 
 8  0.3968  0.3623  0.3497  0.4132   16  0.3663  0.3344  0.4329  0.3953 
 0.001155.2116
 0.0613
RELATION BETWEEN OPERATORS
1. Define the operator E . What is it called?
Solution:

Let y  f ( x) be a function of x and x, x  h, x  2h. be the consecutive values of x . The operator E


is defined such that Ef ( x)  f ( x  h) . Thus when E operators on f ( x ) , the result is the next value of
the function. So E is called the shifting or translation operator, if y x is the function of f ( x ) , we have
Eyx  yxh .

2. Express (  3  2) in terms of the operator E .


2

Solution:

Since   E  1,

3. Prove that E   E

The operators E and  commute with each other.

4. Find ( E  1) x taking h  1 .
3

Solution:


2

5. Prove the operator identity: E   


 
Solution:
1 1
We know that   E  1 and   E 2 E 2
6. Prove that    2 .
Solution:

1
7. Evaluate ( E ) x .
2

Solution:

8. Show that     .

1 1 1
9. Prove that ( E 2
E 2
)(1  ) 2
 2 .
Solution:
10. Write the distributive, commutative and idex laws of the operator  .

Solution:

   f ( x)  g ( x)  f ( x)  g ( x) (distributive law)


 If c is a constant,
 cf ( x)  c.f ( x) (Commutative law).  is commutative only with respect to a
constant.

 If m and n are positive integers,


m n f ( x)  mn f ( x) . (index law)

Taking h to be the interval of differencing, find  (e ).


2 x

Solution:

(e x )  e( x  h )  e x  e x (eh  1)
m 2 x
 (e )  (e x )   e x (eh 1 ) 
n
 (eh 1 )e x ( eh  1is a constant)
 (eh 1 )e x (eh 1 )  e x (eh 1 ) 2

11. If f ( x)  2 , show that f ( x)  f ( x).


x

Solution:

 f ( x) 
12. Prove that  log f ( x)  log 1 
f ( x) 
.

Solution:
13. Find f ( x ) , if f ( x)  x  2 x  2 and the interval of differencing is unity.
2

Solution:

14. Find ( x  x  1) taking h=1.


2

Solution:

15. If f ( x)  x  2 x  2, find  f ( x), taking the interval differencing as 1.


2 2

Solution:

16. Using the interval of differencing, prove that f ( x) g ( x)  f ( x)g ( x)  g ( x  1)f ( x) .


Solution:

17. If u ( x)  u ( x  1)  u ( x), find  u ( x) if u ( x)  x  3x  2


2 2

Solution:

18. Define the operator,  and find the relation connecting  and E .
Solution:

 is called the averaging operator and defined as

1 1
19. Prove that E 2
   .
2
Solution:

We know that
20. Find the nth difference of e x .
Solution:

21. What is the relation between the operators E and D?


Solution:

E  e hD

22. Prove the following

Solution:
23. Write the expression for the derivative operator D in terms of the forward difference
operator Δ.
Solution:

The required expression is

UNIT III(Interpolation)

Question Bank

1. Evaluate (i) n (e axb ) (ii) n sin( ax  b) (iii) n cos( ax  b)

(iv) log( ax  b) (v) (tan 1 x) (vi)  log f ( x)

2. Prove the results: (i) E    E (ii) E 1 / 2   (iii)        2

1 2 2
(iv)      1 (v) (1  )(1  )  1
2 4

3. Find the values of y at x = 21 and x = 28 from the following data.

X : 20 23 26 29

Y : 0.3420 0.3907 0.4384 0.4848

4. The population of a town is as follow.

Year : 1941 1951 1961 1971 1981 1991

Pop. : 20 24 29 36 46 51

Estimate the population increase during the period 1946 to 1976

5. From the following data, find $ at x = 43 and x = 84

x : 40 50 60 70 80 90

$ : 184 204 226 250 276 304


Also the express $ in terms of x

6. From the following data, find  at x = 43 and x = 84.

x: 40 50 60 70 80 90

 : 184 204 226 250 276 304

Also express  in terms of x.

7. Using Newton’s divided difference formula, find the values of f ( 2),

f (8), and f (15) given the following table:

x : 4 5 7 10 11 13

f (x ) : 48 100 294 900 1210 2028

8. Using Lagrange’s interpolation formula, find y (10) from the following table

x: 5 6 9 11

y: 12 13 14 16

9. Find the first two derivatives of (x) 1 / 3 at x = 50 and x = 56 given the

table below:

x: 50 51 52 53 54 55 56

y: 3.684 3.708 3.732 3.756 3.779 3.803 3.825

1
dx
10. Evaluate 1 x
0
2
, using Trapezoidal rule with h = 0.2. Hence obtain

an approximate value of  . Can you use other formulae in this case.


5.2
11. Evaluate the integral I   log
4
e xdx using Trapezoidal, Simpson’s rule.


12. By dividing the range into ten equal parts, evaluate  sin xdx by
0

Trapezoidal and Simpson’s rule. Verify your answer with integration.


1

e
x
13. Evaluate dx by simpson’s one-third rule correct to five decimal
0

places, by proper choice of h.

2
sin x
14. Evaluate 
1
x
dx taking 6 intervals.

15.Fit a polynomial to the given data below.

Weight(in kg) : 20-40 40-60 60-80 80-100 100-120

No. of students : 250 120 100 70 50

1
dx
16. Evaluate 1 x
0
correct 3 decimal places by trapezoidal rule with

h = 0.5, 0.25, 0.125.

You might also like