0% ont trouvé ce document utile (0 vote)
175 vues6 pages

CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1

Ce document contient les corrigés d'un exercice d'analyse numérique sur l'interpolation et l'approximation polynômiale. Il présente le calcul du polynôme d'interpolation de Lagrange et de Newton ainsi que l'estimation de l'erreur d'approximation.

Transféré par

eviliev
Copyright
© © All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
175 vues6 pages

CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1

Ce document contient les corrigés d'un exercice d'analyse numérique sur l'interpolation et l'approximation polynômiale. Il présente le calcul du polynôme d'interpolation de Lagrange et de Newton ainsi que l'estimation de l'erreur d'approximation.

Transféré par

eviliev
Copyright
© © All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

ENSTP 2 eme

année Module: Analyse Numérique 2. Série: N um 1:

Corrigé série interpolation et approximation polynômiale

Exercice 1:

Soit f une fonction donnée aux points x0; x1 ; x2; x3 distincts 2 à 2.


1. Soit R(x) = (x x3 )P (x) (x x0 )Q(x)
(x0 x3 ) . Montrons que R est le polynôme d’interpolation
de f aux points x0; x1 ; x2 ; x3 :

P le polynôme d’interpolation de f aux points x0; x1 ; x2 =) P (xi ) = f (xi ); 8i 2 f0; 1; 2g

Q le polynôme d’interpolation de f aux points x1; x2 ; x3 =) Q(xi ) = f (xi ); 8i 2 f1; 2; 3g

Le deg de R est 3 car le deg de P et Q sont 2 et (x0 x3 ) est une constante.


Et on montre que R(xi ) = f (xi ); 8i 2 f0; 1; 2; 3g :

(x0 x3 )P (x0 ) (x0 x0 )Q(x0 )


R(x0 ) = (x0 x3 ) = P (x0 ) = f (x0 )

R(x1 ) = (x1 x3 )P (x1 ) (x1 x0 )Q(x1 )


(x0 x3 ) = (x0 x3 )P (x1 )
(x0 x3 ) = P (x1 ) = f (x1 ) car P (x1 ) = Q(x1 ) = f (x1 )

R(x2 ) = (x2 x3 )P (x2 ) (x2 x0 )Q(x2 )


(x0 x3 ) = (x0 x3 )P (x2 )
(x0 x3 ) = P (x2 ) = f (x2 ) car P (x2 ) = Q(x2 ) = f (x2 )

(x3 x3 )P (x3 ) (x3 x0 )Q(x3 )


R(x3 ) = (x0 x3 ) = Q(x3 ) = f (x3 ):

2. Soit le tableau i 0 1 2 3 .
1 2
xi 0 3 3 1
1 1 3
f (xi ) 3 2 1 2
Supposons que f (k)
(x) 1; 8x 2 [0; 1] ; 8k 1; P; Q; R dé…nis par 1.)
a. Calculons P sous la forme de Lagrange :
1 2 2 1
(x 3 )(x 3) (x 0)(x 3) (x 0)(x 3)
P (x) = f (0) (0 1 2 + f ( 13 ) ( 1 1 2 + f ( 23 ) ( 2 2 1
3 )(0 3) 3 0)( 3 3) 3 0)( 3 3)

1 2 2 1
1 (x 3 )(x 3) 1 (x 0)(x 3) (x 0)(x 3)
= 3 (0 1 2 + 2 ( 13 0)( 13 2 + 1(2 2 1 =) P (x) = 32 x2 + 1
3
3 )(0 3) 3) 3 0)( 3 3)

Pour Q sous la forme de Newton soit, la table des di¤érences divisées :


2 3
xi f (xi )
61 1 7
6 32 2 7 Alors Q (x) = 1
+ 3
x 1
= 32 x:
4 1 3 5 2 2 3
3 2
3 3
1 2 2 0

b. R en fonction de P et Q: R(x) = (x x3 )P (x) (x x0 )Q(x)


