You are on page 1of 7

Chapitre I: Polynomial Interpolation

K. Jbilou
Prof. EILCO
jbilou@univ-littoral.fr

1 The Problem. Existence and Uniqueness


It is often needed to estimate the value of a function f at certain point x based on the known values
of the function f at given points x0 , . . . , xn in the interval [a, b]. This process is called interpolation.
One way to carry out these operations is to approximate the function f by an n-th degree polynomial
Pn . Once this polynomial is available, any operation applied to f , such as differentiation, integration,
and root finding, can be carried out approximately based on Pn (x) ≈ f (x). This is particularly useful
if f is non-elementary and therefore difficult to manipulate, or it is only available as a set of discrete
samples without a closed-form expression.

Let x0 , . . . ,xn be fixed n + 1 points in [a, b], and let y0 , . . . , yn be real or complex given values.
The problem is how to construct a polynomial Pn of degree at most n and satisfying the following
interpolation conditions

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


The polynomial Pn can be written in the canonical basis as follows
n
X
Pn (x) = ai x i (2)
i=0

where the coefficients ai are determined from the interpolation conditions


n
X
Pn (xj ) = yj = ai xij , for j = 0, . . . , n. (3)
i=0

Therefore, the coefficients ai ’s are solution of the following linear system of equation


 a0 + a1 x0 + . . . an xn0 = y0
a0 + a1 x1 + . . . an xn1 = y1

(4)

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

The principal of the determinant corresponding to this linear system is called ”Vandermonde”
determinant and is given by
1 x0 . . . xn0
1 x1 . . . xn1
V (x0 , . . . , xn ) = .. .. .. . . (5)
. . . ..
1 xn . . . xnn

1
The value of this determinant is given by
Y
V (x0 , . . . , xn ) = (xj − xi ).
0≤i<j≤n

Then, the coefficients a0 , a1 , . . . , an exist and are unique if and only if the Vandermonde determinant
is non zero which is equivalent to the main condition:

xi 6= xj , i 6= j. (6)

We finally have the following main result

Theorem 1 A necessary and sufficient condition for the existence of a unique interpolation polyno-
mial Pn of degree at most n and satisfying the interpolation (3) is that the n + 1 points x0 , . . . , xn
are different.

From now on, we assume that the conditions of Theorem 1 are satisfied. Next, we will express
the interpolation polynomial Pn in different bases allowing a ”good” numerical computation of this
polynomial.

2 The expression of the interpolation polynomial using the


Lagrange basis
We consider the Lagrange polynomial Li , i = 0, . . . , n of degree n defined by

Li (xj ) = δi,j , for i, j = 0, . . . , n

where δi,j is the Kronecker symbol defined by δi,j = 1 for i = j and δi,j = 0 elsewhere.

The polynomials Li are called the Lagrange polynomials associated to the points x0 , . . . , xn .

As Li (xj ) = 0 for j 6= i, the Lagrange polynomial Li is divided by x − xj if j 6= i. So we know n


divisors of the polynomial Li de degree n. Therefore
n
Y
Li (x) = λi . (x − xj ).
j=0j6=i

1
The condition Li (xi ) = 1 gives us the constant λi = Qn .
j=0j6=i (xi − xj )
Finally, the Lagrange polynomial Li is given by
Qn n
j=0j6=i (x − xj ) x − xj
Y
Li (x) = Qn = for i = 0, . . . , n. (7)
j=0j6=i (xi − xj ) j=0j6=i
x i − xj

2
It is easy to show that {L0 , . . . , Ln } is a basis of the vector space Pn of the polynomial of degree
at most n. This basis is called the Lagrange basis of Pn . Then every polynomial Q in Pn , can be
written as n
X
∀x ∈ IR, Q(x) = Q(xi )Li (x). (8)
i=0

In particular, the interpolation polynomial satisfying the conditions (3), can be expressed as
n
X
∀x ∈ IR, Pn (x) = yi Li (x). (9)
i=0

3 The expression of the Error-Interpolation


