Vous êtes sur la page 1sur 6

Corrigé de la fiche de TD 5

Exercise 1 1. Le polynôme d’interpolation de Lagrange P s’appuyant sur


les points (−1, e), (0, 1) et (1, e) est un polynôme de degré 6 2 qui est
donné par:
2
X
P (x) = yi Li (x)
i=0
= eL0 (x) + L1 (x) + eL2 (x)
où
(x − 0) (x − 1) (x) (x − 1)
L0 (x) = = ,
(−1 − 0) (−1 − 1) 2
(x + 1) (x − 1) (x + 1) (x − 1)
L1 (x) = = ,
(0 + 1) (0 − 1) −1
(x + 1) (x − 0) x (x + 1)
L2 (x) = = .
(1 + 1) (1 − 0) 2
sont les polynômes de base de Lagrange.
2. Comme les points xi sont les mêmes alors les Li (x) ne changent pas donc
Q(x) = −1L0 (x) + 0L1 (x) − L2 (x).
Exercise 2 1. Le polynôme de Lagrange P qui interpole les trois points est
un polynôme de degré inférieur ou égal à 2 qui est donné par la formule:
2
X
P (x) = yi Li (x)
i=0
= αL0 (x) + βL1 (x) + αL2 (x)
où
(x − 0) (x − 1) (x) (x − 1)
L0 (x) = = ,
(−1 − 0) (−1 − 1) 2
(x + 1) (x − 1) (x + 1) (x − 1)
L1 (x) = = ,
(0 + 1) (0 − 1) −1
(x + 1) (x − 0) x (x + 1)
L2 (x) = = .
(1 + 1) (1 − 0) 2
donc
= αx2 − b x2 − 1 ,

p(x)
= (α − β) x2 + β.
2. Si α = β alors deg P = 0.
3. Montrons que P est pair c’est à dire (P (−x) = P (x)) .
on a
2
P (−x) = (α − β) (−x) + β
= (α − β) x2 + β
1
= P (x)
P ne peut pas être de degré 1 car:
siα = β, deg P = 0
siα 6= β, deg P = 2.
Exercise 3 1. Les polynômes de Lagrange Li qui interpolent les points
−2, −1, 1, 2 sont:
(x + 1) (x − 1) (x − 2)
L0 (x) =
(−2 + 1) (−2 − 1) (−2 − 2)
(x + 1) (x − 1) (x − 2)
=
2. Le polynôme d’interpolation de Lagrange P qui est de degré 6 3 est :
3
X
P (x) = f (xi )Li (x)
i=0
= f (x0 )L0 (x) + f (x1 )L1 (x) + f (x2 )L2 (x) + f (x3 )L3 (x),
• Calculons L3 (x) − L1 (x) puis L3 (x) − L1 (x).

On a:
1 3
L3 (x) − L0 (x) = (x − x)
6
et
−1 3
(x − 4x)
L2 (x) − L1 (x) =
3
• Puisque f est une fonction impaire alors f (−2) = f (2)etf (−1) =
f (1), donc
3
X
P (x) = f (xi )Li (x)
i=0
= f (−2)L0 (x) + f (−1)L1 (x) + f (1)L2 (x) + f (2)L3 (x)
= −f (2)L0 (x) − f (1)L1 (x) + f (1)L2 (x) + f (2)L3 (x)
= (L2 (x) − L1 (x))f (1) + (L3 (x) − L0 (x))f (2)
= R (x) f (1) + S(x)f (2)
−1 f (2) 3
= f (1)(x3 − 4x) + (x − x)
3 6
• Pour f (x) = sin π2 x , donnons une approximation de f ( 14 ):


on a f (1) = 1 et f (2) = 0 alors


−1 3
P (x) = (x − 4x)
3

• L’erreur absolue commise est f ( 41 ) − P ( 14 )
on a f ( 14 ) = sin( π8 ) = 0.054 1 1
etπP ( 4 ) = 1 alors l’erreur absolue E( 4 ) est:
1 1 1
E( 4 ) = f ( 4 ) − P ( 4 ) = sin( 8 ) − 1 = 0.94.

Remarque:

• l’erreur théorique est donnée par la formule suivante:


