You are on page 1of 14

Chapter 4 Interpolation

4 Interpolation
• 4.1 Problem formulation;

• 4.2 Lagrangian interpolation;

• 4.3 Newton interpolation;

• 4.4 Hermite interpolation.

4.1 Polynomial interpolation


A census of the population of one country is taken every 10 years. The following table
lists the population, in thousands of people, from 1950 to 2000, and the date are also
represented in the figure.
Year 1950 1960 1970 1980 1990 2000
Population 151,326 179,323 203,302 226,542 249,633 281,422
In reviewing this data, we might ask whether they could be used to provide a reasonable
estimate of the population, in 1975 or even in the year 2020. Populations of this type can
be obtained by using a function that fits the given data. This process is called interpolation
and is the subject of this chapter.
One of the most useful and well-known classes of function mapping the set of real
numbers into itself is the polynomials, the set of functions of the form:

Pn (x) = an xn + an−1 xn−1 + · · · + a1 x + a0 ,

where n is non-negative integer and ai are real constants. The main advantage of poly-
nomial is that they uniformly approximate continuous function. The other important
property is their easy computation.

Definition 4.1. Given the values of a function y = f (x) at the n + 1 points yi = f (xi ),
i = 0, 1, · · · , n + 1, (We do not know any other property of f (x), including of the explicit

1
expression at all.) to approximate the function f (x), the process of looking for the other
function P (x) based on
P (xi ) = yi , i = 0, 1, 2, · · · , n (4.1)
is said as interpolation. In particular, if the function P (x) we construct is a polynomial
of degree n, it is said as polynomial interpolation. The condition (4.1) is the interpola-
tory conditions, P (x) is the interpolatory function, the unknown f (x) is the interpolated
function. xi is referred to the interpolating nodes.

There are many types for interpolation whose name is relevant to the form of P (x).
If P (x) is chosen as piecewise functions, then the interpolation is piecewise interpolation.
Spline function P (x) result in spline interpolation. In this chapter, we shall focus on the
polynomial interpolation. The immediate question is wether there exists the interpolatory
polynomial of degree Pn (x) satisfying

Pn (xi ) = yi , i = 0, 1, 2, · · · , n.

1. Geometrical figure
What we are looking for is a polynomial of degree n such that

Pn (xi ) = yi , i = 0, 1, 2, · · · , n.

When n = 1, we have two points (x0 , y0 ) and(x1 , y1 ) to confirm a polynomial P1 (x) =


a1 x + a0 passing through the two points. Note that P1 (x) is a straight line to approximate
f (x). For example. Determine the linear interpolating polynomial that passes through
the point (1, 1) and (4, 16). It yields that P1 (x) = a1 x + a0 = 5x − 4. Fig. 4.1 shows that
the interpolated function f (x) = x2 (the dash line) is approximated by the polynomial
P1 (x) = 5x − 4 (the solid line) of degree 1 by two points.

Figure 4.1: The quadratic function y = x2 (the dash line) is interpolated by the polynomial
P1 (x) = 5x − 4 (the solid line) passing through two points (1, 1) and (4, 16) (the circles).

2. Existence and uniqueness

2
For the given data x0 x1 · · · xn
,
y0 y1 · · · yn
suppose the interpolating polynomial of degree n is

Pn (x) = a0 + a1 x + a2 x2 + · · · + an xn .

Letting Pn (x) satisfy the interpolating condition

Pn (xi ) = yi , i = 0, 1, 2, · · · , n.

Thus, a linear system can be derived

a0 + a1 x0 + · · · + an xn0 = y0 ,


 n
 a0 + a1 x1 + · · · + an x1 = y1 ,



a0 + a1 x2 + · · · + an xn2 = y2 ,
 ..



 .,
a0 + a1 xn + · · · + an xnn = yn .

Note that once the unknown coefficients a0 , a1 , · · · , an are determined, we will get the
interpolating polynomial Pn (x). The above linear system also can be written into matrix
form
 a   y 
1 x0 x20 · · · xn0

