Академический Документы
Профессиональный Документы
Культура Документы
INTERPOLATING POLYNOMIAL
Structure
10.1 Introduction
Objectives
10.7 Summary
10.8 Solutions/Answers
10.1 INTRODUCTION
The Lagrange's form of the interpolating polynomial derived in Unit 9 has some drawbacks
compared to Newton form of interpolating polynomial that we are going to consider now.
,
In practice, one is often not sure as to how many interpolation points to use. One often
calculates Pl(x), Pz(x), ....increasing the number of interpolation points, and hence the
degrees of the interpolating polynomials till one gets a satisfactory approximation Pk(x)to
f(x). In such an exercise. Lagrange form seems to be wasteful as in calculating Pk(x), no
advantage is taken of the fact that one has already constructed Pk- 1 ( ~ )whereas
, in Newton
form it is not so.
Objectives e
fo& a table of divided differences and find divided differences with a given set of
arguments from the table;
find an estimate of f(x) for a given non - tabular value of x from a table of values of
\
x and Y [ f(x) I;
relate the kth order derivative of f(x) with the kth order divided difference from the
expression for the error term. .
Newton Form of the Inter;
10.3DIVIDED DIFFERENCES . polating Polyno~nial
Suppose that P, (x) is the Lagrange polynomial of degree at most n that agrees with the
functi0n.f at the distinct numbers xo, xl.. ..., x,. Pn (x) can have the following
representation, called Newton form.
The remaining divided differences of higher orders are defined inductively as follows. The
kth divided differences relative to xi, xi+,, ...,xi+ is defined as
Since each of the remaining terms in Eqn. ( I ) has the factor (x - x0) (X- x,) ...(X- xk).
Eqn. (1) can be rewritten as .
Pn(x) = Qk(x) + (x - x0) ,..(X- xk) R(x) lor some polynomial R(x). As the term (x - xo)
(x - xl)...(x - xk) R(x) vanishes at each of the points xo ...xk, we have f(x9 = Pn(x3 = Qk
(xi). i = 0 , 1 , 2 , ..., k. Since Qk(x) is a polynomial of degree 5 k, by uniqueness of
interpolating polynomial Qk(x) = Pk(x).
This shows that P, (x) can be constructed step by step with the addition of the next term in
Eqn. (I), as one constructs the sequence Po(x), Pl(x) ...with Pk(x) obtained from Pk- l(x)
in the form 3
That is, g(x) is a polynomial of degree Ik having (at least) the k distinct zeros xO,..., xk- l.
...
.: Pk(x) - Pk - l(x) = g(x) = Ak(x - x0) (X- xk - for some constant Ak. This constant
...,
Ak is called h e kth divided difference of f(x) at tile points xO, xk for reasons discussed
f(x) at the p i n t s xo, ..., xk. Thus Eqn. (2) can be rewritten as
P k ( ~ ) = P k - l ( ~+) f[ . X ~ ] ( X - X ~ ) ( X -...,(x-xk-1)
X~) (3)
To get an explicit expression for f[xo. ...,xk] we make use of Lagrange form of
interpolating polynomial and the uniqueness of interpo'lating polynomial.
-
since (x xo) (x - x,) ... (x - xk- ,) = xk + a polynomial of degree c k, we can
....
rewrite pk(x) as pk(x) = f[xO, xk] xk + a polynomial of degree < k (4)
if yo, ...,yk is a reordering of the sequence xo, ..., xk. We have defined the zeroeth divided,
difference of f(x) at xo by f[xo] = f(xo) which is consistent with Eqn. (5).
This shows that the first divided difference is really a divided difference.
This shows that the second divided difference is s dividcd dirfcrcnce of divided
dirfcrcnces.
This shows that the kth divided differcnce is the divided difference of (k - 1)st divided
differences justifying the name. If M = (xO,...., x,) and N denotes anv n - 1 elcmcnts of '
M and the remaining two elements are-%noted by a and P, then -- z
[(n - 1)st divided differen& on N anda - (n - 1)st divided difference on N andpl (7)
( f[x0,..., X" = , .
a-B I
!I Theorem 1:
Proof: Let Pi- l(x) be the polynomial of degree < i - 1 which interpolates f(x) at ~ g ...,
. xi-]
and let Qj- ](x) be the polynomial of degree 5 j - 1 which interpolates f(x) at the points
xl, ...,xj. Let us define P(x) as
This is a polynomial of degree Ij, and P(xi) = f(xi) for i = 0, 1, ....j. By uniqueness of the
I
i interpolating polynomial we have P(x) = Pj(x). Therecore
'
b
Equating the coefficient of xJ from both sides of Eqn. (8). we obtain (leading) coefficient of
We now illustrate this theo.rem with the help of a few examples but beforc that we give the
table of divided differences of various orders.
Suppose we denote, for convenience, a first order divided dirference of f(x) with any two
arguments by f[.,.], a second order divided difference with any three arguments by fl.,...]
and so on. Then the table of divided differences can be written as follows
Table I
- (c2 - a2) + b ( c - a)
c-a '
- -1 + -
1 1 1
f[a,b,cl = ab -
-abbe
c - a c - a
1
- - - /
c-a - abc
Similarly,
1
f[b,c,d] = -
bcd
:. f[a.b,c.dl = I%[
c-a
=-I
abc
-
d-a
= - - 3 .
1
abcd
. In next section we shall make use of the divided differences to derive Newton's genlral
form of interpolating polynomial.
In Sec.102 we have shown how P,,(x) can be constructed step by step as one constructs the'
sequence Po(x), P,(x), M... with %(x) obtained from Pk- ,(x) with the addition of the
next term in iQn.(3), that is, Newton Form of the Intcr-
pointing Polynomial
pk(x) = p k - + (X- x0) (X- xl) ...(X- Xk - 1) f l ~ ~ , . . . , ~ ~ ]
Using this Eqn. (1) can be rewritten as
P,,(x) = f[~Ol+ (x - &,I flx,,x,l + (x - xo) (X - x1) ~ [ x ~ . x , . x ~+I ... +
(x - &,I (x - XI)...(X- Xn - 1) flx0Jl,.-.,xnI. (9)
This can be written compactly as follows :
Example 3: From the following table of values, find the Newton's form of interpolating
!
polynomial approximating f(x).
I
Solution: We notice that the values of x are not equally spaced. We are required to find a
1 polynomial which approximates f(x). We form tlie table of divided differences of f(x).
Table 2
26 1 13
6 822 132
789
7 1611
Since the divided difference upto order 4 are available, the Newton's interpolating
polynomial P4(x) is given by
P4(x) = f(x0) + (x - xo) f[xo.x11 + (x - xo) (x - x1) flxo.x1.x21 +
-
(X xo) (X--XI) (X- ~ 2f[~0.~1.~2.~31
) f
where xo = - 1, xl = 0, x2 = 3, xj = 6 and x4 = 7.
We now consider an example to show how Newton's interpolating polynomial can be used
to obtain the approximate value of the function f(x) at any non-tabular point.
Example 4: Find the approximate values of f(x) at x = 2 and x = 5 in Example 3.
Solution: =
Since f(x) P4(x),from Example 3, we get
f(2) =P4(2) = 16 - 24 + 20 - 6 = 6
and
f(5) P(5) = 625 - 375 + 125 - 6 = 369
Note 1: When the values of f(x) for given values of x are required to be found, it is not
necessary to find the interpolating polynomial P4(x) in its simplified form given
above. We can obtain the required values by substituting the values of x in
Eqn.(l 1) itself. Thus,
Similarly.
P4(5) = 3 + (6) ( - 9) + (6) (5) (6) + (6) (5) (2) (5) + (6) (5) (2) ( - 1) (1)
=3-54 + 180 + 300-60~369.
Then f(2) P4(2) = 6
and f(5) =P(5) = 369.
Example 5: Obtain the divided differences interpolation polynomial and the Lagrange's
interpolating polynomial of f(x) from the following data and show that they are same.
Table 3
On simplifying, we get
P(x) = x3 + x - 4.
Thus, we find that both polynomials are the same.
E2) From the tablc of valucs given below, obtain b e value of y when x = 1.5 using
E3) Using Newton's divided diffcrenccs interpolation formula, find the valucs of f(8)
and f(15) from the following table.
In Unit 9 we have dcrived the gcneral crror tcrrri i.c. thc crror cornrnittcd in approximating
f(x) by P,(x). In the ncxt section wc dcrive anothcr cxprcssion for the crror tcrln in tcrm of
divided difference.
This shows that the error is like the next term in the Newton form.
f("+') (5)
Comparing, we have QQ, XIS...S%+ 11 =
,( + 1)
Theorem 2: Let f(x) be a real-valued function, defined on '[a.b] and n times differentiable
in ]a. b[. If xo. ...,x, are n + 1 distinct points in [a,b]. then there exists 5 E ]a.b[ such that
Corollary 1:
If f(x) = xu, then
Corollary 2:
If f(x) = xk, k c n, then
~ [ x ~ ~ . . .=~0x ~ ]
In the next section, we are going to discuss about bounds on the interpolation error.
Consider now the case when the nodes are equally spaced, that is, xj = xo + jh, j = 0,...,N,
and h is he spacing between consecutive nodes. For the case n=l we have linear
interpolation. If x E [xi- xi], then we approximate f(x) by Pl(x) which interpolates at
1
1 1
xi - I , and xi. From Eqn. (14) we have 4 (x) S 7 max f "(t)( mar (yrl (x)( 1
t€I tE1 .
whcre yrl(x) = (x - xi -.l) (X - xi).
Now,
-
dv1 = x - Xi-]. + X - xi=o
dx
Hcnce, thc maximum value of I (x - xi- (x - xi) I ocGursat x = x' = (xi- + xi)/2.
'
For the case n=2, it can be shown that for any x € [xi - I , x i +
h3M where I f
1 E2(x) 1 G 8M (x) 1 P M on I.
Example 8: Determine the spacing h in a table of equally spaced values of the function of
f(x) = J;; between 1 and 2, so that interpolation with a first degree polynomial in this
,
Solution: Here
'max
11xS2
( f "(x) I= -4I '
and =.
I El (x) 1 1 h
For seven place accuracy, h is to be chosen such that
E6) If f(x) takes the values - 21, 15,12 and 3 respectively when x assumes the values
- 1, 1.2 and 3, find the polynomial which approximates f(x).
E7) Using the following table of values, find the polynomial which approximates fix).
Hence obtain the value of f(5).
E9) If f(3) = 168, f(7) = 120, f(9) = 72 and f(10) = 63, find an approximate value of
f(6).
E10) The following table gives steam pressures P at different temperatures T, measured
in degrees. Find the pressure at temperature 372.1 degrees.
Ncnton Form of the Intcr-
polating Polynomial
E13) Obtain the polynomial which agrees with the values of f(x) as shown below
E14) ~etemiineUri: spacing h in a uble of equally spaced values of the function f(x) = J;;
between 1 and 2, so that interpolation with a second-dcgrce polynomial in this wble
yields severi-place accuracy. ,
We now end this unit by giving a summary of what we have covered in it.
10.6 SUMMARY
In this unit we have derived a form of interpolating polynomial called Newton's gkneral
form, which has some advantagesover the Lagrange's form discussed in Unit 9. This form
is useful in deriving some other interpolating formulas. Wehave introduced the concept of
divided differences and discussed some of its important properties before deriving
Newton's general form. The error term has also been derived and utilizing the error term
we have established a relationship between the divided difference and the derivative of the
function f(x) for which the interpolating polynomial has been obtained. The main formulas
derived are listed below:
f(15) = 3150
E4) - 3
E9) 147
E10) 177.4
Ell) 15.79
E12) 84
E13) x 3 + x 2 - x + 2
h3
-
J < 5.10-'. This gives h 0.0128.
24 3
-
The number of interval is N = 2 - 1 = 79.
h