(x0 x3 ) = xQ (x) (x 1)P (x)

On trouve aussi R(x) = 3 3


2x + 3x2 1
3x + 13 :
c. Une majoration de l’erreur "(x) = f (x) R (x) dans [0; 1]:
(4)
"(x) = f (x) R (x) = (x x0 ) (x x1 ) (x x2 ) (x x3 ) f (c)
4! ; c 2 ]0; 1[

(4)
= (x 0) x 1
3 x 2
3 (x 1) f (c)
4! ; c 2 ]0; 1[

L’erreur "(x) est majorée par j"(x)j x x 1


3 x 2
3 (x 1) 1
4!

car f (4) (x) 1; 8x 2 [0; 1]:

d. Calculons R( 21 ) ainsi qu’un majorant de l’erreur "( 12 ):

1 3 1 2
R( 12 ) = 3
2 2 +3 2
1
3
1
2 + 1
3 = 35
48 = 0:72

"( 12 ) 1
2
1
2
1
3
1
2
2
3
1
2 1 1 1
4! = 3456 = 2: 89 10 4

Exercice 2:

Soit f une fonction dont les dérivées de tout ordre sont majorées
par une constante M . Soit le tableau : xi 2 1 0 1 2
f (xi) 1 0 4 3 2
1. Le tableau des di¤érences divisées de f.
2 3
xi f (xi ) f [xi 1 ; xi ] f xi 1 ; xi ; xi+1 ]
6 2 1 7
6 7
6 1 0 1 7
6 7
60 4 4 5 7
6 2 7
41 3 1 5 5 5
2 3
5 5
2 2 1 0 6 8

2. Le polynôme d’interpolation de Newton (suivant les puissances croissantes).


P4 (x) = 1 (x + 2) + 52 (x + 2) (x + 1) 5
3 (x + 2) (x + 1) x + 58 (x + 2) (x + 1) x (x 1)

23 25 2 5 3
P4 (x) = 4 + 12 x 8 x 12 x + 58 x4

3. L’expression de l’erreur d’interpolation E(x).