0 0
 1 x1 x21 · · · xn1   a 1 
 y
 1 
 
  .
  ..   ..  = . . (4.2)
··· ···
   

1 xn x2n · · · xnn an yn

Since

1 1 ··· 1
x20 xn0

1 x0 ···
x0 x1 ··· xn
1 x1 x21 ··· xn1
x2


.. .. .. ..

0 x21 ··· x2n
= .

. . . . .. ..
..

2 n
. .
1 xn−1 xn−1 · · · xn−1
xn−1 xn−1

··· xn−1
1 xn x2n · · · xnn (n+1)×(n+1) 0 n
1 n
x0 xn1 ··· xnn
(n+1)×(n+1)

1
1 ··· 1

0
x1 − x0 ··· xn − x0

0 x 2 − x x · · · x 2 − x x
1 0 n 0
n

1
=

.. .. ..
. . .
0 xn−1 − xn−2 x0 · · · xn−1 − xn−2 x0

1 1 n n
0 xn − xn−1 x0 · · · xnn − xnn−1 x0 (n+1)×(n+1)
1 1

(x1 − x0 ) ··· (xn − x0 )
.. .. ..


= n−2 . . .

n−2
1n−1 (x1 − x0 ) · · · xn (xn − x0 )
x

x (x1 − x0 ) · · · xn (xn − x0 ) n−1
1 n×n

1
1 ··· 1

x1 x 2 · · · x n

= (x1 − x0 )(x2 − x0 ) · · · (xn − x0 ) ...

.. ..


n−2 . .
n−2 n−2

x
n−11 x 2 · · · x n


n−1 n−1
x
1 x 2 · · · x n

n×n

3
Y
= (xj − xi ),
0≤i<j≤n

referred as Vandermonde determinant. It is concluded that as long as interpolatory nodes


xj 6= xi , j 6= i, the solution to the system (4.2) exists uniquely. In other words, if the
interpolatory knots are distinct, we have an unique interpolating polynomial Pn (x).
3. The truncation error of Rn (x) = f (x) − Pn (x)
In computational methods, there are two important parts: constructing algorithm and
measuring the error. Therefore, after solving Pn (x) by the above linear system, it comes
to the error of f (x) and Pn (x).

Theorem 4.1. If a polynomial Pn (x) of degree n interpolates an unknown function y =


f (x) at the given points (xi , yi ), i = 0, 1, · · · , n, then the error can be written as

f n+1 (ξ)
Rn (x) = f (x) − Pn (x) = (x − x0 )(x − x1 ) · · · (x − x0 ), (4.3)
(n + 1)!
where ξ lies in x, x0 , x1 , · · · , xn .

Proof. Assume the error has the form

Rn (x) = f (x) − Pn (x) = λn (x)(x − x0 )(x − x1 ) · · · (x − x0 ),

where λn is related to x.
If we find the form of λ(x), then the representation of Rn (x) is is decided by λ(x).
Define
ψ(t) = f (t) − Pn (t) − λn (x)(t − x0 )(t − x1 ) · · · (t − x0 ). (4.4)
Then it can be checked that x, x0 , x1 , · · · , xn are zeros of ψ(t). Based on the Rolle
theorem, it reads as follows
ψ (n+1) (ξ) = 0,
where ξ lies in the zeros x, x1 , x2 , · · · , xn .
Thus taking the n + 1th derivative of (4.4) with respect to t, it follows that

f (n+1) (ξ) − λn (x)(n + 1)! = 0

which implies
f (n+1) (ξ)
λn (x) = .
(n + 1)!
The theorem can be concluded.

4.2 Lagrange interpolation


Since the interpolating polynomial Pn (x) exists uniquely, the differently representative
forms for Pn (x) we construct by different method still equal to Pn (x) essentially. For
example, passing through two points (5, 1) and (2, 4), the interpolating polynomial P1 (x)
can be written into three different forms
P1 (x) − 4 x−2
= or P1 (x) = 4 − (x − 2) or P1 (x) = −x + 6. (4.5)
1−4 5−2
Note that these different representations are equivalent each other. In this subsection, we
will introduce several methods to get Pn (x), since it is difficult to get the coefficients of
Pn (x) by solving a linear system.

