Académique Documents
Professionnel Documents
Culture Documents
Position du problme
f : fonction dfinie gnralement de faon discrte
Problme : dterminer une autre fonction de forme donne, qui approche
le mieux possible la fonction f .
- Courbes osculatoires :
g(xi) = f(xi)
i = 0,...,n.
1. Approximation polynomiale :
On veut approcher l'ensemble discret dune fonction discrte f dont les points
sont reprsents par (xi, yi) par une fonction g ayant la forme d'un polynme de
degr n :
g(x)=Pn(x) = a0 + a1 x + a2 x2+...+ an-1 xn-1 + an xn
i = 0,n
2
1 x 0
1 x1
.
.
.
1 x n
x 02
x 0n 1
2
x1
n 1
x1
x 2n
x nn 1
x 0n a 0 y 0
y
n
a
x1 1 1
=
n
x n a n y n
Limitations :
Apparition doscillations dans certains cas, lorsquon augmente le degr du
polynme dinterpolation.
3
2. Mthode de Newton :
1
,
f () f ()
f =
Pente de la corde
1 , f
f ' () = 1 , f
Pour n+1 abscisses distinctes : xi
1
x 0 , x1
f (x 1 ) f (x 0 )
f=
x1 x 0
1
x1 , x 2
f (x 2 ) f (x1 )
f=
x 2 x1
.
.
.
i = 0,,n
1
x n 1 , x n
f ( x n 1 ) f ( x n )
f=
x n 1 x n
5
2x 0 x1x 2 f =
2x1x 2 x 3 f =
1x1x 2 f 1x 0 x1 f
x2 x0
1x 2 x 3 f 1x1x 2 f
x 3 x1
.
.
.
2x n 2 x n 1x n f =
1x n 1x n f 1x n 2 x n 1 f
x n x n 2
6
n
x0 ... xn
f ( x0 )
f ( x1 )
f =
+
( x0 x1 )( x0 x2 )...( x0 xn ) ( x1 x0 )( x1 x2 )...( x1 xn )
f ( xn )
+ ... +
( xn x1 )( xn x2 )...( xn xn 1 )
ou encore :
j= n
n
x 0 ... x n
f =
j=0
f (x j )
i=n
(x
i =0 ,i j
xi )
nx 0 ... x n P = 0
Formule de Newton :
Ordre 0 :
1
x 0 ,x
f (x) f (x 0 )
f=
x x0
f ( x ) = f ( x 0 ) + ( x x 0 )1x 0 x f
Polynme d'ordre 0
Diffrence divise d'ordre 2 base sur x0, x1 et x :
x2 , x , x
0 1
f ( x0 )
f ( x)
f ( x1 )
f =
+
+
( x x0 )( x x1 ) ( x0 x)( x0 x1 ) ( x1 x)( x1 x0 )
soit :
( x x0 )( x
x1 ) x2 , x , x
0 1
( x x1 ) f ( x0 ) ( x x1 ) f ( x1 )
f = f ( x)
( x0 x1 )
( x1 x0 )
f ( x1 ) f ( x0 )
( x x0 )( x x1 ) x2 , x , x f = f ( x) f ( x0 ) ( x x0 )
0 1
(
x
x
)
1
0
1x
0 x1
On en tire :
f ( x) = f ( x0 ) + ( x x0 ) 1x x f + ( x x0 )( x x1 ) x2 , x , x
0 1
0 1
f est alors un polynme de degr 1 et un reste qui s'annule si f est un
polynme de degr 1
La fonction peut donc tre approche par le polynme de degr 1 :
P1 ( x) = f ( x0 ) + ( x x0 ) 1x x f
0 1
A l'ordre n :
Polynme d'interpolation :
Mthode de Lagrange
Polynme d'interpolation Pn(x) calcul sous la forme d'une
combinaison linaire des polynmes de Lagrange.
Pn ( x ) = y i L i ( x )
i =0
avec
(x x j )
Li ( x ) =
j= 0
j i
n
(polynmes de Lagrange)
(x i x j )
j= 0
j i
11
Interpolation spline
Principe.
La fonction interpolante S(x) est constitue de morceaux de
polynmes de degr r qui se raccordent, ainsi que leurs drives
jusq' l'ordre r-1, aux points d'interpolation.
Splines usuelles : r = 3 Splines cubiques
La fonction d'interpolation concide avec les points interpoler,
ses drives premire et seconde se raccordent
Donc, sur chaque intervalle [xi , xi+1], la restriction de S(x) est un
polynme Pi(x) de degr 3 (ou plutt 3) tel que:
Pi(xi) = yi
Pi(xi+1) = yi+1
P'i(xi) = P'i+1(xi)
et P''i(xi) = P''i+1(xi)
i = 0,,n-1
12
Pi "1 ( xi ) = M i
On en dduit :
Pi "1 ( x) = M i 1
xi x
x xi 1
+ Mi
hi
hi
hi = xi xi 1
En intgrant :
( xi x) 2
( x xi 1 ) 2
P ( x) = M i 1
+ Mi
+ Ci 1
2hi
2hi
'
i 1
( xi x)3
( x xi 1 ) 2
Pi 1 ( x) = M i 1
+ Mi
+ Ci 1 ( x xi 1 ) + K i 1
6hi
6hi
13
h
( xi xi 1 )3
yi 1 = Pi 1 ( xi 1 ) = M i 1
+ K i 1 = M i 1 i + K i 1
6hi
6
2
( xi xi 1 ) 2
hi
yi = Pi 1 ( xi ) = M i
+ Ci 1 ( xi xi 1 ) + K i 1 = M i
+ Ci 1hi + K i 1
6hi
6
2
hi2
K i 1 = yi 1 M i 1
6
et
Ci 1 =
yi yi 1 hi
( M i M i 1 )
hi
6
Il ne reste plus qu' galer les drives premires de Pi-1 et Pi en xi pour tablir les
relations permettant de dterminer les Mi et donc des polynmes, soit :
hi
hi + hi +1
hi +1
1
1
( yi +1 yi ) ( yi yi 1 )
M i 1 +
Mi +
M i +1 =
6
3
6
hi +1
hi
i = 1,,n-1
14
D = (y i g ( x i ) )
i =0
D = yi ( a0 + a1 xi + ... + ak x + ...a x )
i =0
k
i
r
r i
15
soit :
n
n k
n k +1
n k+r
x i a 0 + x i a 1 + .... x i a r = ( x ik .y i )
i =0
i =0
i =0
i =0
n +1
xi
xi2
.
.
r
x
i
xi
2
x
i
r +1
x
i
r +2
x
i
2
x
i
3
x
i
3
x
i
4
x
i
r
x
i a0 yi
r +1
a
x
i 1 xi yi
2
r +2
x
x
i = i yi
r
2r
xi ar xi yi
16
17
Interpolation linaire :
On cherche la droite dquation y = ax +b, qui approche un
nuage de points au sens des moindres carrs
cov(x , y)
a=
V( x )
b = y
Coefficient de corrlation :
Bonne corrlation si
Rappels
x. cov(x , y)
= y ax
V( x )
cov(x, y)
x . y
3
2
1 n
2
2
2
(
)
V ( x) =
x
x
=
x
x
i
n + 1 i =0
1 n
cov( x, y ) =
( xi x )( yi x ) = x. y x. y
n + 1 i =0
18
f ( xi +1 ) f ( xi ) ou
f ' ( xi )
xi +1 xi
f ( xi ) f ( xi 1 )
f ' ( xi )
xi xi 1
f ( xi + h) = f ( xi ) + hf ' ( xi ) + o(h 2 )
h = xi- xi-1
f ( xi + h) f ( xi )
f ' ( xi ) =
+ o( h)
h
Premier ordre droite
Valeur approch de f'(xi)
19
ou encore :
f ( xi h) = f ( xi ) hf ' ( xi ) + o(h 2 )
f ( xi ) f ( xi h)
f ' ( xi ) =
+ o( h)
h
Diffrences dcentres
20
Diffrences centres
h2
f ( xi + h) = f ( xi ) + hf ' ( xi ) +
f " ( xi ) + O(h 2 )
2
h2
f ( xi h) = f ( xi ) hf ' ( xi ) +
f " ( xi ) + O(h 2 )
2
Diffrence centre :
second ordre
Remarque :
La formule prcdente peut tre obtenue en approchant la fonction
driver par un polynme (interpolation de Lagrange) de degr 1
P1 ( x) = f ( x0 ) L0 ( x) + f ( x1 ) L1 ( x)
x x0
x x0
= f ( x0 )
+ f ( x1 )
x0 x1
x0 x1
La drive de P1 en x0 vaut alors :
f ( x1 ) f ( x0 )
P '1 ( x0 ) =
x1 x0
22
n impair
n pair
n=1
n=2
A0
A1
A2
A3
A4
A5
A0
A1
A2
A3
A4
A5
12
12
60
45
180
270
27
840
672
168
32
5040
8064
1008
128
2100
600
150
25 2
42000
6000
1000
125
10 2520
10 25200
23