Académique Documents
Professionnel Documents
Culture Documents
Position du problme
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 :
Limitations :
Apparition doscillations dans certains cas, lorsquon augmente le degr du
polynme dinterpolation.
3
2. Mthode de Newton :
f () f ()
1
, f =
Pente de la corde
1 , f Drive premire du polynme d'interpolation de degr 1
4
Si f est continue et drivable sur l'intervalle [,], il existe de cet intervalle tel que
f ' () = 1 , f
f (x1 ) f (x 0 )
1
f=
x1 x 0
x 0 , x1
f (x 2 ) f (x1 )
1
f=
x 2 x1
x1 , x 2
.
.
.
f ( x n 1 ) f ( x n )
1
f=
x n 1 x n
x n 1 , x n
5
On forme ensuite les diffrences divises d'ordre 2 :
1x1x 2 f 1x 0 x1 f
2x 0 x1x 2 f =
x2 x0
1x 2 x 3 f 1x1x 2 f
2x1x 2 x 3 f =
x 3 x1
.
.
.
1x n 1x n f 1x n 2 x n 1 f
2x n 2 x n 1x n f =
x n x n 2
6
On montre que l'on a l'identit suivante :
f ( x0 ) f ( x1 )
n
f = +
( x0 x1 )( x0 x2 )...( x0 xn ) ( x1 x0 )( x1 x2 )...( x1 xn )
x0 ... xn
f ( xn )
+ ... +
( xn x1 )( xn x2 )...( xn xn 1 )
ou encore : j= n
f (x j )
n
x 0 ... x n f = i=n
j=0
(x
i =0 ,i j
j xi )
f n
( )
x 0 ...x n f =
n
n!
nx 0 ... x n P = 0
Formule de Newton :
Polynme d'ordre 0
f ( x) f ( x0 ) f ( x1 )
x2 , x , x f = + +
0 1 ( x x0 )( x x1 ) ( x0 x)( x0 x1 ) ( x1 x)( x1 x0 )
soit :
( x x1 ) f ( x0 ) ( x x1 ) f ( x1 )
( x x0 )( x x1 ) x2 , x , x f = f ( x)
0 1 ( x0 x1 ) ( x1 x0 )
f ( x1 ) f ( x0 )
( x x0 )( x x1 ) x2 , x , x f = f ( x) f ( x0 ) ( x x0 )
0 1
( x1 x0 )
1x f 9
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
P1 ( x) = f ( x0 ) + ( x x0 ) 1x x f
0 1
A l'ordre n :
Polynme d'interpolation :
n
Pn ( x ) = y i L i ( x )
i =0
avec n
(x x j )
j= 0
j i
Li ( x ) = 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.
Pi "1 ( xi 1 ) = M i 1 Pi "1 ( xi ) = M i
On en dduit :
xi x x xi 1 hi = xi xi 1
Pi "1 ( x) = M i 1 + Mi
hi hi
En intgrant :
( xi x) 2 ( x xi 1 ) 2
P ( x) = M i 1
'
i 1 + Mi + Ci 1
2hi 2hi
( 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
En imposant l'galit du polynme avec les valeurs de la fonction interpoler :
( xi xi 1 ) 3
2
h
yi 1 = Pi 1 ( xi 1 ) = M i 1 + K i 1 = M i 1 i + K i 1
6hi 6
( xi xi 1 ) 2
2
h
yi = Pi 1 ( xi ) = M i + Ci 1 ( xi xi 1 ) + K i 1 = M i i + Ci 1hi + K i 1
6hi 6
Ceci permet la dtermination des constantes d'intgration, soit :
hi2 yi yi 1 hi
K i 1 = yi 1 M i 1 et Ci 1 = ( M i M i 1 )
6 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 +1
hi
M i 1 + Mi +
hi +1
M i +1 =
1
( yi +1 yi ) ( yi yi 1 )
1
i = 1,,n-1
6 3 6 hi +1 hi
Principe :
Minimiser la somme des carrs des distances entre les points (xi, yi) et (xi, g(xi)) :
n
D = (y i g ( x i ) )
2
i =0
( )
n
D = yi ( a0 + a1 xi + ... + ak x + ...a x )
k r 2
i r i
i =0
D
( )
n
= 2 yi ( a0 + a1 xi + ... + ak xik + ...ar xir ) .( xik ) = 0
ak i = 0 15
soit :
n k n k +1 n k+r n
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 i
x 2
i a0 yi
x r
r +1
xi i
x 2
i
x 3
xi 1 xi yi
a
xi2
i
x 3
i
x 4
i = i yi
x r +2
x 2
.
.
2r
ix r
i
x r +1
i
x r +2
xi ar xi yi
r
16
17
Interpolation linaire :
cov(x , y) x. cov(x , y)
a= b = y = y ax
V( x ) V( x )
cov(x, y)
Coefficient de corrlation : =
x . y
3
Bonne corrlation si
2
1 n
Rappels V ( x) = i ( x x )2
= x 2
x 2
n + 1 i =0
1 n
cov( x, y ) =
n + 1 i =0
( xi x )( yi x ) = x. y x. y
18
Approximation des drives d'une fonction
1. Drives premires
f ( xi +1 ) f ( xi ) ou f ( xi ) f ( xi 1 )
Intuitivement : f ' ( xi ) f ' ( xi )
xi +1 xi 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) Premier ordre gauche
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
f ( xi + h) f ( xi h) = 2hf ' ( xi ) + O(h 3 )
f ( xi + h) f ( xi h) Diffrence centre :
f ' ( xi ) = + O(h 2 )
2h second ordre
21
Remarque :
P1 ( x) = f ( x0 ) L0 ( x) + f ( x1 ) L1 ( x)
x x0 x x0
= f ( x0 ) + f ( x1 )
x0 x1 x0 x1
f ( x1 ) f ( x0 )
P '1 ( x0 ) =
x1 x0
22
n impair
n pair
n=1 n=2
p A0 A1 A2 A3 A4 A5 p A0 A1 A2 A3 A4 A5
2 2 1 2 1 1
4 12 8 1 4 12 8 1
6 60 45 9 1 6 180 270 27 2
8 840 672 168 32 3 8 5040 8064 1008 128 9
10 2520 2100 600 150 25 2 10 25200 42000 6000 1000 125 8
23