4
Commence from the simplest case of two points. Given two interpolatory condition
(x0 , y0 ) and (x1 , y1 ) to find the polynomial of degree 1,

P1 (x) = a0 + a1 x,

we have
x − x1 x − x0
P1 (x) = y0 + y1 = l0 (x)y0 + l1 (x)y1 .
x0 − x1 x1 − x0
Note that P1 (x) is the linear combination of two polynomials of degree 1. Two polynomials
l0 (x) and l1 (x) satisfy the properties

l0 (x0 ) = 1, l0 (x1 ) = 0,
l1 (x0 ) = 0, l1 (x1 ) = 1.

On the other hand, let’s consider it reversely to derive the following theorem.

Theorem 4.2. Suppose that one polynomial Q0 (x) of degree 1 such that Q(x0 ) = 1,
Q(x1 ) = 0, then it has the form
x − x1
Q(x) = .
x0 − x1
Proof. Since x1 is one zero of Q(x), then Q(x) = A(x − x1 ). Moreover, it holds that
1
Q(x0 ) = 1 ⇒ A(x0 − x1 ) = 1 ⇒ A = x0 −x 1
. Thus, we have

x − x1
Q(x) = .
x0 − x1

This theorem inspires us to generalize n = 1 to the general case n. When n = 1,


the interpolation polynomial P1 (x) = l0 (x)y0 + l1 (x)y1 , where l0 (x) and l1 (x) are two
polynomials of degree 1 such that

l0 (x0 ) = 1, l0 (x1 ) = 0,
l1 (x0 ) = 1, l1 (x1 ) = 1.

Thus, this kind of polynomial P1 (x) satisfies the interpolatory conditions

P1 (x0 ) = y0 , P1 (x1 ) = y1 .

To find Pn (x), assume Pn (x) can be represented as

Pn (x) = l0 (x)y0 + l1 (x)y1 + · · · + ln (x)yn .

where l0 (x), l1 (x), · · · , ln (x) are polynomials of degree n such that

l0 (x0 ) = 1, l0 (x1 ) = 0, · · · , l0 (xn ) = 0,


l1 (x0 ) = 0, l1 (x1 ) = 1, · · · , l1 (xn ) = 0,
..
.,
ln (x0 ) = 0, ln (x1 ) = 0, · · · , ln (xn ) = 1.

It can be easily checked that Pn (x) passes through the interpolatory nodes

(x0 , y0 ), (x1 , y1 ), · · · , (xn , yn ).

5
This kind of Pn (x) is what we are looking for. Note that Pn (x) is determined by l0 (x), l1 (x), · · · , ln (x).
Considering the properties of l0 (x), it is observed that x1 , x2 , · · · , xn are zeros of l0 (x),
which yields that
l0 (x) = A(x − x1 )(x − x2 ) · · · (x − xn ).
With the last property l0 (x0 ) = 1, it follows that
1
A= .
(x0 − x1 )(x0 − x2 ) · · · (x0 − xn )
Thus, it follows that
(x − x1 )(x − x2 ) · · · (x − xn )
l0 (x) = .
(x0 − x1 )(x0 − x2 ) · · · (x0 − xn )
Similarly, we have
(x − x0 )(x − x1 ) · · · (x − xi−1 )(x − xi+1 ) · · · (x − xn )
li (x) = ,
(xi − x0 )(xi − x1 ) · · · (xi − xi−1 )(xi − xi+1 ) · · · (xi − xn )
where i = 0, 1, · · · , n. Substituting li (x) into Pn (x), we obtain
n
X
Pn (x) = li (x)yi := Ln (x),
i=1

referred as the Lagrangian polynomial, where the polynomial of degree n