(5)
E(x) = f (x) P (x) = (x x0 ) (x x1 ) (x x2 ) (x x3 ) (x x4 ) f (c)
5! ; c 2 ] 2; 2[

f (5) (c)
E(x)= x x2 1 x2 4 5! ; c 2 ] 2; 2[

jE(x)j x x2 1 x2 4 M
5! car f (5) (x) M; 8x 2 ] 2; 2[ :
Exercice 3 :

Soit f une fonction de classe 1


([ 1; 1]) et P le polynôme
interpolateur d’Hermite (de degré 3) de f véri…ant
P ( 1) = f ( 1); P 0 ( 1) = f 0 ( 1); P (1) = f (1); P 0 (1) = f 0 (1):

On a deux points d’interpolation (n = 1) ; on cherche alors un polynôme de R3 [x] :

On a deux méthodes :
Pour calculer le polynôme interpolateur d’Hermite :

Première méthode : le polynôme interpolateur d’Hermite s’écrit :


( )
P
n Q
n
(x xj )2 P
n
1
P (x) = [yi (1 2 (x xi ) Ci ) + y 0 i (x xi )] (xi xj )2 ; Ci = xi xj
i=0 j=0; j6=i j=0; j6=i

Pour n = 1; on a alors :
h i
1 (x x1 )2 (x x1 )2
P (x) = y0 1 2 (x x0 ) x0 x1 (x0 x1 )2 + y 0 0 (x x0 ) (x 0 x1 )2

h i
1 (x x0 )2 (x x0 )2
+y1 1 2 (x x1 ) x1 x0 (x1 x0 )2 + y 0 1 (x x1 ) (x 1 x0 )2

Dans notre cas x0 = 1; x1 = 1; y0 = f ( 1); y1 = f (1); y00 = f 0 ( 1); y10 = f 0 (1) donc
h i
1 2 2 2 2
P (x) = 4 f ( 1) (x + 2) (x 1) + f 0 ( 1) (x + 1) (x 1) + f (1) (2 x) (x + 1) + f 0 (1) (x 1) (x + 1)

2f ( 1)+f 0 ( 1)+2f (1) f 0 (1) 3f (1) 3f ( 1) f 0 ( 1) f 0 (1) f 0 (1) f 0 ( 1) 2 f ( 1)+f 0 ( 1) f (1)+f 0 (1) 3
P (x) = 4 + 4 x + 4 x + 4 x

Le polynôme interpolateur d’Hermite est donc le polynôme P (x) = + x + x2 + x3

2f ( 1)+f 0 ( 1)+2f (1) f 0 (1) 3f (1) 3f ( 1) f 0 ( 1) f 0 (1) f 0 (1) f 0 ( 1) f ( 1)+f 0 ( 1) f (1)+f 0 (1)
avec = 4 ; = 4 ; = 4 ; = 4 :

Deuxième méthode : le polynôme interpolateur d’Hermite est un polynôme de degré


2n + 1. On cherche donc un polynôme P (x) = + x + x2 + x3

tel que P ( 1) = f ( 1); P 0 ( 1) = f 0 ( 1); P (1) = f (1); P 0 (1) = f 0 (1):

8 9
>
> + = f ( 1) >
>
< =
+ + + = f (1)
C’est à dire tel que > 2 + 3 = f 0 ( 1) >
>
: >
;
+ 2 + 3 = f 0 (1)

2f ( 1)+f 0 ( 1)+2f (1) f 0 (1) 3f (1) 3f ( 1) f 0 ( 1) f 0 (1) f 0 (1) f 0 ( 1) f ( 1)+f 0 ( 1) f (1)+f 0 (1)
Ainsi = 4 ; = 4 ; = 4 ; = 4 :
Exercice 4 2 3
xi yi
60 1:17
6 7
60:5 1:57
À partir des données 6 7
61 1:97
6 7
41:5 2:45
2 2:9

On calcul la droite et la parabole de régression et on compare les erreurs de chaque


régression.
2 3
6 P
5 P
5 7
2 6
3 xi = 5 x3i = 12; 5 7
6 7
xi yi x2i xi yi x2i yi x3i x4i 6 i=1 i=1 7
60 7 6 P 2
5 P5 2 7
6 1:1 0 1:1 0 0 0 7 6 7
60:5 1:5 7 6 xi = 7; 5 xi = 25 7
6 0:25 0:75 0:375 0:125 0:062 5 7 6 i=1 i=1 7
61 7, 6 7
6 1:9 1 1:9 1:9 1 1 7 6 P
5 P5 7
41:5 2:4 6 yi = 9: 8 xi yi = 13: 157
2: 25 3: 6 5: 4 3: 375 5: 062 55 6 7
6 i=1 i=1 7
2 2:9 4 5: 8 11: 6 8 16 6 P5 P
5 7
6 x2i yi x4i = 22: 125 7
4 i=1 i=1
5

g(x) = ax + b; avec :
8 P
n P
n P
n
9
>
> n xi yi xi yi >
>
>
> a= i=1 i=1 i=1
= 5(13: 15) (5)(9: 8)
= 1: 34 >
>
>
> P
n P
n 2 5(7:5) 25 >
>
>
> n x2i xi >
>
< i=1 i=1 =
> >
, ici n=5
>
> P
n P
n
x2i
P
n P
n
>
>
>
> yi xi xi yi >
>
>
> b= i=1 i=1 i=1 i=1
= (9: 8)(7:5) (5)(13: 15)
= 0:62 >
>
>
: P
n Pn 2 5(7:5) 25 >
;
n x2i xi
i=1 i=1

Alors : g(x) = 1: 34x + [Link]

P
5 P
5
L’erreur de cette régression est la quantité : [yi
2
(axi + b)] = [yi
2
(1: 34xi + 0:62)]
i=1 i=1

2 2 2
= [1:1 (1: 34 (0) + 0:62)] + [1:5 (1: 34 (0:5) + 0:62)] + [1:9 (1: 34 (1) + 0:62)]

2 2
+ [2:4 (1: 34 (1:5) + 0:62)] + [2: (1: 34 (2) + 0:62)] = 2: 021

Et la parabole de régression à équation g(x) = a0+ a1 x + a2 x2 ; avec :


a0 ; a1 ; a2 sont solutions du système :
2 3
2 P 3 2 3 2 3
P
n P
n n P
5 P
5 P
5
n xi x2i y 6 5 xi x2i 7 2
3 6 i=1 yi 7
6 i=1 i=1 7 2 3 6 i=1 i 7 6 i=1 i=1 7 a0 6 7
6P n Pn P 37
n 7 a0 6 Pn 7 6P 5 P5 P5 7 6P 5 7
6 6 7
xi yi 7 () 6 3 7 4a 5 6
6 xi x2i 4 5
xi 7 a1 = 6 6 xi x2i xi 7 1 = 6 xi yi 7
7
6 i=1 i=1 i=1 7 6 i=1 7 6 i=1 i=1 i=1 7 a2 6 i=1 7
4P n Pn P 4
n 5 a2 4 P 2
n 5 4P 5 4P 5
5 P5 P5 5
x2i x3i xi xi yi x2i x3i 4
xi 2
xi yi
i=1 i=1 i=1 i=1 i=1 i=1 i=1 i=1

2 32 3 2 3 2 3 2 3
5 5 7:5 a0 9: 8 a0 0:594 29
() 4 5 7:5 12:5 5 4a1 5 = 4 13: 15 5, la solution est :4a1 5 = 4 6: 197 1 5
7:5 12:5 22: 125 a2 19: 275 a2 2: 428 6

Alors la parabole de régression est g(x) = 0:594 29 + 6: 197 1x 2: 428 6x2


L’erreur de cette régression est la quantité :
P
5 2 P
5 2
yi a0+ a1 xi + a2 x2i = yi 0:594 29 + 6: 197 1xi 2: 428 6x2i
i=1 i=1

h i2 h i2
2 2
= 1:1 0:594 29 + 6: 197 1 (0) 2: 428 6 (0) + 1:5 0:594 29 + 6: 197 1 (0:5) 2: 428 6 (0:5) +

h i2 h i2
2 2
1:9 0:594 29 + 6: 197 1 (1) 2: 428 6 (1) + 2:4 0:594 29 + 6: 197 1 (1:5) 2: 428 6 (1:5) +

h i2
2
2:9 0:594 29 + 6: 197 1 (2) 2: 428 6 (2) = 6: 015 9

Exercice 5

1. Le polynôme de Lagrange P qui interpole les trois points ( 1; e); (0; 1) et (1; e):

P (x) = e x(x2 1)
(x + 1) (x 1) + e (x+1)x
2 = (e 1) x2 + 1:

2. L’expression du polynôme de Lagrange Q qui interpole les trois points ( 1; 1); (0; 0) et (1;

Il su¢ t de changer les coe¢ cients yi dans l’expression de 1):


x(x 1) (x+1)x
Q (x) = 2 2 = x2 :

3. Le polynôme de l’espace vectoriel V ec f1; x; x2 g qui interpole les trois points


( 1; 1); (0; 0) et (1; 1): On cherche un polynôme P (x) qui soit combinaison

linéaire des trois polynômes assignés et qui interpole les trois points.
Soit P (x) = + x + x2 ; alors on a :
8 9 8 9 2 3 3 2
< P ( 1) = 1 = < + = 1 = 0
=) P (0) = 0 =) =0 =) 4 5 = 4 0 5 =) P (x) = x2 :
: ; : ;
P (1) = 1 + + = 1 1

