Académique Documents
Professionnel Documents
Culture Documents
CTD3
CTD3
Analyse Numérique
Proposition de corrigé du TD 3
EXERCICE 1
Interpolation de Lagrange
Li (x) = ci Πnj=0,j6=i (x − xj ) .
De Li (xi ) = 1, on déduit
1
ci = .
Πnj=0,j6=i (xi − xj )
D’où
Πnj=0,j6=i (x − xj ) n
x−x
j
Li (x) = = Πj=0,j6=i .
Πnj=0,j6=i (xi − xj ) xi − xj
1
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
Unicité de pn
Soient pn , qn ∈ Pn tels que pn (xi ) = f (xi ) ∀i = 0, ..., n et qn (xi ) = f (xi ) ∀i = 0, ..., n.
Alors le polynôme r = pn − qn ∈ Pn a (n + 1) racines (xi )i=0,n . Comme deg r ≤ n,
nécessairement r = 0.
xi −1 −1/2 0 1/2 1
f (xi ) −3/2 0 1/4 0 0
On a
p4 (x) = f (x0 )L0 (x) + f (x1 )L1 (x) + f (x2 )L2 (x) + f (x3 )L3 (x) + f (x4 )L4 (x) ,
3 1
= − L0 (x) + f (x2 )L2 (x) .
2 4
où
1 1 1 1
(x + )x(x − )(x − 1) x4 − x3 − x2 + x
L0 (x) = 2 2 = 4 4 ,
1 1 3
(−1 + )(−1 − 0)(−1 − )(−1 − 1)
2 2 2
1 1 5 1
(x + 1)(x + )(x − )(x − 1) x4 − x2 +
L2 (x) = 2 2 = 4 4.
1 1 1
(0 + 1)(0 + )(0 − )(0 − 1)
2 2 4
D’où
4 3 1 2 1 4 5 2 1
3 x − x − 4x + 4x 1 x − 4
x +
4 = x3 − x2 − 1 x + 1 .
p4 (x) = − +
2 3 4 1 4 4
2 4
2
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
Πnj=0 (x − xj ) (n+1)
f (x) − pn (x) = f (ξ) . (1.1)
(n + 1)!
f (x) − p(x)
k(x) = . (1.2)
Πnj=0 (x − xj )
D’autre part, la fonction t 7→ φ(t) est de classe C n+1 ([a, b]) admet (n+2) racines distinctes
x, x0 , x1 , ..., xn sur ]a, b[. D’après le théorème de Rolle :
t 7→ φ0 (t) est de classe C n ([a, b]) admet (n + 1) racines distinctes sur ]a, b[, appartenant
chacune entre les intervalles ouverts d’extrémités de x, x0 , x1 , ..., xn contenus dans ]a, b[.
Par application du théorème de Rolle,
t 7→ φ(2) (t) est de classe C n−1 ([a, b]) admet n racines distinctes sur ]a, b[. Par application
du théorème de Rolle une nouvelle fois,
t 7→ φ(3) (t) est de classe C n−2 ([a, b]) admet n − 1 racines distinctes sur ]a, b[.
Ainsi de suite, par application du théorème de Rolle, t 7→ φ(n+1) (t) est de classe C 0 ([a, b])
admet une racine ξ ∈]a, b[, φ(n+1) (ξ) = 0.
(n+1)
Puisque pn ∈ Pn , on a pn = 0 et
D’où le résultat.
e. Soient f (x) = cos(x) et g(x) = e3x définies sur [0, 1]. Estimer le nombre
minimum de points pour que l’erreur entre la fonction et son polynôme d’in-
terpolation de Lagrange soit inférieure à 0.1, 0.01 et 0.001.
3
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
3(n+1) exp(3)
g(x) − pn (x) ≤ ≤ ε.
(n + 1)!
D’où
• ε = 0.1 :
3(9+1) exp(3)
' 0.3268383 ,
(9 + 1)!
3(10+1) exp(3)
' 0.0891377 ⇒ n ≥ 10 .
(10 + 1)!
• ε = 0.01 :
3(11+1) exp(3)
' 0.0222844 ,
(11 + 1)!
3(12+1) exp(3)
' 0.0051426 ⇒ n ≥ 12 .
(12 + 1)!
• ε = 0.001 :
3(13+1) exp(3)
' 0.0011020 ,
(13 + 1)!
3(14+1) exp(3)
' 0.0002204 ⇒ n ≥ 14 .
(14 + 1)!
4
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
EXERCICE 2
Interpolation de Hermite
Existence
On pose p(x) = a3 x3 + a2 x2 + a1 x + a0 , donc p0 (x) = 3a3 x2 + 2a2 x + a1 .
Les conditions sur p et p0 s’écrivent :
a3 x31 + a2 x21 + a1 x1 + a0 = f (x1 ) ,
x21 x31
1 x1 a0 = f (x1 )
2 3
1 x2 x2 x2 a1 = f (x2 )
,
0 1 2x1 3x2 a2 = f 0 (x1 )
1
0 1 2x2 3x22 a1 = f 0 (x2 )
ou bien encore
AX = B
avec
x21 x31
1 x1 a0 f (x1 )
1 x2 x22 x32
a1 f (x2 )
A=
, X=
, C=
.
0 1 2x1 3x 2 a2 f 0 (x1 )
1
0 1 2x2 3x22 a1 f 0 (x2 )
5
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
4
On a det(A) = − x2 − x1 6= 0 puisque x1 6= x2 , d’où l’existence de p.
Unicité de p
Soient p, q ∈ P3 tels que
p(xi ) = f (xi ) , i = 1, 2 ,
p0 (xi ) = f 0 (xi ) , i = 1, 2 .
Soit r = p − q. Alors
r(xi ) = f (xi ) , i = 1, 2 ,
⇒ r(x) = C(x) (x − x1 )2 (x − x2 )2 .
r0 (xi ) = f 0 (xi ) , i = 1, 2 ,
(x − x1 )2 (x − x2 )2 (4)
f (x) − p(x) = f (ξ) .
4!
• Si x = x1 ou x2 , alors f (x) − p(x) = 0, et tout ξ ∈]a, b[ convient.
• Si x 6= x1 , x2 , on pose
6
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
On a
0 = φ(4) (ξ) = f (4) (ξ) − p(4) (ξ) − (4!) k(x) . (2.2)
Comme p ∈ P3 , on a p(4) = 0. Des équations (2.1) et (2.2), on déduit
p(x) = f (x1 )A1 (x) + f (x2 )A2 (x) + f 0 (x1 )B1 (x) + f 0 (x2 )B2 (x) .
et exprimer cette base en fonction des polynômes d’interpolation de Lagrange
L1 et L2 .
f (x1 )A1 (x1 ) + f (x2 )A2 (x1 ) + f 0 (x1 )B1 (x1 ) + f 0 (x2 )B2 (x1 ) = f (x1 ) ,
ou encore
h i
f (x1 ) A1 (x1 ) − 1 + f (x2 )A2 (x1 ) + f 0 (x1 )B1 (x1 ) + f 0 (x2 )B2 (x1 ) = 0 .
7
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
2 1 2x1 3x1 − x2
d’où on tire a = − et b = + = .
(x1 − x2 )3 (x1 − x2 )2 (x1 − x2 )3 (x1 − x2 )3
Et donc
2(x − x1 )(x − x2 )2 (x − x2 )2
A1 (x) = − + . (2.13)
(x1 − x2 )3 (x1 − x2 )2
Par symétrie on obtient
2(x − x2 )(x − x1 )2 (x − x1 )2
A2 (x) = − + . (2.14)
(x2 − x1 )3 (x2 − x1 )2
1 x1
Donc a = et b = −ax1 = − .
(x1 − x2 )2 (x1 − x2 )2
8
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
D’où
(x − x1 )(x − x2 )2
B1 (x) = . (2.16)
(x1 − x2 )2
Par raison de symétrie on a
(x − x2 )(x − x1 )2
B2 (x) = . (2.17)
(x2 − x1 )2
x − x x − x 2
1 2
B1 (x) = (x2 − x1 ) ×
x1 − x2 x1 − x2
= (x2 − x1 ) (L1 (x))2 ,
Alors on a
n
X
p(x) = f (xi )Ai (x) + f 0 (xi )Bi (x) ,
i=1
9
Université de Nice Sophia-Antipolis
Licence L3 Mathématiques Année 2008/2009
Ce qui donne
ci = 1 , ai = −2L0i (xi ) ,
bi = 1 , di = 0 .
i h
Si f est de classe C 2n , alors il existe ξ ∈ min (x, (xi )i=1,..,n ) , max (x, (xi )i=1,..,n ) tel que
f (2n) (ξ) n 2
f (x) − p(x) = Πj=0 x − xj .
(2n)!
10