(x − x0 ) · · · (x − xi−1 )(x − xi+1 ) · · · (x − xn )
li (x) =
(xi − x0 ) · · · (xi − xi−1 )(xi − xi+1 ) · · · (xi − xn )
is called cardinal function. Notice that Ln (x) can be simplified into the same form as
Pn (x).
Example Please find the Lagrangian interpolatory polynomial Ln (x) of the function
y = f (x)
x 5 -7 -6 0
, and write the error form f (x) − Ln (x).
y 1 -23 -54 -954
Solution In this example, the number of the data n = 3 indicates the Lagrangian
polynomial
3
X
L3 (x) = li (x)yi
i=0
= l0 (x)y0 + l1 (x)y1 + l2 (x)y2 + l3 (x)y3
= l0 (x) · 1 + l1 (x) · (−23) + l2 (x) · (−54) + l3 (x) · (−954),
where
(x + 7)(x + 6)(x − 0)
l0 (x) = ,
(5 + 7)(5 + 6)(5 − 0)
(x − 5)(x + 6)(x − 0)
l1 (x) = ,
(−7 − 5)(−7 + 6)(−7 − 0)
(x − 5)(x + 7)(x − 0)
l2 (x) = ,
(−6 − 5)(−6 + 7)(−6 − 0)
(x − 5)(x + 7)(x + 6)
l3 (x) = ,
(0 − 5)(0 + 7)(0 + 6)
f (4) (ξ)
f (x) − L3 (x) = (x − 5)(x + 7)(x + 6)(x − 0),
4!
where ξ lies in x, 5, −7, −6, 0.

6
4.3 Newton polynomial interpolation
It is observed that the disadvantage of Lagrangian interpolation is that if more nodes
are complemented to the interpolation conditions, all coefficients already computed will
have to be calculated again. To reduce the truncation error, more nodes always occur. In
this subsection, we focus on the other efficient algorithm.
When n = 0, the constant function P0 (polynomial of degree ≤ 0) can be chosen so
that P0 (x0 ) = y0 = f (x0 ).
For n = 1, the polynomial P1 (x) of degree 1 can be denoted as P1 (x) = f (x0 ) + C1 (x −
x0 ). Substituting (x1 , f (x1 )) into P1 (x), it holds that
f (x1 ) − f (x0 )
P1 (x) = f (x0 ) + (x − x0 ).
x1 − x0
Furthermore, suppose that we have obtained a polynomial Pk−1 of degree ≤ k − 1 with
Pk−1 (xi ) = yi for 0 ≤ i ≤ k − 1. We try to construct Pk with the form
Pk (x) = Pk−1 (x) + C(x − x0 )(x − x1 ) · · · (x − xk−1 ),
which is a polynomial of degree at most k. Now we determine the unknown coefficient C
from the condition Pk (xk ) = f (xk ). This leads to the equation
Pk−1 (xk ) + C(xk − x0 )(xk − x1 ) · · · (xk − xk−1 ) = f (xk ).
Before we attempt to calculate the constant C, the definition of divided difference should
be introduced firstly.
Definition 4.2. The divided difference of the function f (x) for the points (xi , f (xi )),
i = 0, 1, · · · , n, is defined as follows:
The zeroth divided difference,
f [x0 ] := f (x0 ) = y0 .
The quantity f [x0 , x1 ]
f [x1 ] − f [x0 ] f (x1 ) − f (x0 )
f [x0 , x1 ] := = .
x1 − x0 x1 − x0
is called the first order divided difference of two points x0 and x1 .
Using this recurrence, we have the second order divided difference of three points
(x0 , f (x0 )), (x1 , f (x1 )), (x2 , f (x2 )),
f [x1 , x2 ] − f [x0 , x1 ]
f [x0 , x1 , x2 ] = .
x2 − x1
Also
f [x1 , x2 , x3 ] − f [x0 , x1 , x2 ]
f [x0 , x1 , x2 , x3 ] = .
x3 − x0
It can be summarized as
f [x1 , x2 , · · · xn ] − f [x0 , x1 , · · · xn ]
f [x0 , x1 , · · · , xn ] = .
xn − x0
A divided difference table with the following form can be displayed as a table
x0 f (x0 )
x1 f (x1 ) f [x0 , x1 ]
x2 f (x2 ) f [x1 , x2 ] f [x0 , x1 , x2 ]
x3 f (x3 ) f [x2 , x3 ] f [x1 , x2 , x3 ] f [x0 , x1 , x2 , x3 ]
x4 f (x4 ) f [x3 , x4 ] f [x2 , x3 , x4 ] f [x1 , x2 , x3 , x4 ] f [x0 , x1 , x2 , x3 , x4 ].