Assume now that the yi ’s are the values of an unknown function f at the points xi . We also assume
that the function f is of class C n+1 ([a, b]). Let x be a fixed point in [a, b] (x 6= xi ) and introduce the
function F by
Yn
F (t) = f (t) − Pn (t) − K(x) (t − xi ), t ∈ [a, b]
i=0

where K(x) is a constant depending on x and such that F (x) = 0.


The F is C n+1 ([a, b]) and takes the value zero for the n + 2 points x0 , . . . , xn , x.
Therefore, using the classical Rolle’s theorem, the derivative F 0 of F has at least n+1 zeros. Applying
again this last theorem to F 0 , shows that F 00 has at least n zeros and finally the function F (n+1) has
at least one zero ξx ∈] min(x0 , . . . , xn , x), max(x0 , . . . , xn , x)[. Since

F (n+1) (t) = f (n+1) (t) − K(x) (n + 1)!, ∀t ∈ [a, b],


(n+1)
the condition F (n+1) (ξx ) = 0 implies K(x) = f (n+1)!
(ξx )
.
The relation F (x) = 0 gives the following expression of the interpolation error
n
f (n+1) (ξx ) Y
E(x) = f (x) − Pn (x) = (x − xi ).
(n + 1)! i=0

Notice that if x = xi we get E(xi ) = 0. We can state the main theorem

Theorem 2 Let f : [a, b] 7→ IR be a function defined on [a, b] and let x0 , . . . , xn , n + 1 be n + 1


distinct points in [a, b] . Then there exists a unique polynomial Pn of degree at most n satisfying the
interpolation conditions
Pn (xi ) = f (xi ), pour i = 0, . . . , n.
This polynomial Pn is given by the Lagrange formulae as
n
X
Pn (x) = f (xi )Li (x) ∀x ∈ IR.
i=0

3
If f is in C n+1 ([a, b]), then for all x ∈ [a, b], there exists an ξx ∈] min(x0 , . . . , xn , x), max(x0 , . . . , xn , x)[
such that the error E(x) is given by
n
f (n+1) (ξx ) Y
E(x) = f (x) − Pn (x) = (x − xi ).
(n + 1)! i=0

Next, we will give some recursive algorithms allowing an efficient computation of the the polynomial
Pn .

4 The Neville-Aitken algorithm


The polynomial Pn can be computed for an x ∈ IR by using the Neville-Aitken’s algorithm described
as follows.
Let f be a function and let Pn the interpolation polynomial of f at the given points x0 , . . . , xn .
(m)
We denote by Pk the interpolation polynomial of degree ≤ k, of the function f at the (k + 1) points
points: xm , xm+1 , . . . , xm+k with 0 ≤ k ≤ n et 0 ≤ m ≤ n − k. This polynomial exists and is unique
and for m = 0, . . . , n, we have
(m)
P0 (x) = f (xm ) ∀x ∈ IR. (10)
(m)
In fact, P0 is of degree 0 interpolating f at xm and for k = 1, . . . , n; m = 0, . . . , n − k, the
(m)
polynomial Pk can be computed recursively by the relation
(m+1) (m)
(m) (x − xm )Pk−1 (x) − (x − xm+k )Pk−1 (x)
Pk (x) = , (11)
xm+k − xm
Therefore, the polynomial Pn is obtained as

Pn (x) = P(0)
n (x).

4
The Neuville-Aitken scheme for computing Pn (x) is as follows
(0)
P0 (x)
(0)
P1 (x)
(1) (0)
P0 (x) P2 (x)
(1) (0)
P1 (x) P3 (x)
(2) .. (1) ...
P0 (x) . P2 (x)
.. .. .. (1) ..
. . . P3 (x) .
.. .. .. .. (0)
. . . . Pn (x) = Pn (x)
.. .. .. .. .
. . . . ..
.. .. ..
P0
(n−3)
(x) . . . . ..
(n−2) .. (n−3)
P1 (x) . P3 (x)
(n−1) (n−2)
P0 (x) P2 (x)
(n−1)
P1 (x)
(n)
P0 (x)

The values of the first column are given and the computation is done from the left to the right using
the Neuville-Aitken’s rule (11). Next, we will see a second way of computing the polynomial Pn .

5 Divided differences
(m) (m)
Let ak be the coefficient corresponding to the highest degree of the le polynomial Pk given earlier.
It is clear that for m = 0, . . . , n, we have
(m)
a0 = f (xm ). (12)

By identification in the relatio(11), for k = 1, . . . , n and m = 0, . . . , n − k, we get


(m+1) (m)
(m) a − ak−1
ak = k−1 . (13)
xm+k − xm
(m)
Notation: The coefficients ak are denoted by [xm , xm+1 , . . . , xm+k ]f . They are called divided dif-
ferences of order k of the function f at the points xm , xm+1 , . . . , xm+k .

We notice that [xm , xm+1 , . . . , xm+k ] is conserved for any permutation of the interpolation points
xm , xm+1 , . . . , xm+k ].