Exercice 6

On s’interesse à la spline cubique S3 (x) passant par les points


xi 0 1 2 3
yi 2 2 2 2
et satisfaisant les conditions additionnelles

S300 (0) = 1 et S300 (3) = 1


2 3
x0 x1 x2 x3
6 0 1 2 3 7
1) Pour l’équation de S3; 0 (x) ; on a 6 7;
4 y0 y1 y2 y3 5
m0 m1 m2 m3

on sait que hi = 1 8i 2 f1; 2; 3; 4g et les conditions additionnelles =) m0 = 1 et m3 = 1:

En remplaçant dans le système vu en cours, on a :


8 9 8 9
>
> m0 = 1 >
> >
> m0 = 1 >
>
>
> >
> >
> >
>
>
> >
> >
> >
>
>
> > > >
< m0 + 4m1 + m2 = 6 [ 2 2:2 + ( 2)] = 6 [ 8] = 48 >
= >
< m1 = 815
>
=
=)
>
> >
> >
> >
>
>
> m1 + 4m2 + m3 = 6 [2 2:( 2) + 2] = 6 [8] = 48 >
> >
> m2 = 79
5 >
>
>
> >
> >
> >
>
>
> >
> >
> >
>
: ; : ;
m3 = 1 m3 = 1

Pour trouver la spline S3; 0 (x) on remplace dans la formule du cours (i = 0)

