Académique Documents
Professionnel Documents
Culture Documents
ch2 - AA2 - Approximation Au Sens Des Moindres Carrés
ch2 - AA2 - Approximation Au Sens Des Moindres Carrés
APPROXIMATION
Introduction
Historique:
1804: Carl Friedrich Gauss
1805: Adrien-Marie Legendre
1808: Robert Adrain
Introduction
Historique:
1804: Carl Friedrich Gauss
1805: Adrien-Marie Legendre
1808: Robert Adrain
Illustration de la méthode
e0 = P (x0 ) − y0 = λ0 + λ1 x0 − y0
..
.
(S1 ) ei = P (xi ) − yi = λ0 + λ1 xi − yi
.e ..
.
n = P (xn ) − yn = λ0 + λ1 xn − yn
résidu
(ou perturbation)
en (xi , yi )
Illustration de la méthode
e0 = P (x0 ) − y0 = λ0 + λ1 x0 − y0
..
.
(S1 ) ei = P (xi ) − yi = λ0 + λ1 xi − yi
.e ..
.
n = P (xn ) − yn = λ0 + λ1 xn − yn
résidu
(ou perturbation)
en (xi , yi )
Ajuster les points (xi , yi ) par une droite au sens des moindres carrés revient à
minimiser la fonction
F.
y
n
X n
X n
X n
X
xi yi xi y i x2i
i=0 i=0 i=0 i=0
avec X = , Y = , XY = et X2 = .
n+1 n+1 n+1 n+1
Exercice
xi x0 = −1 x1 = 0 x2 = 1
yi y0 = 2 y1 = 1 y2 = −1
Trouver l’équation de la droite qui ajuste au mieux les points (x0 , y0 ), (x1 , y1 ) et
(x2 , y2 ) au sens des moindres carrés.
Solution
1 x2 1 1
Solution
1 x2 1 1
On a
1 −1
t 1 1 1 3 0
AA = 1 0 =
−1 0 1 0 2
1 1
1
0
Comme (t A A)−1 = 3 , alors
1
0 2
λ0
Λ = = (t A A)−1 t A Y
λ1
1
2
0 1 1 1
= 3
1
0 12 −1 0 1
−1
1 1 1
2
= 3 3 3
1 1
1
−2 0 2
−1
2
= 3 .
− 23
Par conséquent,
2 3
P (x) = − x.
3 2
D’où le résultat.
Equipe AN Analyse numérique ESPRIT
13
e0 = P (x0 ) − y0 = λ0 + λ1 x0 + · · · + λp xp0 − y0
..
.
(Sp ) ei = P (xi ) − yi = λ0 + λ1 xi + · · · + λp xpI − yi
..
.
en = P (xn ) − yn = λ0 + λ1 xn + · · · + λp xpn − yn
e0 = P (x0 ) − y0 = λ0 + λ1 x0 + · · · + λp xp0 − y0
..
.
(Sp ) ei = P (xi ) − yi = λ0 + λ1 xi + · · · + λp xpI − yi
..
.
en = P (xn ) − yn = λ0 + λ1 xn + · · · + λp xpn − yn
Le système (Sp ) peut s’écrire matriciellement comme suit:
2 p
e0 1 x0 x0 · · · x0 λ0 y0
. . . . .
.. .. .. .. ..
ei = 1 xi x2 · · · xp λi − yi
i i
. . . . .
.. .. .. .. ..
2 p
en 1 xn xn · · · xn λp yn
| {z } | {z }| {z } | {z }
ε A Λ Y
En appliquant le même raisonnement de l’approximation linéaire, on aura
Λ = (t A A)−1 t A Y
Equipe AN Analyse numérique ESPRIT
15
Exercice
Solution
Solution
Par conséquent,
3 1
P (x) = 1 − x − x2 .
2 2