Interpolation (1) امير
Interpolation (1) امير
21 of 1Page
It is a convenient method for displaying the successive differences of a function.
The following table is an example to show how the differences are formed.
The above table is called a diagonal difference table. The first term in the table is
y0, it is called the leading term. The differences ∆ , ∆ ,∆ ,..., are called the
leading differences. The differences ∆ with a fixed subscript i lie along the
diagonal downward sloping are called forward differences. In forming such a
difference table care must be taken to maintain correct sign. A convenient check
may be obtained by noting the sum of the entries in any column equals the
differences between the first and the last entries in preceding column.
Example 2.1:
Construct a forward difference table for the following data:
Solution:
21 of 2Page
2.1.2 BACKWARD DIFFERENCES:
Let y = f(x) be a function given by the values y0, y1, … yn which it takes for
the equally spaced values x0, x1, …, xn of the independent variable x. Then y1 – y0,
y2 – y1, …, yn – yn– 1 are called the first backward differences of y = f(x). They are
denoted by , , …, respectively. Thus we have:
Note: In the above table the differences with a fixed subscript i, lie along the
diagonal upward sloping are called backward differences.
21 of 3Page
Example 2.2:
The following is a table of values of a polynomial of degree 5. It is given that
(3) is in error. Correct the error:
∆ ∆ ∆
0 1
1 2 30
31 160 +
2 33 190 + 200 − 4
771 − 780 + 3 20 − 10
2101 1220 −
5 3126 2550
4651
6 7777
21 of 4Page
2.1.4 CENTRAL DIFFERENCES:
The operator δ: We now introduce another operator known as the central
difference operator to represent the successive differences of a function in a more
convenient way. In general form:
= ⁄ − ⁄ -------- (2.1)
The first central difference operator, denoted by the symbol δ, by substituting with
= 1⁄2 = 1 is defined by:
y1 - y0 = ⁄
y2 – y1 = ⁄
……
yn – yn -1 = ⁄
where h is the interval of differencing. The central difference table can be formed
as follows:
21 of 5Page
2.2 Interpolation with equal intervals:
2.2.1 Introduction:
The word interpolation denotes the method of computing the value of the
function = ( ) for any given value of the independent variable x when a set of
values of = ( ) for certain values of x are given.
The process of computing the value of function outside the range of given values
of the variable is called extrapolation.
Interpolation is based on the following assumption:
1. The values of the function should be in an increasing or decreasing order i.e.,
there are no sudden change (Jumps or falls) in the values during the period of
under consideration.
2. The jumps and falls in the values should be uniform; this implies that the
changes in the values of the observations should be in a uniform pattern.
3. When we apply calculus of finite differences on this, we assume that given set of
observations are capable of being expressed in a polynomial form.
21 of 6Page
2.2.2 NEWTON’S GREGORY forward interpolation formula:
∆ ( )
∴ =
2! ℎ
∆ ( )
; = ;
3! ℎ
∆ ( )
; =
!ℎ
Put the values of A0, A1, A2, A3 ... An, in the equation (2.2), we get:
∆ ( ) ∆ ( )
( )= ( )+ ( – ) + ( – )( – – ℎ) +⋯
ℎ 2! ℎ
∆ ( )
+( – ) … . . [ – – ( − 1)ℎ]
!ℎ
Again, put = + ℎ ⇒ = , we have:
∆ ( ) ℎ ( ℎ – ℎ)
( + ℎ )= ( )+ ℎ + ∆ ( )
ℎ 2! ℎ
ℎ( ℎ – ℎ)( ℎ – 2ℎ) … . . [ ℎ – ( − 1)ℎ]
+⋯+ ∆ ( )
!ℎ
Or;
( – 1) ( – 1)( – 2) … . . ( – + 1)
( + ℎ )= ( )+ ∆ ( )+ ∆ ( ) +⋯+ ∆ ( )
2! !
Example 2.3:
The following table gives the distance in nautical miles of the visible horizon for
the given heights in feet above the earth’s surface.
Solution:
Let us form the difference table:
21 of 8Page
( – 1) ( – 1)( – 2)
(218) = ( )+ ∆ ( )+ ∆ ( )+ ∆ ( )
2! 3!
( – 1)( – 2)( – 3) ( – 1)( – 2)( – 3)( – 4)
+ ∆4 ( ) + ∆5 ( )
4! 5!
( – 1)( – 2)( – 3)( – 4)( – 5)
+ ∆6 ( )
6!
Solution:
Let us first form the difference table:
Now, = + ℎ
− −0
= = =
ℎ 1
Therefore; from N.F.D. to ∆ as shown:
( – 1) ( – 1)( – 2)
( + ℎ) = ( )+ ∆ ( )+ ∆ ( )+ ∆ ( )
2! 3!
21 of 9Page
( – 1) ( – 1)( – 2)
= + (−1) + (2) + (6)
2! 3!
= 1– + – + –2 – + 2
∴ = –2 + 1 … .
∇ ( + ℎ)
∴ =
2! ℎ
∇ ( + ℎ)
; = ;
!ℎ
Substituting the values in (2.4), we get:
∇ ( + ℎ) ∇2 ( + ℎ)
( )= ( + ℎ) + ( – − ℎ) +( – − ℎ)( – – [ − 1] ℎ )
ℎ 2! ℎ2
∇ ( + ℎ)
+ ⋯+ ( – − ℎ) … . (2.6)
!ℎ
Put = + ℎ ∓ ℎ, then;
– – ℎ = ∓ ℎ; and
21 of 10Page
– – ( – 1)ℎ = ∓ ( + 1)ℎ
---
---
– – ℎ = [ + ( − 1)]ℎ
∴ Equation (4.6) becomes:
( + 1)
( + ℎ + ℎ) = ( + ℎ) + ∇ ( + ℎ) + ∇ ( + ℎ) + ⋯
2!
( + 1)( + − 1)
+ ∇ ( + ℎ)
!
The above formula is called Newton’s backward interpolation formula.
Note:
Newton backward interpolation formula is used to interpolate the values of y near
the end of a set of tabular values.
Example 2.5:
The table below gives the value of for . ≤ ≤ .
0.1 0.15 0.20 0.25 0.30
Find (a) tan 0.50 (b) tan 0.26 (c) tan 0.40
Solution:
First of all we construct the difference table:
0.4 − 0.3
= =2
0.05
2∗3 2∗3∗4
(0.4) = 0.3093 + 2 ∗ 0.054 + 0.0014 + 0.0004
2 6
2∗3∗4∗5
+ 0.0002
24
= 0.4241 Ans.
( – ) ( + ) ( – )
( )= ( )+ ∆ ( )+ ∆ (− ) + ∆ (− )
! !
( + ) ( – )( – )
+ ∆ (− )
!
( + ) ( – )( – )( – )
+ ∆ (− ) … … … … . ( . )
!
21 of 13Page
(– 2) = (– 1) – (– 2)
⇒ (– 1) = (– 2) + (– 2)
(– 2) = (– 1) − (– 2)
⇒ (– 1) = (– 2) + (– 2)
The equation (4.9) becomes:
( – ) ( +) ( – )
( )= ( )+ ∆ ( )+ ∆ (− ) + ∆ (− )
! !
( + ) ( – )( – ) ( + ) ( – )( – )
+ ∆ (− ) + ∆ (− )
! !
( + ) ( – )( – )( – )
+ ∆ (− )
!
( + ) ( – )( – )( – )
+ ∆ (− ) + ⋯
!
( – ) ( + ) ( – )
( )= ( )+ ∆ ( )+ ∆ (− ) + ∆ (− )
! !
( + ) ( – )( – )
+ ∆ (− )
!
( + )( + ) ( – )( – )
+ ∆ (− )
!
( + )( + ) ( – )( – )( – )
+ ∆ (− ) + ⋯ ………( . )
!
This formula is known as Gauss forward difference formula
This formula is applicable when u lies between .
Example 2.6:
Given that:
Find . .
Solution:
21 of 14Page
= + ℎ , = 37, = 35, ℎ = 5
37 − 35
= = 0.4
5
( – ) ( + ) ( – )
( )= ( )+ ∆ ( )+ ∆ (− ) + ∆ (− )
! !
( + ) ( – )( – )
+ ∆ (− )
!
21 of 15Page
( + ) ( + ) ( – )
( )= ( )+ ∆ (− ) + ∆ (− ) + ∆ (− )
! !
( ) – –
+ ∆ (− ) +…. …… (2.13)
!
( + ) ( + ) ( – )
( )= ( )+ ∆ (− ) + ∆ (− ) + ∆ (− )
! !
( + )( + ) ( – ) ( + )( + ) ( – )( – )
+ ∆ (− ) + ∆ (− )
! !
( + )( + )( + ) ( – )( – )
+ ∆ (− ) + ⋯ ………( . )
!
Example 2.7:
Given that:
Using Gauss’s backward formula, find the value of tan 51° 42′
21 of 16Page
Solution:
Take the origin at 52° and given h = 1
−
= = 51° 42 − 52° = −18 = −0.3
( . )(−0.3)
(−0.3) = . + (−0.3) ∗ . + .
( . )(−0.3)(− . )
+ .
= 1.266188 (Approx.) Ans.
…( . )
Example 2.8:
Find the value of at = 0.644 using by Stirling’s formula. The following
data given below:
21 of 17Page
Solution:
For the given data difference table is as:
. .
Here h = 0.01; = = 0.4
.
---- (2.16)
Each term in equation (2.16) being a product of n factors in x of degree n, putting x
= x0 in (2.16) we get:
( )= ( − )( − )…( − )
( )
≫ =
( − )( − )…( − )
Putting = in(4.16) we get:
( )= ( − )( − )…( − )
( )
≫ =
( − )( − )…( − )
Similarly putting x = x2, x = x3 , … x = xn in (2.16) we get:
( )
≫ =
( − )( − )…( − )
…
…
( )
≫ =
( − )( − )…( − )
21 of 19Page
( − )( − ) … ( − ) ( − )( − ) … ( − )
= ( )= ( )+ ( )
( − )( − ) … ( − ) ( − )( − ) … ( − )
( − )( − ) … ( − )
+⋯+ ( ) … … … … (2.17)
( − )( − ) … ( − )
( )= = ( )= ℓ( )
Where;
( − 1) ( − 2) ( − −1 ) ( − +1 ) ( − )
( )= ∗ ∗ ∗ ……∗
( − 1) ( − 2) ( − −1 ) ( − +1 ) ( − )
Or;
−
( )= = 1, 2, … . . ,
−
Example 2.9:
Given the data points:
i 0 1 2
x 0 2 3
y 7 11 28
Solution:
( − 1) ( − 2) (1 − 2) (1 − 3)
( )= = =
( 0 − 1 ) ( 0 − 2 ) (0 − 2) (0 − 3)
( − 0) ( − 2) (1 − 0) (1 − 3)
( )= = =1
( 1 − 0 ) ( 1 − 2 ) (2 − 0) (2 − 3)
( − 0) ( − 1) (1 − 0) (1 − 2)
( )= = =−
( 2 − 0 ) ( 2 − 1 ) (3 − 0) (3 − 2)
= + + =4
∴ ( )= .
21 of 20Page
Example 2.10:
Apply Lagrange’s formula to find the cubic polynomial which includes the
following values of x and y.
0 1 4 6
1 -1 1 -1
Solution:
Here x0 = 0, x1 = 1, x2 = 4, x3 = 6 and y0 = 1, y1 = – 1, y2 = 1, y3 = – 1
Putting the above values in Lagrange’s formula, we get:
21 of 21Page