Chapitre 3
Interpolation polynomiale
Les fonctions les plus faciles à évaluer numériquement sont les fonctions polynômes.
Il est donc important de savoir approximer une fonction arbitraire par des polynômes.
Problème
Soient n ∈ N, Pn l’ensemble des polynômes de degré inférieur ou égal à n et (x0 , y0 ),
(x1 , y1 ),...,(xn , yn ) ∈ R2 , (n + 1) couples, tels que x0 < x1 < ... < xn . On cherche un
polynôme P ∈ Pn tel que P (xi ) = yi pour i = 0, 1, ..., n.
Définition 3.0.10 Soient n ∈ N, x0 < x1 < ... < xn et y0 , y1 , ..., yn des réels. On
appelle polynôme d’interpolation sur les points (xi , yi ), i = 0, 1, ..., n, un polynôme
P ∈ Pn tel que
∀ i ∈ {0, 1, ..., n}, P (xi ) = yi .
Les xi sont appelés abscisses ou noeuds d’interpolation tandis que les couples (xi , yi ),
pour i = 0, 1, 2, ..., n, sont les points de collocation ou points d’interpolation et peuvent
provenir de données expérimentales ou d’une table.
Théorème 3.0.11 Soient n ∈ N, x0 < x1 < ... < xn et y0 , y1 , ..., yn des réels. Alors
il existe un unique polynôme P ∈ Pn tel que P (xi ) = yi , ∀ i ∈ {0, 1, ..., n}.
Démonstration
Unicité Soient P, Q ∈ Pn tels que P (xi ) = Q(xi ) pour i = 0, 1, ..., n. On a alors
P − Q ∈ Pn et il s’annule en (n + 1) points distincts, donc P − Q = 0.
Existence Soit k ∈ {0, 1, ..., n}. On considère le polynôme Lk tel que
0 si i 6= k
Lk (xi ) =
1 si i = k.
Construction de Lk (x)
n
Y
Pour i 6= k, x − xi divise le polynôme Lk (x) = (x − xi ), donc il existe αk ∈ R
i=0,i6=k
tel que
n
Y
Lk (x) = αk (x − xi ).
i=0,i6=k
16
n
Y
Lk (xi ) = 1 ⇔ αk (xk − xi ) = 1,
i=0,i6=k
donc
1
αk = Q n ·
i=0,i6=k (xk − xi )
On en déduit que
n
Y x − xi
Lk (x) = ·
i=0,i6=k
xk − xi
On pose
n
X
Pn (x) = yk Lk (x).
k=0
Pn est un polynôme de degré au plus n, Lk (xk ) = 1 et pour i 6= k, Lk (xi ) = 0, donc
Pn (xi ) = yi .
3.1 Polynôme d’interpolation de Lagrange
n
X
Définition 3.1.1 Le polynôme Pn défini par Pn (x) = yk Lk (x) est appelé poly-
k=0
nôme d’interpolation de Lagrange aux points (x0 , y0 ), (x1 , y1 ),...,(xn , yn ).
Exemple 3.1.2 Considérons les points (−1, 1), (0, 2), (1, 3) et (2, 4). On cherche le
polynôme
P3 (x) = y0 L0 (x) + y1 L1 (x) + y2 L2 (x) + y3 L3 (x).
On a :
(x − 0)(x − 1)(x − 2) x(x − 1)(x − 2)
L0 (x) = = ;
(−1 − 0)(−1 − 1)(−1 − 2) 6
(x + 1)(x − 1)(x − 2) (x2 − 1)(x − 2)
L1 (x) = = ;
(0 − (−1))(0 − 1)(0 − 2) 2
(x + 1)(x − 0)(x − 2) x(x + 1)(x − 2)
L2 (x) = = ;
(1 − (−1))(1 − 0)(1 − 2) −2
(x + 1)(x − 0)(x − 1) x(x + 1)(x − 1)
L3 (x) = = ·
(2 − (−1))(2 − 0)(2 − 1) 6
Donc
x(x − 1)(x − 2) (x2 − 1)(x − 2) x(x + 1)(x − 2) x(x + 1)(x − 1)
P3 (x) = +2 +3 +4
6 2 −2 6
1 3 4
= x(x2 − 3x + 2) + x3 − 2x2 − x + 2 − x(x2 − x − 2) + x(x2 − 1)
6 2 6
1 3
x − 3x + 2x + 6x − 12x − 6x + 12 − 9x + 9x + 18x + 4x3 − 4x
2 3 2 3 2
=
6
1 3 5
= x − x2 + x.
3 3
17
Remarque 3.1.3 La méthode d’interpolation de Lagrange présente un inconvénient
majeur : elle n’est pas récursive. En effet, si on souhaite passer d’un polynôme de
degré n à un polynôme de degré (n + 1) (en ajoutant un point de collocation), on doit
reprendre tout le processus à zéro et la détermination du polynôme d’interpolation
devient assez couteuse lorsque le nombre de noeuds s’accroit.
C’est en revanche ce que permet la méthode d’interpolation de Newton.
3.2 Polynôme d’interpolation de Newton
On considère l’ensemble
A = 1, (x − x0 ), (x − x0 )(x − x1 ), ..., (x − x0 )(x − x1 )...(x − xn−1 ) .
A est de cardinal (n + 1) et est une famille libre. En effet, soient λ0 , λ1 ,..., λn ∈ R
tels que
λ0 + λ1 (x − x0 ) + λ2 (x − x0 )(x − x1 ) + ... + λn (x − x0 )(x − x1 )...(x − xn−1 ) = 0.
Pour x = x0 , λ0 = 0 et on a :
λ1 (x − x0 ) + λ2 (x − x0 )(x − x1 ) + ... + λn (x − x0 )(x − x1 )...(x − xn−1 ) = 0.
Pour x = x1 , on a λ1 = 0.
Par itération, on obtient λ2 = 0, λ3 = 0,...,λn = 0. Donc A est une base de Pn .
Il en résulte qu’un polynôme Pn ∈ Pn s’écrit :
Pn (x) = β0 + β1 (x − x0 ) + β2 (x − x0 )(x − x1 ) + ... + βn (x − x0 )(x − x1 )...(x − xn−1 ),
βi ∈ R, i = 0, 1, ..., n.
Détermination des βi , i = 0, 1, ..., n
On a :
Pn (x0 ) = y0 = β0 , donc β0 = y0 .
Pn (x1 ) = y1 = β0 + β1 (x1 − x0 ),
donc
y1 − β0 y1 − y0
β1 = ⇒ β1 = ·
x1 − x0 x1 − x0
Pn (x2 ) = y2 = β0 + β1 (x2 − x0 ) + β2 (x2 − x0 )(x2 − x1 ).
18
En multipliant cette expression par (x1 − x0 ), on obtient :
(x1 − x0 )y2 = (x1 − x0 )y0 + (y1 − y0 )(x2 − x0 ) + β2 (x1 − x0 )(x2 − x0 )(x2 − x1 )
= (x1 − x0 )y0 + y1 (x2 − x0 ) − y0 (x2 − x0 ) + β2 (x1 − x0 )(x2 − x0 )(x2 − x1 )
= y0 (x1 − x2 ) + y1 (x2 − x0 ) + β2 (x1 − x0 )(x2 − x0 )(x2 − x1 )
= y0 (x1 − x2 ) + y1 (x2 − x1 ) + y1 (x1 − x0 ) + β2 (x1 − x0 )(x2 − x0 )(x2 − x1 )
= (y1 − y0 )(x2 − x1 ) + y1 (x1 − x0 ) + β2 (x1 − x0 )(x2 − x0 )(x2 − x1 ).
(x1 − x0 )(y2 − y1 ) = (y1 − y0 )(x2 − x1 ) + β2 (x1 − x0 )(x2 − x0 )(x2 − x1 ).
(y1 − y0 )(x2 − x1 )
y2 − y1 = + β2 (x2 − x0 )(x2 − x1 ).
x1 − x0
y2 − y1 y1 − y0
= + β2 (x2 − x0 ).
x2 − x1 x1 − x0
Donc
y2 − y1 y1 − y0
−
x − x1 x1 − x0
β2 = 2 ·
x2 − x0
On pose :
y[xi ] = yi
y1 − y0
y[x0 , x1 ] =
x 1 − x0
y[x1 , x2 ] − y[x0 , x1 ]
y[x0 , x1 , x2 ] =
x2 − x0
.
.
.
y[x1 , ..., xn ] − y[x0 , ..., xn−1 ]
y[x0 , x1 , ..., xn ] = ·
xn − x0
Proposition 3.2.1 Pour tout i ∈ {1, ..., n}, on a
βi = y[x0 , x1 , ..., xi ]
et d’une manière générale,
y[xi+1 , ..., xj ] − y[xi , ..., xj−1 ]
y[xi , ..., xj ] =
xj − xi
j
X yk
= ·
k=i
(xk − xi )...(xk − xk−1 )(xk − xk+1 )...(xk − xj )
Remarque 3.2.2 D’après la proposition précédente, on peut calculer les différences
divisées à l’aide d’une table triangulaire :
19
étape i xi yi = y[i] y[xi , xi+1 ] y[xi , xi+1 , xi+2 ] y[xi , xi+1 , xi+2 , xi+3 ]...
étape 0 x0 y[x0 ]
étape 1 x1 y[x1 ] y[x0 , x1 ]
étape 2 x2 y[x2 ] y[x1 , x2 ] y[x0 , x1 , x2 ]
étape 3 x3 y[x3 ] y[x2 , x3 ] y[x1 , x2 , x3 ] y[x0 , x1 , x2 , x3 ]
.. .. .. .. .. ..
. . . . . .
La construction de cette table est simple. Nous nous sommes arrêter aux troisièmes
différences divisées, mais les autres s’obtiendraient de la même manière. Pour obtenir
par exemple y[x1 , x2 ], il suffit de faire la différence des deux termes adjacents y[x2 ] −
y[x1 ] et de diviser le résultat par x2 − x1 . Pour calculer y[x1 , x2 , x3 ] on fait y[x2 , x3 ] −
y[x1 , x2 ] et on divise le résultat par x3 − x1 . De même, pour obtenir y[x0 , x1 , x2 , x3 ]
on calcule y[x1 , x2 , x3 ] − y[x0 , x1 , x2 ] et on divise le résultat par x3 − x0 .
La formule de Newton utilise la diagonale principale.
Théorème et Définition 3.2.3 Soit
n
X
Pn (x) = y0 + y[x0 , ..., xi ](x − x0 )(x − x1 )...(x − xi−1 ).
i=1
Pn est un polynôme d’interpolation de f aux noeuds xi , i = 0, 1, ..., n, appelé polynôme
d’interpolation de Newton.
Le coefficient y[x0 , x1 , ..., xk ] est appelé différence divisée d’ordre k de f aux points
x0 , x1 , ..., xk .
Remarque 3.2.4 Pour tout n ∈ N∗ , on a :
P0 (x) = y0 = y[x0 ]
Pn (x) = Pn−1 (x) + (x − x0 )(x − x1 )...(x − xn−1 )y[x0 , ..., xn ].
Exemple 3.2.5 En utilisant la méthode de Newton, donner le polynôme d’interpo-
lation P2 aux noeuds x0 = 0, x1 = 1 et x2 = 2 de la fonction f définie par
π
f (x) = cos x , x en radians.
2
Solution
En posant f [xi ] = f (xi ) = yi , on a
P2 (x) = f (x0 ) + (x − x0 )f [x0 , x1 ] + (x − x0 )(x − x1 )f [x0 , x1 , x2 ].
f (x1 ) − f (x0 ) 0−1
f [x0 , x1 ] = = = −1.
x1 − x0 1−0
20
f (x2 ) − f (x1 ) −1 − 0
f [x1 , x2 ] = = = −1.
x2 − x1 2−1
f [x1 , x2 ] − f [x0 , x1 ] −1 + 1
f [x0 , x1 , x2 ] = = = 0.
x2 − x0 2
D’où
P2 (x) = 1 + (x − 0) × (−1) + (x − x0 )(x − x1 ) × 0 = 1 − x.
3.3 Erreur d’interpolation
On cherche à évaluer l’erreur commise en approchant la valeur f (x) d’une fonction
f en un certain point x par la valeur Pn (x) du polynôme d’interpolation Pn de f en
x.
Théorème 3.3.1
Soient f : [a, b] → R une fonction (n + 1) fois dérivable sur l’intervalle [a, b] et Pn le
polynôme qui interpole f aux noeuds x0 , x1 , ..., xn où a ≤ x0 < x1 < ... < xn ≤ b. On
pose yi = f (xi ). Alors ∀ x ∈ [x0 , xn ], il existe ηx ∈ ]x0 , xn [ tel que
n
f (n+1) (ηx ) Y
f (x) − Pn (x) = L(x) où L(x) = (x − xi )
(n + 1)! i=0
et f (k) désigne la dérivée d’ordre k de f .
De plus, si f (n+1) est continue sur [a, b], alors on a pour tout x ∈ [a, b],
Mn+1
|f (x) − Pn (x)| ≤ sup |L(t)| où Mn+1 = sup |f (n+1) (t)|.
(n + 1)! t ∈ [x0 ,x1 ] t ∈ [x0 ,x1 ]
Preuve
Pour x = xi , i ∈ {0, 1, ..., n}, on a f (xi ) = yi = Pn (xi ). Donc f (xi ) − Pn (xi ) = 0 et
comme L(xi ) = 0, on a l’égalité.
Soit x ∈ [x0 , xn ], x 6= xi , i = 1, ..., n.
Considérons la fonction ϕ définie par
L(t)
ϕ(t) = f (t) − Pn (t) − f (x) − Pn (x) .
L(x)
ϕ admet des dérivées jusqu’à l’ordre (n + 1) et on a :
L(xi )
ϕ(xi ) = f (xi )−Pn (xi )− f (x)−Pn (x) = 0 car f (xi )−Pn (xi ) = 0 et L(xi ) = 0.
L(x)
Donc ϕ admet au moins (n+2) racines distinctes x, x0 , ..., xn dans l’intervalle [x0 , xn ].
D’après le théorème de Rolle, ϕ0 s’annule au moins une fois entre racines consécutives
de ϕ. Donc ϕ0 admet au moins (n + 1) racines distinctes sur ]x0 , xn [. En appliquant
le théorème de Rolle, ϕ” s’annule au moins n fois sur ]x0 , xn [.
En appliquant progressivement le théorème de Rolle, on a :
21
ϕ(n+1) s’annule au moins en un point de ]x0 , xn [. Donc il existe ηx ∈ ]x0 , xn [ tel que
ϕ(n+1) (ηx ) = 0.
Comme Pn est un polynôme de degré au plus n, sa dérivée (n + 1)-ieme est nulle. On
a donc
(n + 1)!
ϕ(n+1) (t) = f (n+1) (t) −
f (x) − Pn (x) .
L(x)
On en déduit que
(n + 1)!
0 = ϕ(n+1) (ηx ) = f (n+1) (ηx ) −
f (x) − Pn (x) ,
L(x)
d’où
f (n+1) (ηx )
f (x) − Pn (x) = L(x).
(n + 1)!
Exemple 3.3.2 En considérant l’exemple 3.2.5, donner une majoration de l’erreur
|f (x) − P2 (x)| sur l’intervalle [0, 2].
22