ASI 3
Méthodes numériques pour l’ingénieur
Approximation de fonction :
la méthode des moindres carrés
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 -4
-3 -2 -1 0 1 2
Approximation/interpollation:
moindres carrés
carrés moindres
des
équationset inconnues( ) approximation au sens )
( min
)
(
ion approximat
tion interpolla
)
(
, : données
1
2 1
1 1
1 , 1
k
n
i i i
i k
j
ij j i
i
k j
j j
n i i
i
n n
y x
f y
x y
x f
n k
n x k
x f
y x
f(x)
xi yi
Posons le problème matriciellement
k n n j k
n j n
k i i j k
i j i
k k j j
k k j j
x f x
x x
x f x
x x
x f x
x x
x f x
x x
) 1 ( )
1 ( )
1 2 ( 1
) 1 ( )
1 ( )
1 2 ( 1
) 2 1 2( )
1 2( )
1 2( 2 1
) 1 1 1( )
1 1( )
1 1( 2 1
...
...
...
...
...
...
...
...
i i
i nk j
j x j x y
x
f 1,
1
1 pour , )
(
Posons le problème matriciellement
k n n j k
n j n
k i i j k
i j i
k k j j
k k j j
x f x
x x
x f x
x x
x f x
x x
x f x
x x
) 1 ( )
1 ( )
1 2 ( 1
) 1 ( )
1 ( )
1 2 ( 1
) 2 1 2( )
1 2( )
1 2( 2 1
) 1 1 1( )
1 1( )
1 1( 2 1
...
...
...
...
...
...
...
...
k n j n
n n
k i j i
i i
k j
k j
x f x
x x
x f x
x x
x f x
x x
x f x
x x
...
...
1
...
...
1
...
...
1
...
...
1
) 1 ( )
1 ( )
1 (
) 1 ( )
1 ( )
1 (
) 2 1 2( )
1 2( )
1 2(
) 1 1 1( )
1 1( )
1 1(
=
i i
i nk j
j j
y x
x x
f
, 1 1
1
, pour
)
(
Xa = f
Approximation au sens des moindres carrés
n i
ij i
k n
i
ij i
n i
ij i k
i j
j
n
i i
k j
ij j n
i i i
x y x
x x
y J x
k J j
J
y x
J J
y x
f
1
1
1 1
1 1
1
1 1
1
1
2
1
1 1
2
0 2
,..., 1
; 0
*) (
) ( argmin
* : principe
) ( avec
) ( min )
( min
Système linéaire de k équations et k inconnues
Approximation : version matricielle
X y
J
X X
X yX J
y X
e J
y y y
x x
x x
x x
e e e
y X
e
y x
y x
f e
y x
J J
y x
f
n i
k j ik
i
ik i
k
n i
i k
j
ij j i
i i
n
i i
k j
ij j n
i i i
' '
0 )
( ' '
2 )
( '
) (
1 1 1
) (
) ( avec
) ( min )
( min
2 2
1 1
1 1 1 1 1 1
0
1
2
0 1
2
Système linéaire de k équations et k inconnues Erreur
d’approximation
Approximation : version matricielle
X y
J
X X
X yX J
y X
e J
y y y
x x
x x
x x
e e e
y X
e
y x
y x
f e
y x
J J
y x
f
n i
k j ik
i
ik i
k
n i
i k
j
ij j i
i i
n
i i
k j
ij j n
i i i
' '
0 )
( ' '
2 )
( '
) (
1 1 1
) (
) ( avec
) ( min )
( min
2 2
1 1
1 1 1 1 1 1
0
1
2
0 1
2
Système linéaire de k équations et k inconnues Erreur
d’approximation Matrice de Vandermonde
(1735-1796)
Un problème de base
m n n j m
n j n
m i i j m
i j i
m m j j
m m j j
y x
a x
a x
a a
y x
a x
a x
a a
y x
a x
a x
a a
y x
a x
a x
a a
) ( )
( )
1 1 ( 0
) ( )
( )
1 1 ( 0
) 2 2( )
2( )
1 2( 1 0
) 1 1( )
1( )
1 1( 1 0
...
...
...
...
...
...
...
...
n équations et m+1 inconnues
Xa=y
Une nouvelle expérience
(individu)
Une nouvelle variable explicative
Que se passe t’il si… ?
• On dispose d’un nouvel individu
• on dispose d’une nouvelle variable
• m=n
• m<n
• m>m
• on recopie deux individus
• on duplique une variable
X y
a
=
x1
x 2
solution unique
x1
x 2
pas de solution
Illustration : système de 2 équations à 2 inconnues
2 2
22 1
21
1 2
12 1
11
b x
a x
a
b x
a x
a – une solution unique
– pas de solution
– une infinité de solution
– solution « triviale » : x1= x2 = 0