(4)
f (x)
E(x) = |f (x) − P (x)| 6 |(x + 2)(x + 1)(x − 1)(x − 2)| .
4!

On a f (4) (x) = ( π2 )4 sin( π2 x). alors f (4) (x) 6 ( π2 )4 . D’où

1 π 4
E(x) 6 ( ) |(x + 2)(x + 1)(x − 1)(x − 2)| .

4! 2

2
1
Donc pour x = 4 on aura

1 1 π 4 1 1 1 1
E( ) 6 ( ) ( + 2)( + 1)( − 1)( − 2) ,
4 4! 2 4 4 4 4

c’est à dire E( 41 ) 6 0.93.

Exercise 4 1. Le polynôme d’interpolation de Newton de degré inférieur ou


égal à 3 est donné par:

P (x) = y0 +(x−x0 )δ(x0 , x1 )+(x−x0 )(x−x1 )δ(x0 , x1 , x2 )+(x−x0 )(x−x1 )(x−x2 )δ(x0 , x1 , x2 , x3 ).

Construisons maintenant la table de différences divisées:

xi f (xi ) δ(xi , xi+1 ) δ(xi , xi+1 , xi+2 ) δ(xi , xi+1 , xi+2 , xi+3 )
0 1&
δ(x0 , x1 ) = 4 &
1
2 3% δ(x0 , x1 , x2 ) = 6 &
& δ(x1 , x2 )10 % δ(x0 , x1 , x2 , x3 ) = 0
1 8% & δ(x1 , x2 , x3 ) = 6 %
& δ(x2 , x3 ) = 16 %
3
2 %
On remplace dans la formule précédente, on trouve

P3 (x) = 6x2 + x + 1.

C’est à dire f (x) ' P3 (x) = 6x2 + x + 1.


2. On a g(x) = xf (x)+x2 , en remplaçant f (x) par son polynôme d’interpolation,
on aura
g(x) ≈ xP3 (x) + x2 ,
alors
g(x) ≈ x(6x2 + x + 1) + x2 ,
finalement le polynôme d’ interpolation de g est:

g(x) ≈ 6x3 + 2x2 + x.

Exercise 5 1. La table de différences divisées pour les points (0, 1), (1, 2), (2, 9)
et (3, 28) est :

xi f (xi ) f [xi , xi+1 ] f [xi , xi+1 , xi+2 ] f [xi , xi+1 , xi+2 , xi+3 ]
0 1&
1&
1 2% 3&
.
& 7% 1
2 9% & 6%
& 19 %
3 28 %

3
Le polynôme d’interpolation suivant la base de newton associé aux points
(0, 1), (1, 2), (2, 9) et (3, 28) est :

P3 (x) = 1 + 1(x − 0) + 3(x − 0)(x − 1) + 1(x − 0)(x − 1)(x − 2) = x3 + 1.

2. Si on souhaite ajouter un point d’interpolation et calculer un polynôme


de degré 4, il n’est pas nécessaire de tout recommencer. Par exemple, si
l’on veut inclure le point (5, 54), on peut compléter la table de différences
divisées déjà utilisée comme suit

xi f (xi ) f [xi , xi+1 ] f [xi , ..., xi+2 ] f [xi , ..., xi+3 ] f [xi , ..., xi+4 ]
0 1&
1&
1 2% 3&
& 7% 1&
.
2 9% & 6% − 35
& 19 % & −2 %
3 28 % & −2 %
& 13 %
5 54 %

Ce polynôme de degré 4 est alors


P4 (x) = P3 (x) − − 53 (x − 0)(x − 1)(x − 2)(x − 3)
qui est tout simplement le polynôme de degré 3 déjà calculé auquel on a
ajouté une correction de degré 4.

Exercise 6 1. On a f (x) = sinx, xi = i π2 , f (xi ) = yi , i = 0, 1, 2.


On note le polynôme de Lagrange de degé 6 2 par PL (x)
2
X
PL (x) = yi Li (x)
i=0
= y0 L0 (x) + y1 L1 (x) + y2 L2 (x)

avec
2 π
L0 (x) = 2
(x − π) (x − ),
π 2
−4
L1 (x) = x (x − π) ,
π2
(x + 1) (x − 0) 4 π
L2 (x) = = 2 x(x − ).
(1 + 1) (1 − 0) π 2
donc

