CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1
CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1
Exercice 1:
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)
(4)
= (x 0) x 1
3 x 2
3 (x 1) f (c)
4! ; c 2 ]0; 1[
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
23 25 2 5 3
P4 (x) = 4 + 12 x 8 x 12 x + 58 x4
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 :
On a deux méthodes :
Pour calculer le polynôme interpolateur d’Hermite :
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
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 :
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
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
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
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
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;
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
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 ) :
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