7
Newton form of the interpolatory polynomial
xi x0 x1 ··· xn
For the interpolator condition we
yi y0 = f (x0 ) y1 = f (x1 ) · · · yn = f (xn )
shall formulate an algorithm-Newton interpolation in a recursive form.

n=0: P0 (x) = f (x0 ) = y0


n=1: SupposeP1 (x) = P0 (x) + C1 (x − x0 ),
Since P1 (x)passes through (x1 , f (x1 )), it yields
P1 (x1 ) = f (x0 ) + C1 (x − x0 ) = f (x1 )
which results in
f (x1 ) − f (x0 )
C1 = = f [x0 , x1 ].
x1 − x0
n=2: Assume P2 (x) = P1 (x) + C2 (x − x0 )(x − x1 ),
It is obvious that P2 (x) meets (x0 , f (x0 )) and (x1 , f (x1 )).
Considering P2 (x)also passes throughout(x2 , f (x2 )), we get
f (x2 ) − f (x0 ) − f [x0 , x1 ](x2 − x0 )
C2 =
(x2 − x0 )(x2 − x1 )
f [x1 , x2 ](x2 − x1 ) + f [x0 , x1 ](x1 − x0 ) − f [x0 , x1 ](x2 − x0 )
=
(x2 − x0 )(x2 − x1 )
f [x1 , x2 ](x2 − x1 ) − f [x0 , x1 ](x2 − x1 )
=
(x2 − x0 )(x2 − x1 )
f [x1 , x2 ] − f [x0 , x1 ]
= = f [x0 , x1 , x2 ].
(x2 − x0 )

General expression for Cn :


Assume that Pn−1 (x) is an interpolatory polynomial based on (xi , f (xi )), for i =
0, 1, · · · , n − 1. We shall find the form of Pn (x) interpolating (xi , f (xi )) for i =
0, 1, · · · , n − 1, n, in the form

Pn (x) = Pn−1 (x) + Cn (x − x0 )(x − x1 ) · · · (x − xn−1 ),

whose form is called Newton interpolation, denoted by Nn (x). The condition f (xn ) =
Pn (xn ) yields
f (xn ) − Pn−1 (xn )
Cn = .
(xn − x0 )(xn − x1 ) · · · (xn − xn−1 )
To derive the constant Cn , the following theorem is formulated.

Theorem 4.3. Assume the polynomial of degree n

Nn (x) = C0 + C1 (x − x0 ) + C2 (x − x0 )(x − x1 ) + · · · + Cn (x − x0 ) · · · (x − xn−1 )

interpolating the conditions Nn (xi ) = f (xi ), i = 0, 1, · · · , n − 1, n, then it holds that

C0 = f [x0 ],
C1 = f [x0 , x1 ],
C2 = f [x0 , x1 , x2 ],
..
.,
Cn = f [x0 , x1 , x2 , · · · , xn ].

8
Proof. We shall prove Cn = f [x0 , x1 , x2 , · · · , xn ] by the induction.
This formula is true for n = 0 and n = 1. Now, assuming that it holds for n − 1, i.e.

Cn−1 = f [x0 , x1 , x2 , · · · , xn−1 ],

then it follows that

Nn−1 (x) = f [x0 ] + f [x0 , x1 ](x − x0 ) + · · · + f [x0 , x1 , · · · , xn−1 ](x − x0 ) · · · (x − xn−2 ),

which interpolates the points (xi , yi ), i = 0, 1, · · · , n − 1.


