Approximation et interpolation polynomiale
Fonctions polynomiales
Fonctions trigonométriques
Fonctions exponentielles
On recherche des fonctions “simples” (polynômes, polynômes par
morceaux, polynômes trigonométriques) passant par (ou proche) des points données
Interpolation polynomiale par morceaux: interpol ˆ e de type spline. ´
6. 6
Chapitre 3 : Approximation et interpolation polynomiale
3.1 Polynôme de Lagrange
Les données (𝑥0, 𝑦0) (𝑥1, 𝑦1) (𝑥𝑛, 𝑦𝑛)
𝑛 + 1 points
Trouver une fonction simple 𝑃 𝑥
telles que 𝑃 𝑥𝑖 = 𝑦𝑖 pour 𝑖 = 0,1, … . , 𝑛
𝑃 𝑥 = 𝑎0 + 𝑎1𝑥 + 𝑎2𝑥2
+ … . 𝑎𝑛𝑥𝑛 =
Polynôme
Existence d’un polynôme 0
( ) ( )
n
i i
i
P x y L x
7. 7
Chapitre 3 : Approximation et interpolation polynomiale
3.1 Polynôme de Lagrange
0
(
) (
)
n
ii
i
P
x y
L
x
0,
( )
( )
( )
n
j
i
j j i i j
x x
L x
x x
ave
c
Pour 𝑛 = 2 0 0 1 1 2 2
( ) ( ) ( ) ( )
P x y L x y L x y L x
1 2
0
0 1 0 2
( )( )
( )
( )( )
x x x x
L x
x x x x
0 2
1
1 0 1 2
( )( )
( )
( )( )
x x x x
L x
x x x x
0 1
2
2 0 2 1
( )( )
( )
( )( )
x x x x
L x
x x x x
8. 8
Chapitre 3 : Approximation et interpolation polynomiale
3.1 Polynôme de Lagrange
Exemple
𝒙𝒊 -1 0 1
𝒚𝒊 8 3 6
0 2 0 1
1 2
0 1 2
0 1 0 2 1 0 1 2 2 0 2 1
( )
( ) ( )
( )
( )
( )
(
)
( )
( ) ( )
( ) ( )
( )
x
xx
x x
xx
x
x
xx
x
P
x y y y
xxxx xxxx xxxx
Soit
Les données
1 2
0
0 1 0 2
( )
( ) ( 0
)
( 1
) ( 1
)
()
( )
( ) (10
)
(11
) 2
x x x x x x x
x
Lx
x x x x
9. 9
Chapitre 3 : Approximation et interpolation polynomiale
3.1 Polynôme de Lagrange
𝒙𝒊 -1 0 1
𝒚𝒊 8 3 6
0 2
1
1 0 1 2
( )( ) ( 1)( 1) ( 1)( 1)
( )
( )( ) (0 1)(0 1) 1
x x x x x x x x
L x
x x x x
0 1
2
2 0 2 1
( )( ) ( 1)( 0) ( 1)
( )
( )( ) (1 1)(1 0) 2
x x x x x x x x
L x
x x x x
( )( 1) ( )( 1)
( ) 8 3( 1)( 1) 6
2 2
x x x x
P x x x
( ) 4 ( 1) 3( 1)( 1) 3 ( 1)
P x x x x x x x
2
( ) 4 3
P x x x
10. 10
Chapitre 3 : Approximation et interpolation polynomiale
3.1 Polynôme de Lagrange
Exemple 2 Approximation de cos(𝑥)
𝑥𝑖 connues 𝒙𝒊 0 𝝅 2𝝅
𝒚𝒊 1 -1 1
0 2 0 1
1 2
0 1 2
0 1 0 2 1 0 1 2 2 0 2 1
( )
( ) ( )
( )
( )
( )
(
)
( )
( ) ( )
( ) ( )
( )
x
xx
x x
xx
x
x
xx
x
P
x y y y
xxxx xxxx xxxx
0 2
( )( 2 )
( )
2
x x
L x
1 2
( 2 )
( )
x x
L x
2 2
( )
( )
2
x x
L x
2 2 2
( )( 2 ) ( 2 ) ( )
( )
2 2
x x x x x x
P x
𝑦𝑖 calculée
s
11. Chapitre 3 : Approximation et interpolation polynomiale
3.2 Différences divisées ou interpolation de Newton
Les données (𝑥0, 𝑦0) (𝑥1, 𝑦1) (𝑥𝑛, 𝑦𝑛)
𝑛 + 1 points
Trouver une fonction simple 𝑃 𝑥
telles que 𝑃 𝑥𝑖 = 𝑦𝑖 pour 𝑖 = 0,1, … . , 𝑛
Le polynôme d’ordre 𝑛 s’écrit
0
( ) ( )
n
k k
k
P x e x
12. Chapitre 3 : Approximation et interpolation polynomiale
avec
0
( ) ( )
n
k k
k
P x e x
1
0
( ) ( )
k
k i
i
e x x x
Par convention 0 ( ) 1
e x
1 0
( ) ( )
e x x x
2 0 1
( ) ( )( )
e x x x x x
3 0 1 2
( ) ( )( )( )
e x x x x x x x
0 1 2 1
( ) ( )( )( )...( )
n n
e x x x x x x x x x
3.2 Différences divisées ou interpolation de Newton
0 0 1 1 2 2
( ) ( ) ( ) ( ) ... ( )
n n
P x e x e x e x e x
13. Chapitre 3 : Approximation et interpolation polynomiale
0
( ) ( )
n
k k
k
P x e x
et
1
, ,...
k o k
f x x x
0 o
f x
1 1
,
o
f x x
2 1 2
, ,
o
f x x x
3.2 Différences divisées ou interpolation de Newton
0 0 1 1 2 2
( ) ( ) ( ) ( ) ... ( )
n n
P x e x e x e x e x
0 0 1 0 0 1 2 0 1
( ) ( ) , ( ) , , ( )( ) ...
P x f x f x x x x f x x x x x x x
14. Chapitre 3 : Approximation et interpolation polynomiale
Soit
0 0
( )
o
f x f x
1 0
1 1
1 0
,
o
y y
f x x
x x
3.2 Différences divisées ou interpolation de Newton
1
1
1
, i i
i i
i i
y y
f x x
x x
2 1
1 2
2 1
,
y y
f x x
x x
3 2
2 3
3 2
,
y y
f x x
x x
4 3
3 4
4 3
,
y y
f x x
x x
15. Chapitre 3 : Approximation et interpolation polynomiale
3.2 Différences divisées ou interpolation de Newton
1 2 1
2 1
2
, ,
, , i i i i
i i i
i i
f x x f x x
f x x x
x x
1 2 0 1
2 0 1 2
2 0
, ,
, ,
f x x f x x
f x x x
x x
2 3 1 2
1 2 3
3 1
, ,
, ,
f x x f x x
f x x x
x x
3 4 2 3
2 3 4
4 2
, ,
, ,
f x x f x x
f x x x
x x
4 5 3 4
3 4 5
5 3
, ,
, ,
f x x f x x
f x x x
x x
16. Chapitre 3 : Approximation et interpolation polynomiale
3.2 Différences divisées ou interpolation de Newton
1
2
3 0
1
2
3 1
2
3
3
0
,
, ,
,
,
,
,
o
f
x
x
x
f
x
x
x
f
x
x
x
x
x
x
2 1 3 2 1
3 1 2 1
3
, , , ,
, , , i i i i i i
i i i
i i
f x x x f x x x
f x x x x
x x
2 3 4 1 2 3
1 2 3 4
4 1
, , , ,
, , ,
f x x x f x x x
f x x x x
x x
3 4 5 2 3 4
2 3 4 5
5 2
, , , ,
, , ,
f x x x f x x x
f x x x x
x x
4 5 6 3 4 5
3 4 5 6
6 3
, , , ,
, , ,
f x x x f x x x
f x x x x
x x
17. Chapitre 3 : Approximation et interpolation polynomiale
1 2 0 1 1
1
0
, ,..., , ,....,
, ,... k k
k o k
k
f x x x f x x x
f x x x
x x
3.2 Différences divisées ou interpolation de Newton
0 0 1 1 2 2
( ) ( ) ( ) ( ) ... ( )
n n
P x e x e x e x e x
0 0 1 0 0 1
( ) ( ) , ( ) 0, 1, 2 ( )( ) ...
P x f x f x x x x f x x x x x x x
18. Chapitre 3 : Approximation et interpolation polynomiale
3.2 Différences divisées ou interpolation de Newton
Tableau à remplir pour un polynôme de degré 𝑛 = 4
𝑖 𝑥𝑖 𝑦𝑖 𝑓[𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−3, 𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−4, 𝑥𝑖−3, 𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖]
0 𝑥0 𝑦0
1 𝑥1 𝑦1 𝑓[𝑥0, 𝑥1]
2 𝑥2 𝑦2 𝑓[𝑥1, 𝑥2] 𝑓[𝑥0, 𝑥1, 𝑥2]
3 𝑥3 𝑦3 𝑓[𝑥2, 𝑥3] 𝑓[𝑥1, 𝑥2, 𝑥3] 𝑓[𝑥3, 𝑥2, 𝑥1, 𝑥0]
4 𝑥4 𝑦4 𝑓[𝑥3, 𝑥4] 𝑓[𝑥2, 𝑥3, 𝑥4]
𝑓[𝑥1, 𝑥2, 𝑥3, 𝑥4]
𝑓[𝑥0, 𝑥1, 𝑥2, 𝑥3, 𝑥4]
0 0 1 0 0 1 2 0 1
0 1 2 3 0 1 2 0 1 2 3 4 0 1 2 3
( ) ( ) , ( ) , , ( )( )
, , , ( )( )( ) , , , , ( )( )( )( )
P x f x f x x x x f x x x x x x x
f x x x x x x x x x x f x x x x x x x x x x x x x
0 0 1 1 2 2 3 3 4 4
( ) ( ) ( ) ( ) ( ) ( )
P x e x e x e x e x e x
19. Chapitre 3 : Approximation et interpolation polynomiale
3.2 Différences divisées ou interpolation de Newton
Tableau à remplir
𝑖 𝑥𝑖 𝑦𝑖 𝑓[𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−3, 𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−4, 𝑥𝑖−3, 𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖]
0 -3 2
1 -1 0 -1
2 0 2 2 1
3 2 -1 -1,5 -1,167 -0,433
4 4 1 1 0,625 0,358 0,113
( ) 2 ( 3) ( 3)( 1) 0.433( 3)( 1)( ) 0.113( 3)( 1)( )( 2)
P x x x x x x x x x x x
20. Chapitre 3 : Approximation et interpolation polynomiale
Exemple 2 Approximation de cos 𝑥
Ici 𝑓 𝑥 = cos(𝑥) et
𝒙𝒊 0 𝝅 2𝝅
𝒚𝒊 1 -1 1
3.2 Différences divisées ou interpolation de Newton
𝑥0 = 0, 𝑥1 = 𝜋, 𝑥2 = 2𝜋
On calcule les 𝑦𝑖 tel que 𝑦𝑖 = 𝑓 𝑥𝑖 = cos(𝑥𝑖)
0 0 1 0 0 1
( ) ( ) , ( ) 0, 1, 2 ( )( )
P x f x f x x x x f x x x x x x x
On veut un polynôme de degré 𝑛 = 2
21. Chapitre 3 : Approximation et interpolation polynomiale
Exemple 2 Approximation de cos 𝑥
3.2 Différences divisées ou interpolation de Newton
𝑖 𝑥𝑖 𝑦𝑖 𝑓[𝑥𝑖−1, 𝑥𝑖] 𝑓[𝑥𝑖−2, 𝑥𝑖−1, 𝑥𝑖]
0 𝑥0 𝑦0
1 𝑥1 𝑦1 𝑓[𝑥0, 𝑥1]
2 𝑥2 𝑦2 𝑓[𝑥1, 𝑥2] 𝑓[𝑥0, 𝑥1, 𝑥2]
2
2 2
( ) 1 ( )( )
P x x x x
1 0
1
1 0
1 1 2
,
0
o
y y
f x x
x x
2 1
1 2
2 1
1 ( 1) 2
,
2
y y
f x x
x x
𝒙𝒊 0 𝝅 2𝝅
𝒚𝒊 1 -1 1
𝑦0 = 1
1 2 0 1
0 1 2 2
2 0
2 2
( )
, , 2
, ,
2 0
f x x f x x
f x x x
x x