Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ erivation num´ erique
Vincent Nozick
Vincent Nozick D´erivation num´erique 1 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ erivation num´ erique
Probl´ ematique :
Etant donn´ ´ ee une fonction f , on veut estimer la d´ eriv´ ee f 0 de f en un point x.
Vincent Nozick D´erivation num´erique 2 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ erivation num´ erique
Fonctions ´ etudi´ ees :
• fonctions analytiques
(fonctions dont on connait la formule) R → R , continues et d´ erivables
• fonctions non analytiques, mais ´ evaluables en n’importe quel point.
• un ensemble de points repr´ esentant une fonction suppos´ ee continue.
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ erivation num´ erique
Applications :
• R´ esolution de syst` emes physiques
• Traitement d’image ou du signal
• ...
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee
f 0 (x 0 ) = lim
x→x
0f(x) − f (x 0 ) x − x 0
Vincent Nozick D´erivation num´erique 5 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee
f (x) − f (x 0 ) x − x 0
| {z }
d´ eriv´ ee
ressemble ` a f (x B ) − f(x A ) x B − x A
| {z }
coefficient directeur d’une droite
Vincent Nozick D´erivation num´erique 6 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul de la d´ eriv´ ee
Si on a la formule analytique de la fonction, on peut la d´ eriver en utilisant des m´ ethodes de calcul formel (maple/mupad).
Et si on ne l’a pas ? → on peut en faire une estimation.
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee
la formulation :
f 0 (x 0 ) = lim
x→x
0f (x) − f (x 0 ) x − x 0 est ´ equivalente ` a :
f 0 (x 0 ) = lim
h→0
f(x 0 + h) − f (x 0 )
h
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee avant
f 0 (x 0 ) ' f (x 0 + ∆x) − f (x 0 )
∆x
Vincent Nozick D´erivation num´erique 9 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee arri` ere
f 0 (x 0 ) ' f(x 0 ) − f (x 0 − ∆x)
∆x
Vincent Nozick D´erivation num´erique 10 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee centr´ ee
f 0 (x 0 ) ' f (x 0 + ∆x) − f (x 0 − ∆x) 2∆x
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ee centr´ ee
f 0 (x ) ' f (x 0 + ∆x) − f (x 0 − ∆x)
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
Formule de Taylor :
f (x) = f (a) + f 0 (a)(x − a) + f 00 (a)
2! (x − a) 2 + ...
Vincent Nozick D´erivation num´erique 12 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x) = f(a) + f 0 (a)(x − a) + f 00 (a)
2! (x − a) 2 + ...
changement de variable : x ← x ± ∆x a ← x
f (x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f (x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
Vincent Nozick D´erivation num´erique 13 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x) = f (a) + f 0 (a)(x − a) + f 00 (a)
2! (x − a) 2 + ...
changement de variable : x ← x ± ∆x a ← x
f(x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f(x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x) = f(a) + f 0 (a)(x − a) + f 00 (a)
2! (x − a) 2 + ...
changement de variable : x ← x ± ∆x a ← x
f(x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f (x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x) = f (a) + f 0 (a)(x − a) + f 00 (a)
2! (x − a) 2 + ...
changement de variable : x ← x ± ∆x a ← x
f (x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f (x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
Vincent Nozick D´erivation num´erique 13 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f(x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f(x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• f(x + ∆x) − f (x)
∆x = f 0 (x) + f 00 (x)
2! ∆x 1 + ...
• d´ eriv´ ee avant
• ∆x 1 → ordre 1
Vincent Nozick D´erivation num´erique 14 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f (x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• f (x + ∆x) ∆x − f (x) = f 0 (x) + f 00 2! (x) ∆x 1 + ...
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f(x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f(x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• f(x) − f ∆x (x − ∆x) = f 0 (x) − f 00 2! (x) ∆x 1 + ...
• d´ eriv´ ee arri` ere
• ∆x 1 → ordre 1
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f (x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• f (x) − f (x − ∆x)
∆x = f 0 (x) − f 00 (x)
2! ∆x 1 + ...
• d´ eriv´ ee arri` ere
• ∆x 1 → ordre 1
Vincent Nozick D´erivation num´erique 15 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f(x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f(x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• − • f (x + ∆x) − f (x − ∆x) = 2f 0 (x)∆x + 2 f 000 (x)
3! ∆x 3 + ...
f (x 0 + ∆x) − f (x 0 − ∆x)
2∆x = f 0 (x) + f 000 (x)
3! ∆x 2 + ...
• d´ eriv´ ee centr´ ee
• ∆x 2 → ordre 2 (plus pr´ ecis)
Vincent Nozick D´erivation num´erique 16 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f (x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f (x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• − • f(x + ∆x) − f (x − ∆x) = 2f 0 (x)∆x + 2 f 000 (x)
3! ∆x 3 + ...
f(x 0 + ∆x) − f (x 0 − ∆x)
2∆x = f 0 (x) + f 000 (x)
3! ∆x 2 + ...
• d´ eriv´ ee centr´ ee
• ∆x 2 → ordre 2 (plus pr´ ecis)
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
f(x + ∆x) = f (x) + f 0 (x)∆x + f 00 (x)
2! ∆x 2 + f 000 (x)
3! ∆x 3 + ...
f(x − ∆x) = f (x) − f 0 (x)∆x + f 00 (x)
2! ∆x 2 − f 000 (x)
3! ∆x 3 + ...
• − • f (x + ∆x) − f (x − ∆x) = 2f 0 (x)∆x + 2 f 000 (x)
3! ∆x 3 + ...
f (x 0 + ∆x) − f (x 0 − ∆x)
2∆x = f 0 (x) + f 000 (x)
3! ∆x 2 + ...
• d´ eriv´ ee centr´ ee
• ∆x 2 → ordre 2 (plus pr´ ecis)
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Calcul d’erreur
Bilan:
d´ eriv´ ee avant : f 0 (x) ' f(x 0 + ∆x) − f(x 0 )
∆x ordre 1
d´ eriv´ ee arri` ere : f 0 (x) ' f(x 0 ) − f (x 0 − ∆x)
∆x ordre 1
d´ eriv´ ee centr´ ee : f 0 (x) ' f(x 0 + ∆x) − f(x 0 − ∆x)
2∆x ordre 2
Vincent Nozick D´erivation num´erique 17 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ees partielles
Soit une fonction f ` a plusieurs variables de R n 7→ R m :
f : x =
x 1 x 2 .. . x n
7−→
f 1 (x 1 , x 2 , · · · , x n ) f 2 (x 1 , x 2 , · · · , x n )
.. .
f m (x 1 , x 2 , · · · , x n )
D´ efinition:
La d´ eriv´ ee partielle de f est la d´ eriv´ ee par rapport ` a l’une de ses variables, les autres ´ etant gard´ ees constantes.
Vincent Nozick D´erivation num´erique 18 / 21
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ees partielles
f : x =
x 1 x 2 .. . x n
7−→
f 1 (x 1 , x 2 , · · · , x n ) f 2 (x 1 , x 2 , · · · , x n )
.. .
f m (x 1 , x 2 , · · · , x n )
Exemple:
∂f (x)
∂x i
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
D´ eriv´ ees partielles
En pratique :
∂f (x)
∂x i ' f (x + ∆x i ) − f (x)
δx i avec ∆x i =
0
.. . δx i
.. . 0
il est conseill´ e de choisir : δx = max min(x .10 −4 , 10 −6 ), 10 −15
Introduction D´eriv´ee Estimation Calcul d’erreur D´eriv´ees partielles
Matrice jacobienne
f : x =
x 1 x 2 .. . x n
7−→
f 1 (x 1 , x 2 , · · · , x n ) f 2 (x 1 , x 2 , · · · , x n )
.. .
f m (x 1 , x 2 , · · · , x n )
D´ efinition:
La matrice jacobienne J est la matrice des d´ eriv´ ees partielles du premier ordre d’une fonction vectorielle f .
J = ∂(f 1 , . . . , f m )
∂(x 1 , . . . , x n ) =
∂f
1∂x
1· · · ∂x ∂f
1..
n. . .. .. .
∂f
m∂x
1· · · ∂f ∂x
mn
Vincent Nozick D´erivation num´erique 21 / 21