The divided differences could be computed by the formulas (12) and (13). The scheme is similar to

5
the Neuville-Aitken scheme and is described as follows
f (x0 )
[x0 , x1 ]f
f (x1 ) [x0 , x1 , x2 ]f
[x1 , x2 ]f
.. ..
f (x2 ) . [x1 , x2 , x3 ]f .
.. .. .. ..
. . . .
.. .. ..
. . . [x0 , x1 , . . . , xn ]f
.. .. ..
. . . . ..
.. .
[xn−2 , xn−1 ]f . ..
f (xn−1 ) [xn−2 , xn−1 , xn ]f
[xn−1 , xn ]f
f (xn )
The algorithm is summarized as follows
For m := 0 to n do
[xm ]f := f (xm );
end for;
For k := 1 to n do
for m := 0 to n − k do
[xm+1 , . . . , xm+k ]f − [xm , xm+1 , . . . , xm+k−1 ]f
[xm , xm+1 , . . . , xm+k−1 , xm+k ]f = ;
xm+k − xm
end
End

6 The Newton basis


Let {ν0 , ν1 , . . . , νn } be the family of the following polynomials
i−1
Y
ν0 (x) = 1 et νi (x) = (x − xj ), pour 1 ≤ i ≤ n. (14)
j=0

It is not difficult to show that it is a basis of the vector space Pn . This basis is called the Newton
basis associated to the points x0 , . . . , xn .
(0) (0)
The polynomial Qk (x) = Pk (x) − Pk−1 (x) is of degree less or equal to k whose coefficient corre-
sponding to the highest degree is
(0)
ak = [x0 , x1 , . . . , xk ]f .
This polynomial Q vanishes at x0 , . . . , xk−1 , and can be written as
k−1
Y
(0) (0)
Q(x) = Pk (x) − Pk−1 (x) = [x0 , x1 , . . . , xk ]f (x − xi ).
i=0

6
Then summing this last equation from k = 1 to k = n, we get
n
X k−1
Y
(0)
Pn(0) (x) = P0 (x) + [x0 , x1 , . . . , xk ]f (x − xi ).
k=1 i=0

(0) (0)
But since Pn (x) = Pn (x) et P0 (x) = f (x0 ) = [x0 ], we deduce the formulae
n
X k−1
Y
Pn (x) = f (x0 ) + [x0 , x1 , . . . , xk ]f (x − xi ) (15)
k=1 i=0

called the Newton interpolation formulae and can be also written as


n
X
Pn (x) = [x0 , x1 , . . . , xk ]f νk (x).
k=0

Now, we give another expression for the error interpolation. Let x ∈ [a, b] with x 6= xi for i = 0, . . . , n
and set xn+1 = x. Then there exists a unique polynomial Q of degree ≤ n + 1 interpolating the
function f at the n + 2 distinct points x0 , . . . , xn , xn+1 .

This polynomial is given by the Newton formulae as follows


n+1
X k−1
Y
Q(t) = f (x0 ) + [x0 , x1 , . . . , xk ] (t − xi ),
k=1 i=0

also written as n
Y
Q(t) = Pn (t) + [x0 , x1 , . . . , xn , x] (t − xi ). (16)
i=0

Now as Q(x) = f (x), and by taking t = x in (16) we get the new expression of the error at the point
x ∈ [a, b] as
n
Y
E(x) = f (x) − Pn (x) = [x0 , . . . , xn , x] (x − xi ). (17)
i=0

You might also like