Let q(x) interpolate the points (xi , yi ), i = 1, · · · , n. Note that, comparing to Nn−1 ,
the function q(x) does not interpolate (x0 , y0 ), instead the other point of (xn , yn ). Since
both Nn−1 and q(x) are polynomials of degree n − 1, they can be written in Newton form

Nn−1 (x) = Nn−2 (x) + f [x0 , x1 , · · · , xn−1 ](x − x0 )(x − x1 ) · · · (x − xn−2 )


= f [x0 , x1 , · · · , xn−1 ]xn−1 + other polynomial of degree ≤ n − 2,
q(x) = f [x1 , x2 , · · · , xn−1 , xn ]xn−1 + other polynomial of degree ≤ n − 2.

Set
x − xn
Nn (x) = q(x) + (q(x) − Nn−1 (x)).
xn − x0
We claim that Nn (x) interpolates all points (xi , yi ), i = 0, 1, · · · , n. To check this claim,
we go through all point xi with i = 0, 1, · · · , n, as follows

i = 1, 2, · · · , n − 1 : q(xi ) = Nn−1 (xi ) = f (xi ), Nn (xi ) = f (xi ) = q(xi ),


x0 − xn
i=0: Nn (x0 ) = q(x0 ) + (q(x0 ) − Nn−1 (x0 )) = f (x0 ),
xn − x0
i=n: Nn (xn ) = q(xn ) + 0 = f (xn ).

Therefore, we get

Nn (x) = f [x1 , · · · , xn ]xn−1 + other polynomial of degree ≤ n − 2


−f [x0 , x1 , · · · , xn−1 ]xn−1 − other polynomial of degree ≤ n − 2

x − xn
+
xn − x0 +f [x1 , x2 , · · · , xn ]xn−1 + other polynomial of degree ≤ n − 2
f [x1 , x2 , · · · , xn ] − f [x0 , x1 , · · · , xn−1 ] n
= x + other polynomial of degree ≤ n − 1
xn − x0
which is combined with the definition form of Newton interpolation yielding

Nn (x) = Nn−1 (x) + Cn (x − x0 ) · · · (x − xn−1 )


= f [x0 , x1 , · · · , xn ]xn + other polynomial of degree ≤ n − 1.

Since the Uniqueness of interpolating polynomials, they must have matching coefficients
for each term pertinent to xn ,. Especially, for the leading term, it results in

Cn = f [x0 , x1 , · · · , xn ].

The relation between the divided difference table and the Newton form can be con-
structed as

Nn (x) = f [x0 ] + f [x0 , x1 ](x − x0 ) + · · · + f [x0 , x1 , · · · , xn ](x − x0 )(x − x1 ) · · · (x − xn−1 )

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

It is observed that the coefficients of Newton form are the first one of each column in the
table except for the first column.
x 1 2 0 3
Example Find the Newton interpolating polynomial for the data
y 3 2 -4 5
Solution Based on the table
1 3
2 2 -1
,
0 −4 3 -4
3 5 3 0 2

it can be easily written that

N3 (x) = 3 − 1(x − 1) − 4(x − 1)(x − 2) + 2(x − 1)(x − 2)x.

The error of the Newton form of interpolating polynomial


The interpolating polynomial of degree n passing through Pn (xi ) = f (xi ), i = 0, 1, · · · , n,
is unique no matter what kind of algorithm we use. In other words, it holds that
Pn (x) = Ln (x) = Nn (x). Of course, the error of the Newton form of the interpolatory
polynomial is the error of Pn (x), such that

Rn (x) = f (x) − Nn (x) = f (x) − Ln (x) = f (x) − Pn (x)


f n+1 (ξ)
= (x − x0 )(x − x1 ) · · · (x − xn ).
(n + 1)!

On the other hand, the error of the Newton form has it’s own representation. Commence
from

Nn+1 (x) = Nn (x) + f [x0 , x1 , · · · , xn , xn+1 ](x − x0 )(x − x1 ) · · · (x − xn )

which interpolates the points x0 , x1 , · · · , xn , xn+1 . Therefore, we have

