Professional Documents
Culture Documents
Chap1 InterpolationA
Chap1 InterpolationA
K. Jbilou
Prof. EILCO
jbilou@univ-littoral.fr
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
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)
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.
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 .
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
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 .
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)
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
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
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 .
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