On trouve : S3; 0 (x) = 86 3


30 x + 15 2
30 x + 191
30 x
60
30 :

2) S30 (0; 5) = 4; 71 et S300 (2) = m2 = 79


5 :

Exercice 7
On désigne par S(x) la spline cubique qui interpole f (x) = x2
aux noeuds x0 = 1; x1 = 0; x2 = 1; et qui satisfait les conditions aux bords
(spline libre). S 00 ( 1) = 0, S 00 (1) = 0 sur chaque sous intervalle [xi ; xi+1 ] ; i = 0; 1:
On écrit cette spline sous la forme S(x) = Si (x) = ai + bi (x xi ) + ci (x
2
xi ) + di (x
3
xi ) :

1) Pour a1 : a1 = S1 (1) = f (x1 ) = f (0) = 0:

2) Pour c0 : S0 (x) = a0 + b0 (x x0 ) + c0 (x
2
x0 ) + d0 (x
3
x0 ) :

2
S00 (x) = b0 + 2c0 (x + 1) + 3d20 (x + 1) :

S000 ( 1)
S000 (x) = 2c0 + 6d0 (x + 1) =) c0 = 2 = 0:
8 3
9
3 1
< S0 (x) = 1 2 (x + 1) + 2 (x + 1) : =
3) L’étudiant X a trouvé : ;
S1 (x) = 32 x2 129
8 x3
< S0 (x) = x: =
tandis que l’étudiant Y a trouvé : ;
S1 (x) = x

Pour l’étudiant Y, S00 (0) = 1 6= S10 (0) = 1; alors la dérivée de la spline Y est
discontinue en 0.
Pour l’étudiant X, toutes les conditions sont véri…ées : on a :

f (0) = 0; f ( 1) = 1; f (1) = 1:
2 3 3
S0 (x) = 1 23 (x + 1) + 12 (x + 1) S0 ( 1) = 1; S0 (0) = 0 = S1 (0) = 0 S1 (x) = 32 x2 1 3
2x
4 S 0 (x) = 3 + 3 (x + 1)
2
S0 ( 1) = 32 ; S00 (0) = 0 = S10 (0) = 0
0
S10 (x) = 3x 3 2 5
0 2 2 2x
3
S000 (x) = 3 (x + 1) S000 ( 1) = 0; S000 (0) = 3 = S100 (0) = 3 S100 (x) = 3 2x

Alors l’étudiant X a trouvé la bonne spline.


On peut utiliser la méthode du cours pour retrouver par calcul les splines de X,
S 00 ( 1) = m0 = 0
on trouve m1 = 3 :
S 00 (1) = m2 = 0

Vous aimerez peut-être aussi