Professional Documents
Culture Documents
Numerical Methods T264 Unit IIIBy DR NVNagendram
Numerical Methods T264 Unit IIIBy DR NVNagendram
net/publication/268872679
CITATIONS READS
0 37,416
1 author:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
I am doing research work on near-fields and extensions simultaneously non-commutativity of the same area under algebra of mathematics advanced View project
Create new project "Abstract near-filed spaces with right sub near-field space over a near-field of Algebra in Statistics" View project
All content following this page was uploaded by Nimmagadda Venkata Nagendram on 30 November 2014.
3.7 Interpolation
Errors which are already involved in the statement of a problem before its
solution are called “Inherent Errors”. These types of errors arise either due
to the given data being approximate or due to the limitations of math tables
calculations or the digital computer.
Errors which arise from the process of rounding off the number during the
calculations are known as “rounding error”.
Let two numbers each having n digits be multiplied and the resulting
number which will contain 2n digits be rounded to „n‟ digits. Indoing so, “a
round – off error is introduced”.
This is the source of the so called “Rounding of Errors”. Rounding errors can
be reduced by
(ii) retaining at least one or more significant figure at each step than that
given in the data and rounding off at the last step.
x3 x5 x7 x3 x5 x7
Example: if sin x = x + + ......... in this + + ......... is replaced
3! 5! 7! 3! 5! 7!
by x then sin x = x - x.
The magnitude of the error in the value of the function due to cutting
(truncation) of its series is equal to the sum of all the discarded terms.
It may be large and may even exceed the sum of the terms retained, thus
making calculated result meaningful.
Definition: Absolute error (or) relative (or) % errors: AE / RE / PE:
If x is the value of a quantity and x* is the its approximate value and then
| x – x* | is called “Absolute error E0”.
x - x*
Relative error: Er = .
x
x - x*
% Error: Ep = 100 Er = 100 .
x
Note: The relative error, % errors are independent and absolute error is the
expression in terms of Er , Ep of these units.
1
Note: If a number is correct to n decimal places, then the error is .10 n .
2
f f
y + y = ( x1 + x1 ,x2 + x2) = f(x1, x2 ) + .x1 + .x 2 + terms involving
x1 x 2
high powers of x1, x2 are infinitesimal their squares and higher powers
can be neglected.
f f f f
Then, y + y = f( x1, x2) + .x1 + .x 2 y = .x1 + .x 2
x1 x 2 x1 x 2
y y x1 y x 2 y x n
Relative error is Er = = . + . +.....+ .
y
1x y 2 x y
n x y
Example: Rnd(37.8692) = significant figure (37.87)
Example: Rnd(865200)
= Ea = | x – x* | = | 865250 – 865200 | = 50
x - x* 865250- 865200 50
Er = = 6.71 X 105
x 865250 865250
x - x*
Ep=ErX100= = 100 X 6.71 X 105 = 6.71 X 103
x
x - x*
Ep=ErX100= = 100 X 6.27 X 105 = 6.27 X 103
x
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Lecture-2
Definition: Finite Differences:
The calculus of finite differences deals with the changes that take place in
the value of a function due to finite changes in the independent variable.
Let y0, y1, y2, . . . . . . . , yn be a set of values of any function y = f( x ).
Note: if is operator
y2 = ( 1 + )2 y0
y3 = ( 1 + )3 y0
Therefore for k, yk = ( 1 + )k y0
= ( y4 - 4 y3 + 6y2 – 4 y1 + y0 )
xi 0 2 4 6 8 10 12 14
[Ans:384
Problem # 02: Construct a diagonal difference table for the following set of
values:
xi 1 2 3 4 5
yi 4 13 34 73 136
[Ans:0
Problem # 03: Find (i) eax (ii) 2 eax and evaluate (iii) tan-1 x
h
[Ans: i) eax (eah -1) ii) (eh -1)2 ex iii) tan-1 2
x + hx + 1
Problem # 04: Prove (i) . = - (ii) - = + (iii) E = E=
Problem #05: Evaluate (i) sin (ax + b) (ii) 2 [3 ex (iii) [ eax log bx
5 x + 12
Problem # 06: Evaluate 2 2 taking the interval of differencing
x + 5x + 6
being one unit?
2(5 x + 16)
[Ans: 3
x + 9 x + 26x + 24
2
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Solutions on errors, Diagonal Difference tables Tutorial-01
Problem # 01: Construct a diagonal difference table for the following set of
values:
xi 0 2 4 6 8 10 12 14
[Ans: 384
xi yi yi 2 yi 3 yi 4 yi 5 yi
0 625
-544
2 81 464
-80 -384
4 1 80 384
0 0 0 Forward
6 1 80 384
80 384 0 Central
8 81 464 384
1776 1152
12 2401 2384
4160
14 6561
Problem # 02: Construct a diagonal difference table for the following set of
values:
xi 1 2 3 4 5
yi 4 13 34 73 136
[Ans:0
x Y y 2 y 3 y 4 y
1 4
2 13 12
21 6
3 34 18 0
39 6
4 73 24
63
5 136
Problem # 04: Prove (i) . = - (ii) - = + (iii) E = E=
Solution: to prove (i) . = -
Solution:
To evaluate (ii)
To evaluate (iii)
Consider,
5 x + 12
Problem # 06: Evaluate 2 2 taking the interval of differencing
x + 5x + 6
being one unit?
2(5 x + 16)
[Ans: 3
x + 9 x + 26x + 24
2
5 x + 12
Solution: let f( x ) = 2 and given h = 1
x + 5x + 6
2 f( x ) = ( f( x )) = [ f ( x + 1) – f ( x ) = [ f ( x + 1) – [f ( x )
= f( x + 2) – 2 ( f( x + 1 ) + f( x )
5( x + 2) + 12 5( x + 1) + 12 5 x + 12
= 2
2 2 + 2
( x + 2) + 5( x + 2) + 6 ( x + 2) + 5( x + 2) + 6 x + 5 x + 6
2(5 x + 16)
= 3 Hence the solution.
x + 9 x + 26x + 24
2
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Backward Differences Lecture-3
Definition: Differences of a polynomial:
“The nth differences of a polynomial of the nth degree are constant when the
values of independent variable are at equal intervals and all higher order
differences are zero”. Converse is true.
Here let x = h,
(1) – (2)
y = f( x + x ) - f( x ) = an n h xn-1 +
[ n(n 1) a 0 h 2 + a 1 (n - 1) h x n -2 + [ n(n 1)( n 2) a 0 h 3 + (n 1)( n 2) a1 h 2 + a 2 (n - 2) h x n -3 + -
1 1 1
2 6 2
Let y0, y1,y2, . . . . . . . ,yn-1, yn denote the values of any function y = f( x ). Then
The difference y1 - y0, y2 - y1, y3 - y2, . . . . . . . , yn - yn-1 denoted by y1, y2,
y3, y4, . . . , yn respectively are called the “First Backward Differences”
and operator is known as “Backward difference operator”.
yn = yn - yn-1
The differences of the First Backward Differences are called “Second
Backward Differences” and are denoted by 2y2, 2y3, . . . , 2yn etc.,
= yn - 2.yn + 2yn
Problem: Form the backward Difference Table for the given set of values:
x 1 3 5 7 9
y 8 12 21 36 62
Let y0, y1,y2, . . . . . . . ,yn-1, yn denote the values of any function y = f( x ). Then
The difference y1 - y0, y2 - y1, y3 - y2, . . . . . . . , yn - yn-1 denoted by y 1 , y 3 ,
2 2
y 1 = y0 = y1 ; y 3 = y1 = y2 ; y 5 = y2 = y3 ;...... yn+1/2= yn = yn+1
2 2 2
For n = 0,1,2,.....
The first central differences of the first central differences are called the
second central differences and are denoted by 2y1, 2y2, 2y3, ......Thus,
2y1 = y 3 - y 1 , 2y2 = y 5 - y 3 , ....., 2yn = yn+1/2 - yn-1/2. Similarly,
2 2 2 2
Higher Order Central Differences are defined as 2y2 - 2y1 = 2y3/2 and so on.
X y 1st diff 2nd diff 3rd diff 4th diff 5th diff
x0 0
y1/2
x1 1 2y1
y3/2 3y3/2
x2 2 2y2 4y2
y5/2 3y5/2 5y5/2
x3 3 2y3 4y3
y7/2 3y7/2
x4 4 2y4
y9/2
x5 5
Difference Operator E and :
E f( x ) = f( x + h ),
E2 f( x ) = f( x + 2h ),
E3 f( x ) = f( x + 3h ),
............................,
En f( x ) = f( x + nh )
E-1 yx = yx-h
is defined by, yx = 1
y x 1 / 2 h y x 1 / 2 h
2
- Delta operator
- Del operator
01. = E – 1 or E = 1 +
02. = 1 – E–1
04. =
2
1 1/2
E - E -1/2
Proof: yx =
1
2
2
y x +1/2.h y x 1 / 2.h = 1 E 1/2 - E -1/2 yx
Consider, E – 1 = .E1/2 = E =
06. ( 1 + ) ( 1 - ) = I
Proof: f( x ) = f( x + h ) – f ( x ) = ( E – 1 ) f( x )
= ( E – 1 ) or E = 1 +
f( x ) = f( x ) – f ( x - h ) = ( 1 - E–1 ) f( x )
= ( 1 - E–1 ) or E–1 = 1 -
(1 + ) ( 1 - ) = EE-1 = I
1 2
07. 2 = 1 +
4
=
2
1 1/2
E - E -1/2
2 =
1
4
E - E -1 + 2
=
1 2
4
+2 +2
1 2
= +1
4
1 2
2 = ( +1 )
4
08. E = ehD
Proof: Ef( x ) = f( x + h)
h2
= f( x ) + h. f ( x ) + f ( x ) +..........
2!
h2
= f( x ) + h. D f( x ) + D2 ( x ) +..........
2!
= f( x ) [ 1 + hd + h2d2 + ...............
x[0 = 1
x[n = xn
.......................
.......................
x n +1
x[n = ......................(2)
(n +1).h
m 1
(1), (2) Sm = x
i 0
i
n + 1
=
1
n(n + 1)
x m[ n +1 x0[ n +1
Similar to Newton – Leibnitz formula for a positive integral.
Inverse Operator -1 for finite Integration:
Formulae:
e ax + b ex
01.-1 (eax+b) = if a = 1, b = 0 then -1ex =
e ab 1 e h 1
ax
02. -1 (ax) = h a 1
a 1
04.-1(cux ) = c.-1 ux
(a + bx) ( n + 1)
05.-1 (ax + b)(n) = , n -1
(n + 1).hb
x ( n + 1)
06. -1 (xn) = n -1, h = 1
n +1
1 1
07. -1 = , n 1
(ax + b) n
b(n 1)(ax + b) n 1
1 1
08. -1 | n|
=
x (n - 1) x ( n - 1)
Summation series:
Let Sn = v1 + v2 + v3 + v4 + ....... + vn = vi for i= 1,2,...,n
Let vi = ui ui = -1vi
vi = ui = ui+1 - ui (n = 1)
v1 = u1 = u2 – u1
v2 = u2 = u3 – u2
vn = un = un+1 – un
u0 xu 0 x 2 2 u 0
u0 + u0x + u2 x2 + ........... = + + + ...........
1 x (1 x) 2 (1 x) 3
= [1 + x E + x2 E2 + .......... u0
= [1 - xE-1 u0
1
= u0
1 xE
1
= u0 (since, E = 1 + )
1 x(1 + )
1
= u0
1 x x
1
= u0
x
(1 x) 1
1 x
x
=
1
1 -1 u0
(1 x) 1 x
1 x x 2 2
= (1 + + + ........) u0
(1 x) 1 x (1 x) 2
u0 xu0 x 2 2 u0
u
i0
i x i
=
(1 x)
+ +
1 x (1 x) 2
+ .......................................................
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Tutorial-2
Problem # 01: Prove that 3 y2 = 3y5.
Problem # 02: Find the cubic polynomial in x for the given data below:
x 0 1 2 3 4 5
y -3 3 11 27 57 107
Problem # 05: Find the 7th term of 2, 9, 28, 65, 126, 217 and general term?
1 (1) n
Problem # 07: Evaluate n( )? [Ans.
x x( x + 1)(x + 2)(x + 3)......(x + n)
f( x )
Problem # 08: Prove that log f( x ) = log 1 +
f( x )
Problem # 09: Find the difference table of f( x ) and E f( x ) for given data:
Problem # 02: Find the cubic polynomial in x for the given data below:
X 0 1 2 3 4 5
Y -3 3 11 27 57 107
x( x 1) 2 x( x 1)( x 2) 3
Now, yx = Ex (y0) = (1 + )xy0 = {1 + x + + y0
2 3!
x( x 1) 2 x( x 1)( x 2) 3
= y0 + xy0 + y0 + y0
2 3!
x( x 1) x( x 1)(x 2)
= - 3 + 6x + (2) + (6)
2 3!
= - 3 + 6x + x( x 1) + x( x 1)(x 2)
= x3 – 2x2 + 7x – 3
= R.H.S.
put x = 0, D = -10
put x = 1, C + D = -8 or C = 2
put x = 2, 2B + 2C + D = 0 or B = 3
3f( x ) = 2.3.2.1
Solution:
So, y6 = 344.
Genereal term:
n( n 1) n(n 1)( n 2)
= 2 + n(7) + (12) + (6) +0
2 6
= 2 + 7n + 6n2 – 6n + n3 – 3n2 + 2n
= n3 + 3n2 + 3n + 2
= (n+ 1)3 + 1
1 (1) n
Problem # 07: Evaluate n( )? [Ans.
x x( x + 1)(x + 2)(x + 3)......(x + n)
1 1
Solution: Consider, L.H.S. = n( ) = n-1 ( )
x x
1 1 1 1 1 ( 1) 2
Now, ( )= - =- and Also, 2( ) =
x x+1 x x( x + 1) x x( x +1)(x + 2)
1 ( 1) n
On repeating the process, we get n( )=
x x( x + 1)(x + 2).......(x + n)
f( x )
Problem # 08: Prove that log f( x ) = log 1 +
f( x )
f( x + h) = E f ( x ) Ef(x)
f( x + h) f( x )
f ( x + h ) = (f( x ) + f( x ) implies that = +1
f( x ) f( x )
f( x + h) f( x )
On taking logarithms both sides, we get log = log 1 +
f( x ) f( x )
f( x )
log f ( x + h ) – log f( x ) = log 1 +
f( x )
f( x )
[log f ( x + h ) – log f ( x ) = log f ( x ) = log 1 +
f( x )
Solution:
0.20 1.6596
102
0.22 1.6698 4
106 27
0.24 1.6804 31
137 -81
87 81
0.28 1.7028 31
118 -27
0.30 1.7146 4
122
0.32 1.7268
On observation 3f( x ) = 27 – 81 + 81 – 27 = 0
Y6 = (1 + 6 + 152 + 203)y0
Y6 = y0 + 6 y0 + 152 y0 + 203y0
Table as :
x f( x ) f( x ) 2f( x )
18 -7
2 9
20 2
24
Y6 = 138.
Problem # 12: Find the missing data in the following data table
X 0 1 2 3 4
f( x ) 1 3 9 - 81
n(n 1)
Problem # 13: Prove that nyn-1 = yx – n yn-1 + y n 2 + - - - - - +(-1) n y x n .
2
Problem # 15: Show that (u1 – u0) – x(u2 – u1) + x2 (u3 – u2) + ------- to =
u 0 x2 u 0 x 2 3 u 0
+ + ........... .
1+ x (1 + x) 2 (1 + x) 3
(n + 1)n(n+ 1) n(n + 1)
2
Problem #02. Find the value of y from the following data at x = 0.47?
x: 0.0 0.1 0.2 0.3 0.4 0.5
y: 1.0000 1.1103 1.2428 1.3997 1.5836 1.7974
[Ans. 1.7299
Problem #03. The following data given, the values of y are consecutive
terms of which 23.6 is the 6th term. Find the first and tenth terms of the
series.
x: 3 4 5 6 7 8 9
y: 4.8 8.4 14.5 23.6 36.2 52.8 73.9
[Ans. 3.1, 100
Problem #04. Usin the Newton‟s forward interpolation formula and find the
value of sin 520 from the following data. Estimate the error
x: 450 500 550 600
y=sin x: 0.7071 0.7660 0.8192 0.8660
[Ans. 0.0000392
Problem #05. The following data gives the distance in nautical miles of the
visible horizon for the given heights in feet above the earths surface.
Height :x 100 150 200 250 300 350 400
Distance:y 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find y when x = 218 ft. and when x = 410 ft.? [Ans. 15.7, 21.53 naut. miles
Problem #06. The following data of the function f( x ) = 1/x find 1/ 2.72
using quadratic interpolation. Find an Estimate Error.
X 2.7 2.8 2.9
f( x ) 0.3704 0.3571 0.3448
[Ans. 0.5 X 10-5
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Problems Tutorial-5
Problem #01. The following data given , find the number of students whose
weight is between 60 and 70.
Wt Kg x: 0-40 40-60 60-80 80-100 100-120
No of 250 120 100 70 50
Students
Ans. y(70)- y(60) = 54
Problem #03. Find the cubic polynomial which takes the following values.
X 0 1 2 3
f( x ) 1 2 1 10
Hence or otherwise evaluate f ( 4 )? [Ans. 41
Problem #04. The following data given, estimate the number of students
who obtained marks between 40 and 45.
Marks: 36-40 40-50 50-60 60-70 70-80
N of stu: 31 42 51 35 31
[Ans. 17
Problem #05. Find a polynomial of degree two which takes the values
x: 0 1 2 3 4 5 6 7
y: 1 2 4 7 11 16 22 29
[Ans. ½( x + x + 2)
2
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Summary SUM-01
y = f( x ) = b0 + b1 ( x – x0 ) + b2( x – x0 )( x – x1 )+ b3 ( x – x0 ) ( x – x1 ) ( x – x3 ) +
-------------------- +bn ( x – x0 )( x – x1 )........( x – xn-1 ) ................ (A)
This polynomial passes through all the points [xi, yi for i = 0, 1, 2,...,n.
therefore, we can obtain the yi „s by substituting the corresponding xi ‟s as:
At x = x0 , y0 = b0
At x = x1 , y1 = b0 + b1 ( x1 – x0 )
y0 = b0
y1 = b0 + b1h
y2 = b0 + b12h + b22hh
b0 = y0
y b0 y1 y 0 y 0
b1 = 1 = =
h h h
b2 =
y y0
y2 y0 1 2h
y 2 b0 b1 2h h y 2 y 0 2 y1 2 y 0 y 2 2 y1 y 0 2 y 0
= = = =
2h 2 2h 2 2h 2 2h 2 2h 2
2 y 0
b2 =
2! h 2
3 y 0 4 y 0 5 y 0 n y 0
Similarly, we can see that b3 = , b4 = , b5 = ,..., bn = ,
3! h 3 4! h 4 5! h 5 n! h n
y = f( x )
y 0 2 y 0 3 y 0
= y0 + ( x – x0 ) + ( x – x0 )( x – x 1 )+ ( x – x0 ) ( x – x1 )
h 2! h 2 3! h 3
n y 0
( x – x3 ) + -------------------- + ( x – x0 )( x – x1 )........( x – xn-1 ) .. (3)
n! h n
If we us the relationship x = x0 + ph x - x0 = ph where p = 0, 1, 2,..., n
then x – x1 = x – ( x0 + h) = ( x – x0 ) – h = ph – h = ( p -1 )h
x – x2 = x – ( x1 + h) = ( x – x1 ) – h = (p - 1)h – h = ( p -2 )h
...........................................................................................
...........................................................................................
x – xi = (p – i )h
...........................................................................................
...........................................................................................
x – xn-1 = [p – (n-1)h
Equation (3) becomes,
y = f( x ) = f(x0 + ph)
p( p 1) 2 p( p 1)( p 2) 3
=y0+p y0 + y0 + y 0 +-----------------------
2! 3!
p( p 1)( p 2).....[p (n 1) n y 0
+ ............... (4)
n!
This formula is known as “Newton’s forward interpolation formula” or
“Newton’s Gregory forward interpolation formula”.
Uses: This formula for interpolation near the beginning of a set of tabular
values.
NEWTON’S BACKWARD INTERPOLATION FORMULA:
and impose the condition that y and yn(x) should agree at the tabulated
points xn, xn-1, xn-2, xn-3, ......., x2, x1, x0 .
we obtain yn(x) =
p( p + 1) 2 p( p + 1)( p + 2) 3
yn+p y n + yn + y n +-----------------------
2! 3!
p( p + 1)( p + 2).....[p + (n 1) n y n
+ ............... (6)
n!
x xn
Where p =
h
Uses: This formula is useful for tabular values to the left of yn and also
useful for interpolation near the end of the tabular values.
( x x0 )(x x1 )....(x x n )
Error = f( x ) - n( x ) = f n 1
( ) .......... ............... (7)
(n + 1) !
p( p 1)( p 2)....(p n) n +1 x xn
f( x ) - n( x ) = f ( ) where p = ........... (8)
(n + 1) ! h
p( p + 1)( p + 2)....(p + n) n +1 x xn
f( x ) - n( x ) = h f n +1
( ) where p = ....... (9)
(n + 1) ! h
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Summary on Formulae SUM-03
..... .....
From the table, we note the following:
y0 = y-1 + 2y-1,
2y0 = 2y-1 + 3y-1,
3y0 = 3y-1 + 4y-1,
4y0 = 4y-1 + 5y-1 ................................................................ and so on (1).
And
y-1 = y-2 + 2y-2,
2y-1 = 2y-2 + 3y-2,
3y-1 = 3y-2 + 4y-2,
4y-1 = 4y-2 + 5y-2
5y-1 = 5y-2 + 6y-2 ................................................................ and so on (2).
By using the expressions (1) and (2), we now obtain two versions of the
following Newton‟s Forward interpolation Formula:
yp =
p( p 1) 2 p( p 1)( p 2) 3 p( p 1)( p 2)( p 3) 4
y 0 + p(y 0 ) + ( y 0 ) + ( y 0 ) + ( y 0 ) + ........
2! 3! 4!
................. (3)
here yp is the value of y at x = xp = x0 + ph.
GAUSS’s FORWARD INTERPOLATION FORMULA:
Substituting for 2 y0, 3 y0....... from (1) in the formula (3) we get,
p( p 1) 2 p( p 1)( p 2) 3
y 0 + p(y 0 ) + 2!
( y 1 + 3 y 1 ) +
3!
( y 1 + 4 y 1 ) +
yp =
p( p 1)( p 2)( p 3) 4
( y 1 + y 1 ) + ........
5
4!
yp =
p( p 1) 2 p( p 1)( p 2) 3 p( p 1)( p 2)( p 3) 4
y 0 + p(y 0 ) + ( y 1 ) + ( y 1 ) + ( y 1 ) + ........
2! 3! 4!
We observe that the formula (4) contains y0 and the even differences 2y-1,
4y-2, ..... which lie on the line containing x0 (called the central line) and the
odd differences y0, 3y-1 ...... which lie on the line just below this line, in the
difference table.
yp =
p( p 1) 2 p( p 1)( p 2) 3 p( p 1)( p 2)( p 3) 4
y 0 + p(y1 / 2 ) + ( y 0 ) + ( y1 / 2 ) + ( y 0 ) + ........
2! 3! 4!
...................... (5)
GAUSS’s BACKWARD INTERPOLATION FORMULA:
Next, let us substitute for y0, 2y0, 3y0 ...... from (1) in the formula (3).
Thus we obtain
p( p 1) 2 p( p 1)( p 2) 3
y 0 + p(y 1 + y 1 ) + ( y 1 + 3 y 1 ) + ( y 1 + 4 y 1 ) +
2
2! 3!
yp =
p( p 1)( p 2)( p 3) 4
( y 1 + y 1 ) + ........
5
4!
yp =
p( p + 1) 2 p( p 1)( p + 1) 3 p( p 1)( p + 1)( p 2) 4
y 0 + p(y 1 ) + ( y 1 ) + ( y 1 ) + ( y 1 ) + ........
2! 3! 4!
yp =
p( p + 1) 2 p( p 1)( p + 1) 3 p( p 1)( p + 1)( p 2) 4
y 0 + p(y 1 ) + ( y 1 ) + ( y 2 ) + ( y 2 ) + ........
2! 3! 4!
................. (6)
The version of the Newton‟s Forward Interpolation Formula is known as the
Gauss‟s Backward Interpolation Formula.
Observe the formula (6) contains y0 and the even differences 2y-1, 4y-2 ....
which lie on the central line and the odd differences y-1, 3y-2... which lie on
the line just above this line.
Let x0, x1, x2, ....., xn be the ( n + 1 ) values of x which are not necessarily
equally spaced. Let y0, y1, y2, ....., yn be the ( n + 1 ) values of y = f( x ).
Let the polynomial of degree n for the function y = f( x ) passing through the
( n + 1 ) points (x0, f (x0 )), (x1, f (x1)), (x2, f (x2)),......, (xn, f (xn)) be in the
following form
Since the polynomial passes through (x0, f (x0 )), (x1, f (x1)), (x2, f (x2)),......,
(xn, f (xn)) , the constants can be determined by substituting one of the
values of x0, x1, x2, ....., xn for x in the above equation (1).
Putting x = x0 in (1) we get, f( x0 ) = a0 (x0 – x1) (x0 – x2) ................ (x0 – xn)
f (x 0 )
a0 =
( x0 x1 )(x0 x 2 )....(x0 x n )
Putting x = x1 in (1) we get, f( x1 ) = a1 (x1 – x0) (x1 – x2) ................ (x1 – xn)
f (x 1 )
a1 =
( x1 x0 )(x1 x 2 )....(x1 x n )
Similarly,
Substituting x = x2 in (1) we get, f( x2 ) = a2 (x2 – x0) (x2 – x1) ......... (x2 – xn)
f (x 2 )
a2 =
( x 2 x0 )(x 2 x1 )....(x 2 x n )
Continuing in this manner and
Putting x = x2 in (1) we get, f( xn ) = an (xn – x0) (xn – x1) ......... (xn – xn-1)
f (x n )
an =
( x n x0 )(x n x1 )....(x n x n 1 )
Substituting these values of a0, a1, a2, ....., an we get,
n n (x x j )
This can be expressed as f ( x) f (x ) (x
k 0
k
j 0 xj)
k
j k
Another form is :
( x x1 )(x x 2 ).....(x x n 1 )
......... f ( xn )
( x n x1 )(x n x 2 ).....(x n x n 1 )
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Solutions Tutorial-4
Problem #01. The following data give the melting point of an alloy of lead
and zinc, is the temperature in degrees centigrade x is percent of load.
x: 40 50 60 70 80 90
: 184 204 226 250 276 304
Find when x = 43 and when x = 84? [Ans. 189.79, 286.96
Solution: The values of x and differences of are tabulated below:
x 2
40 184
20
50 204 2
22
60 226 2
24
70 250 2
26
80 276 2
28
90 304
p( p 1) 2
By Newton‟s Interpolation Formula, = 0 + p0 0
2!
Here 0 = 184, 0 = 20, 20 = 2
x x 0 43 40
To find (43) p = 0.3
h 10
(0.3)(0.3 1)
(43) p = 184 + ( 0.3 ) 20 + X 2.0 189.79
2!
Since x = 84 is near the end of the table, we have to use by Newton‟s
Backward Interpolation Formula
p( p + 1) 2 xn x 90 84
= n + p n + n Also – p= 0.6, p = - 0.6, x = - 0.6
2! h 10
(0.6)(0.6 - 1)
(84) = 304 + (-0.6) 28 + X 0.2 286.96 . Hence the solution.
2
Problem #02. Find the value of y from the following data at x = 0.47?
x: 0.0 0.1 0.2 0.3 0.4 0.5
y: 1.0000 1.1103 1.2428 1.3997 1.5836 1.7974
[Ans. 1.7299
Solution: Since we require the value of corresponding to a value of x near
the end of the table, Newton‟s Backward Formula is to be used.
The backward table is given as below:
x Y y 2y 3y 4y
0.0 1.0000
0.1103
0.1 1.1103 0.0222
0.1325 0.0022
0.2 1.2428 0.0244 0.0004
0.1569 0.0026
0.3 1.3997 0.0270 0.0003
0.1839 0.0029
0.4 1.5836 0.0299
0.2138
0.5 1.7974
Here h = 0.1,
x x 0.50 0.47 0.03
-p= n
h 0.1 0.10
implies p = - 0.3
Here h = 1, x = 1, x0 = 3 and
x x0 1 3
p= 2
h 1
implies p = - 2
x x 0 52 45
p= 1.4
h 50
( x ) = ( x0 + ph )
= 0.7880032
p( p 1)( p 2)....( p n) n +1
Error = y 0 ; Taking n = 2
n + 1!
Solution:
X Y y 2y 3y 4y
100 10.63
2.40
150 13.03 -0.39
2.01 0.15
200 15.04 -0.24 -0.07
1.77 0.08
250 16.81 -0.16 -0.05
1.61 0.03
300 18.42 -0.13 -0.01
1.48 0.02
350 19.90 -0.11
1.37
400 21.27
x x 0 218 200
Taking x0 = 200, x = 218, h = 50, p = 0.36
h 50
Newton‟s Forward Interpolation Formula is given by,
Y218 =
p ( p 1) 2 p ( p 1)( p 2) 3 p( p 1)( p 2)....[p (n 1) n
y0+py0+ y0 + y 0 +...+ y0
2! 3! n!
= 15.697
To find the value of y when x = 410 which is near the end of the table, we
use Newton‟s Backward Interpolation Formula
x x n 410 400
xn = 400, p = 0.2
h 50
Y410 =
Problem #06. The following data of the function f( x ) = 1/x find 1/ 2.72
using quadratic interpolation. Find an Estimate Error.
X 2.7 2.8 2.9
f( x ) 0.3704 0.3571 0.3448
[Ans. 0.5 X 10-5
Solution:
The difference table is as below:
X f( x ) f ( x ) 2 f( x )
2.7 0.3704
-0.0133
2.8 0.3571 0.0010
-0.0123
2.9 0.3448
2.72 2.70 1
x = 2.72, p = 0.2 ; f( 2.72 ) =
0.1 2.72
1 0.2 0.8
= 0.3704 + 0.2 ( - 0.0133) - 0.0010
2.72 2
= 0.3704 – 0.0026 – 0.00008 = 0.3677
h3 0.2 0.8 1.8 6
Error = x( x 1)(x 2)(x 3) f n ( ) ;E(2.72) < (0.1) 3
3! 6 (2.72) 4
= 0.5 10-5. Hence the solution.
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Solutions Tutorial-5
Problem #01. The following data given , find the number of students whose
weight is between 60 and 70.
Wt Kg x: 0-40 40-60 60-80 80-100 100-120
No of 250 120 100 70 50
Students
Ans. y(70)- y(60) = 54
Solutions:
The cumulative values and differences table is as below:
Wt: x Stu: y y 2y 3y 4y
< 40 250
120
< 60 370 -20
100 -10
< 80 470 -30 20
70 10
< 100 540 -20
50
< 120 590
70 40
x0 = 40, x = 70, p = 1 .5
20
y(70) = y0 + py0 + 2y0 +..............
x0
p= x
h
Using Newton‟s Forward Interpolation formula, we get
x x ( x 1) 2 x( x 1)( x 2) 3
f( x ) = f( 0 ) + f(0) + f( 0) + f( 0 ) +.............
1 1 2 1 2 3
x ( x 1) x( x 1)( x 2) (0.5)( 0.5)( 2.5)( 1.5)( 3.5)
=1+(x)(1) + (-2)+ (12) + (9)
1 2 1 2 3 120
= 2 x3 – 7 x2 + 6x + 1 which is required polynomial
To compute f( 4 ), we take xn = 3, x = 4
x xn
So that p = 1
h
Using Newton‟s Backward Interpolation Formula, we get
p ( p + 1) 2 p( p + 1)( p + `2) 3
f( 4 ) = f( 3 ) + pf(3) + f(3) + f( 3 ) +.............
1 2 1 2 3
= 10 + 9 + 10 + 12 = 41
Which is the same value as that obtained by substituting x = 4 in the cbic
polynomial 2x3 – 7x2 + 6x +1.
x x0 5
x = 45, x0 = 40, p = 0.5
h 10
Using Newton‟s Interpolation Formula we get,
p ( p - 1) 2 p( p - 1)( p - 2) 3 p( p - 1)( p - 2)( p 3) 3
y(45) = y40 + py40+ y40 + y40+ y40
2 6 24
(0.5)( 0.5) (1.5)( 0.5)( 0.5) (0.5)( 0.5)( 2.5)( 1.5)
=31+(0.5)(42)+ (9) + (25) + (9)
2 6 24
= 31+ 21 – 1.125 – 1.5625 – 1.4453
= 47.87
The number of students with marks < 45 is 47.87 i.e., 48.
But the number of students with marks less than 40 is 31.
Hence the number of students getting marks between 40&45 = 48 – 31 = 17.
Hence the solution.
Problem #05. Find a polynomial of degree two which takes the values
x: 0 1 2 3 4 5 6 7
y: 1 2 4 7 11 16 22 29
[Ans. ½( x2 + x + 2)
Try Urself..............
Lakireddy Bali Reddy College of Engineering, Mylavaram
(Autonomous)
B.Tech I Year (II-Semester) May/ June 2014. T 264- Numerical Methods
UNIT – III INTERPOLATION Faculty Name: N V Nagendram
Problems Tutorial-6
Problem #02:From the following table, find y when x = 1.85 and x = 2.4 by
Newton‟s Interpolation Formulae.
x 1.7 1.8 1.9 2.0 2.1 2.2 2.3
y= ex 5.474 6.050 6.686 7.389 8.166 9.025 9.974
[Ans. 6.36, 11.02
Problem #03: Construct a polynomial for the data given below. Find also y
( x = 5).
x: 4 6 8 10
y: 1 3 8 16
3 11 13
[Ans. y = x 2 x + 6, y ( 5 )
8 4 8
Problem #04: given sin 45 = 0.7071, sin 50 = 0.7660, sin 55 = 0.8192,
0 0 0
sin 600 = 0.8660 find sin 520 using Newton‟s Forward Formulae? [A.0.788
Problem #06: Estimate the values of f (22) and f ( 42 ) from the following
available data:
x: 20 25 30 35 40 45
f( x ): 354 332 291 260 231 204
[Ans. 352, 219
Problem # 07: calculate 5.5 given 5 = 2.236, 6 = 2.449, 7 = 2.646, 8=
2.828. [Ans. 2.344
Problem # 08: From the following data, estimate the number of persons
having incomes between 2000 and 2500.
Incomes : < 500 500 - 1000 1000-2000 2000-3000 3000-4000
Problem # 01: From the following data, estimate the number of students
who secured marks between 40 and 45.
Marks : 30-40 40-50 50-60 60-70 70-80
No of 31 42 51 35 31
students
[Ans. 17
Problem # 02: From the following data gives the population of a town
during the last six census. Estimate the increase in the population during
the period from 1976 to 1978.
Year 1941 1951 1961 1971 1981 1991
Population 12 15 20 27 39 52
[Ans. 2530
04. If the interval of differencing is unity and f( x ) = ax2 find which one of the
following choices is wrong...
A) [f( x ) = a (2x +1)B) 2[f( x ) = 2a C) 3[f( x ) = 2 D) 4[f( x ) = 0[ C
06. 3y5 =
A) y6+ 3y5 + 3y4 + y3B) y5 -3y4- 3y3 – y2C) y6 - 3y5 +3y4 -y3D) y5+ 3y4 + 3y3 + y2
[ B
07. Gauss – forward interpolation formula is used to interpolate the values of
y for
A) 0 < p < - B) - < p < 0 C) – 1 < p < 0 D) 0 < p < 1 [ D
08. If first two approximations x0 and x1 are roots of x – x + 1 = 0 are 1 and
3 2
A) 1 B) 3 C) 4 D) 2 [ D
05. Newtons iterative formula to find the value of N is ....
1 N 1 N 1 N
A) xn+1 = ( x n3 ) B) xn+1 = ( x n ) C) xn+1 = (2 xn N ) D) xn+1 = ( xn + )
2 xn 2 xn 2 xn
[ D
06. Which one is wrong ?
A) [f1( x )f2( x ) = f1( x ). f2( x ) B) E 1 + C) [f1 + f2 = f1 + f2 D) (5)=0
[ A
07. Newton‟s iterative formula to find the value of 3 N is ....
1 N 1 N 1 N N
A)xn+1= (2 x n 2 ) B)xn+1= (2 x n + 2 ) C)xn+1 = ( x n 2 ) D)xn+1= (2 x n - 2 )
3 xn 3 xn 3 xn xn
[ B
08. A linear version of the lagrange‟s interpolation formula for f( x ) is .....
x x1 x x0 x x0 x x
A) f ( x0 ) f ( x1 ) B) f ( x0 ) + 1 f ( x1 )
x0 x1 x1 x0 0
x x1 0
x x1
x x0 x x0 x x1 x x0
C) f ( x 0 ) + f ( x1 ) D) f ( x0 ) + f ( x1 ) [ D
0
x x1 x x1 0
x x1 1
x x 0
method is .........
A) 0.5 B) 0.25 C) 0.125 D) 1 [ A
Problem #04: Find y( 25 ) given that y20 = 24, y24 = 32, y28 = 35, y32 = 40,
Using Gauss‟s Forward difference Formula. [Ans.32.9450