PL (x) = 0L0 (x) + L1 (x) + 0L2 (x)


−4
= x (x − π) .
π2

4
2. On note par PN (x) le polynôme d’interpolation de Newton de degré in-
ferieur ou égal à 2 qui est donné par

P (x) = y0 + (x − x0 )δ(x0 , x1 ) + (x − x0 )(x − x1 )δ(x0 , x1 , x2 )..

La table de différences divisées est comme suit:

xi yi δ(xi , xi+1 ) δ(xi , xi+1 , xi+2 )


0 0& δ(x0 , x1 ) = 2
&
π
π 1%
δ(x0 , x1 , x2 ) = − π42 ,
2 &
π 0% δ(x1 , x2 ) = − π2 %

alors
−4
PN (x) = x (x − π) = PL (x).
π2
3. Le polynôme d’interpolation de Hermite PH (x)est de degré inferieur ou
égal à 2n + 1(deg PH = 5) qui est donné par:
2
X 2
X
PH (x) = hi (x) f (xi ) + ki (x) f 0 (xi ).
i=0 i=0

on a f (x) = sin x donc f 0 (x) = cos x alors f 0 (0) = 1, f 0 ( π2 ) = 0, et


f 0 (π) = 1.Avec f (x0 ) = y0 = 0, f (x1 ) = y1 = 1, f (x2 ) = y2 = 0, on
remplace et on trouve

PH (x) = h1 (x) f (x1 ) + k0 (x) f 0 (x0 ) + k1 (x) f 0 (x1 ) + k2 (x) f 0 (x2 ),

d’où
PH (x) = h1 (x) + k0 (x) + k2 (x) .
On a k0 (x) = (x − x0 )L20 (x) = xL20 (x),
k2 (x) = (x − x2 )L22 (x) = (x − π) L22 (x),
h i
(1)
h1 (x) = 1 − 2(x − x1 )L1 (x1 ) L21 (x).
(1) −4
0 −8 4
Or L1 (x) = Ĺ1 (x) = π 2 x(x − π) = π2 x + π

et donc Ĺ1 (x1 ) = Ĺ1 ( π2 ) = 0 d’où h1 (x) = L21 (x).


Finalement

PH (x) = h1 (x) + k0 (x) + k2 (x)


= L21 (x) + xL20 (x) + (x − π) L22 (x).

4. On a

5

π 2
f( ) = ' 0.707
4 2
PL (x) ' 0.75 = PN (x)
PH (x) ' 0.622
π
donc f ( 4 ) − PL (x) = 0.043.

Et f ( π4 ) − PH (x) = 0.085
5. L’erreur pour la méthode de Lagrange et de Newton est:
1 π
|E(x)| 6 max f (3) (ξ) |x − 0| x − |x − π| ,

3! 2

or f (3) (x) = − cos x donc max f (3) (x) 6 1, on obtient alors
06x6π

1 π
|E(x)| 6 |x| x − |x − π| , avecx ∈ [0, π] ,

3! 2

Remarque: Pour x ∈ [a, b] , on a |x − x0 | |x − x1 | |x − x2 | ... |x − xn | 6


n+1
(b − a) ,donc

1 π
|E(x)| 6 |x| x − |x − π|

3! 2
1 3
6 (π) ,
3!
3
et donc E( π4 ) 6 3!
1
(π) ' 5.17, que l’on peut améliorer par des majora-
tions plus fine:
E( ) 6 1 π π − π π − π 6 π3 ' 0.24.
π
4 3! 4 4 2 4 128
Et l’erreur pour la méthode de Hermite est donnée par:
1
2 2 2
|E(x)| 6 max f (2n+2) (ξ) |x − x0 | |x − x1 | |x − xn | ,

(2n + 2)!
dans ce cas n = 2,en remplaçant on aura alors
1
2 π 2 2
|E(x)| 6 |x| x − |x − π|
6! 2
1 6
6 (π) ' 1.33,
6!

et donc E( π4 ) 6 1.33,que l’on peut améliorer:
E( ) 6 1 π 2 π − π 2 π − π 2 6 π6 ' 0.00293.
π
4 6! 4 4 2 4 2946120

Vous aimerez peut-être aussi