f (xn+1 ) = Nn+1 (xn+1 ) = Nn (xn+1 ) + f [x0 , x1 , · · · , xn , xn+1 ](xn+1 − x0 ) · · · (xn+1 − xn ),

which yields that

f (xn+1 ) − Nn (xn+1 ) = f [x0 , x1 , · · · , xn , xn+1 ](xn+1 − x0 ) · · · (xn+1 − xn ).

Considering the arbitrary property of the point xn+1 , switching xn+1 to x results in

f (x) − Nn (x) = f [x0 , x1 , · · · , xn , x](x − x0 ) · · · (x − xn ).

which is Rn (x). Summarizing the results, it holds that

Rn (x) = f (x) − Nn (x) = f [x0 , x1 , · · · , xn , x](x − x0 ) · · · (x − xn )


f (n+1) (ξ)
= (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!

10
which also implies the relation between the divided difference and the derivatives

f (n+1) (ξ)
= f [x0 , x1 , · · · , xn , x], ξ lies in x, x0 , x1 , · · · , xn .
(n + 1)!

Property 1 When n = 1, we have

f (1) (ξ)
f [x0 , x1 ] = , ξ lies in x0 and x1 .
1!
When n = 2,

f (2) (ξ)
f [x0 , x1 , x2 ] = , ξ lies in x0 , x1 and x1 .
2!
In particular, if x0 = x1 = x2 = · · · = xn , it yields
n+1
z }| { f (n) (x0 )
f [x0 , x0 , · · · , x0 ] = .
n!
In addition,

f [x0 , x1 ] = f [x1 , x0 ],
f [x0 , x1 , x2 ] = f [x1 , x0 , x2 ] = · · · ,
f [x0 , x1 , · · · , xn ] = f [ any permutation of x0 , x1 , · · · , xn ].

Property 2 Since Pn (x) is unique, it follows that

Pn (x) = Ln (x) = Nn (x)

which implies that the leading coefficients are the same,


n
X f (xk )
f [x0 , x1 , x2 , · · · , xn ] =
π 0 (xk )
k=0

where
(x − x1 ) · · · (x − xn ) (x − x0 ) · · · (x − xn−1 )
Ln (x) = f (x0 ) + · · · + f (xn )
(x0 − x1 ) · · · (x0 − xn ) (xn − x0 ) · · · (xn − xn−1 )

whose leading coefficient is


n
X f (xk )
0
πn+1 (xk )
k=0

where
πn+1 (x) = (x − x0 )(x − x1 ) · · · (x − xn ).
Exercises
(1) Find the Lagrange interpolating polynomial and Newton interpolating polynomial
for these data
3
x 1 2 0 2
13 5
f(x) 3 4 3 3

and two kinds of error representations.

11
(2) The polynomial

P (x) = 2 − (x + 1) + x(x + 1) − 2x(x + 1)(x − 1)

interpolates the first four points in the table:

x -1 0 1 2 3
y 2 1 2 -7 10

By adding one additional term to P (x), find a polynomial that interpolates the whole
table.
(3) Let f (x) = x1 and prove
n
Y 1
f [x0 , x1 , · · · , xn ] = (−1)n .
xi
i=0

Hint Use the induction method.


(4) For the particular function f (x) = xm , m ∈ N , show that

1, if n = m
f [x0 , x1 , · · · , xn ] =
0, if n > m.

4.4 Hermite interpolation


The term Hermite interpolation refers to the interpolation of a function at those values
of the function and its derivatives. There are two forms for Hermite interpolation.
1. Newton form of Hermite interpolation
We begin with a simple case in which a quadratic polynomial N2 (x) is sought, taking
prescribed values:

N2 (x0 ) = f (x0 ), N20 (x0 ) = f 0 (x0 ), N2 (x1 ) = f (x1 )

x0 f (x0 )
x0 f (x0 ) f 0 (x0 )
f [x0 , x1 ]−f 0 (x0 )
x1 f (x0 ) f [x0 , x1 ] x1 −x0

Therefore,

f [x0 , x1 ] − f 0 (x0 )
N2 (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + (x − x0 )2 .
x1 − x0
Example Use the extended Newton divided difference algorithm to determine a
polynomial that takes these values

P (1) = 2, P 0 (1) = 3, P (2) = 6, P 0 (2) = 7, P (2) (2) = 8.

According to the table

1 2
1 2 3
2 6 4 1 ,
2 6 7 3 2
2 6 7 4 1 −1

12
it can be written directly that

N4 (x) = 2 + 3(x − 1) + 1(x − 1)2 + 2(x − 1)2 (x − 2) − 1(x − 1)2 (x − 2)2

and
R4 (x) = f [1, 1, 2, 2, 2, x](x − 1)2 (x − 2)3 .
2. Lagrange form of Hermite interpolation
Example Find a polynomial P (x) by interpolation under these data

P (0) = 3, P (1) = 1, P 0 (1) = 2.

Solution Since there are three conditions, we try a quadratic polynomial

L2 (x) = l0 (x)f (x0 ) + l1 (x)f (x1 ) + l1 (x)f 0 (x1 )


= l0 (x) · 3 + l1 (x) + l1 (x) · 2

which is required to satisfy these three conditions

L2 (0) = 3 ⇒ l0 (0) = 1, l0 (1) = 0, l00 (1) = 0


L2 (1) = 1 ⇒ l1 (0) = 0, l1 (1) = 1, l10 (1) = 0
L02 (1) = 2 ⇒ l1 (0) = 0, l1 (1) = 0, l10 (1) = 1.

Therefore, it is deduced that 1 is the zero of l0 (x), that is,

l0 (x) = (Ax + B)(x − 1) ⇒ (x − 1)2 ,


l0 (0) = B(x − 1) = 1 ⇒ B = −1,
l00 (x) = A(x − 1) + (Ax + B) = A + B = 0 ⇒ A = 1.

Similarly, it follows that

l1 (x) = (Ax + B)(x − 0) = (Ax + B)x,


l1 (1) = A + B = 1,
l10 (x) = Ax + B + Ax = 2Ax + B = 2A + B = 0 ⇒ l1 (x) = (−x + 1)x.

Suppose that

l1 (x) = A(x − 0)(x − 1) = Ax(x − 1),


l10 (x) = A(x − 1) + Ax = 2Ax − A = A = −1 ⇒ l10 (x) = x(x − 1).

The error is
f (3) (ξ)
R2 (x) = (x − 0)(x − 1)2 .
3!
In general, if values of a function f and some of its derivations are to be interpolated
by a polynomial, we are encountered with some difficulties because the linear systems of
equations may be singular. A simple example will illustrate this.
Exercise Find a polynomial P (x) meeting these values
 
0 1
P (0) = 0, P (1) = 1, P = 2.
2

13
Solution Since there are three conditions, we try a quadratic

P (x) = a0 + a1 x + a2 x2

Then

P (0) = 0 ⇒ a0 = 0
P (1) = a1 + a2 = 1
 
0 1 0
P (x) = a1 + 2a2 x ⇒ P = a1 + a2 = 2.
2

Thus no quadratic polynomial solves our problem. Notice the coefficient matrix is
singular. If we try a cubic polynomial for the same problem,

P (x) = a0 + a1 x + a2 x2 + a3 x3 ,

then we get
P (0) = a0 = 0.
The remaining conditions are

P (1) = 1 ⇒ a0 + a1 + a2 + a3 = 1
 
1 3
P 0 (x) = a1 + 2a2 x + 3a3 x2 and P 0 = 2 ⇒ a1 + a2 + a3 = 2.
2 4

The solution of this system is a3 = −4 and a1 + a2 = 5. This is referred to Birkhoff


Interpolation.
Exercises
1. Use the extended Newton divided difference method to obtain a quadratic polyno-
mial that takes these values

x 0 1 2
p(x) -2 -4 10

2. Find a formula for the polynomial P of least degree that takes these values:

P (xi ) = yi , P 0 (xi ) = 0 (0 ≤ i ≤ n).

14

You might also like