Académique Documents
Professionnel Documents
Culture Documents
Chapitre 5
Dérivation
numérique
Ift2421 1 Chapitre 5
Introduction
Ift2421 2 Chapitre 5
Principe général
de dérivation et d’intégration numériques
Si
f ( x) = Pn ( x) + En ( x )
alors
f ′( x) = Pn′( x) + E n′ ( x)
et aussi
a a a
Ift2421 3 Chapitre 5
Dérivation du polynôme de Newton Grégory
n
s k s n +1
f ( x ) = Pn ( x ) + E n ( x ) = ∑ ∆ f 0 + h f
( n +1)
(ξ)
k =0 k n + 1
Dériver le polynôme :
Dérivée de l’erreur :
dE n ( x0 ) 1 d s n +1 ( n +1)
= h f (ξ )
dx h ds n + 1
s n +1 d ( n +1)
+ h f (ξ )
n + 1 dx
Ift2421 4 Chapitre 5
Dérivation du polynôme de Newton Grégory
Pour s = 0, 1, ... , n
les formules se simplifient.
Pour (s = 0 ) :
1
1 ∆ f 0 + ( 2 s − 1) ∆2
f 0 +
Pn′( x0 ) = 1 2
h
6
[( s − 1)( s − 2) + s( s − 2) + s( s − 1)]∆ f 0 +K
3
1 2 1 3 1 4
∆
1 0 2f − ∆ f 0 + ∆ f 0 − ∆ f 0 +K
= 3 4
( −1) n n
h
− ∆ f0
n
( −1) n n ( n +1)
E n′ ( x0 ) = h f (ξ) terme qui est en O(hn)
n +1
Ift2421 5 Chapitre 5
Exemple :
Table de f(x) = ex à 3 décimales :
Ift2421 6 Chapitre 5
Dérivation du polynôme de Newton Grégory
Pour s = 0, 1, ... , n
les formules se simplifient.
1 1
P2′( x1 ) = ∆f 0 + ∆2 f 0
h 2
Simplification :
f2 − f0
f ′ ( x1 ) ≈ P2′( x1 ) =
2h
f 1 − f −1
f ′( x0 ) ≈ Formule centrée
2h
Ift2421 7 Chapitre 5
Formules de calcul des dérivées
Dérivée première :
f1 − f 0
f ′ ( x0 ) = + O(h)
h
f 1 − f −1
f ′ ( x0 ) = + O( h 2 ) (différences centrées)
2h
− f 2 + 4 f1 − 3 f 0
f ′ ( x0 ) = + O( h 2 )
2h
− f 2 + 8 f 1 − 8 f −1 + f −2
f ′ ( x0 ) = + O( h 4 ) (différences centrées)
12h
Dérivée seconde :
f 2 − 2 f1 + f 0
f ′′ ( x0 ) = + O( h )
h2
f 1 − 2 f 0 + f −1
f ′′( x0 ) = 2 + O(h 2 ) (différences centrées)
h
− f 3 + 4 f 2 − 5 f1 + 2 f 0
f ′′ ( x0 ) = 2 + O( h 2 )
h
− f 2 + 16 f 1 − 30 f 0 + 16 f −1 − f −2
f ′′ ( x0 ) = 2 + O(h 4 ) (différences
12h
centrées)
∆n f 0
Dérivées d’ordre supérieur : f ( x0 ) = h n + O(h)
n
Ift2421 8 Chapitre 5
Instabilité de la différentiation numérique
(propagation des erreurs)
f 1 − f −1
f ′ ( x0 ) = + O( h 2 )
2h
f −1 = f −∗1 ± e−1
f 1 = f 1∗ ± e1
alors
f 1∗ − f −∗1 e1 + e−1
f ′ ( x0 ) = ± + O( h 2 )
2h 2h
Ift2421 9 Chapitre 5
Utilisation des séries de Taylor
(pour reconstruire les formules de dérivation)
h2 h3 h 4 iv
x1 = x 0 + h f ( x1 ) = f 1 = f 0 + h f 0′ + f 0′′+ f 0′′′+ f 0 +K
2 6 24
h2 h3 h 4 iv
x −1 = x 0 − h f ( x −1 ) = f −1 = f 0 − h f 0′ + f 0′′− f 0′′′+ f 0 +K
2 6 24
f 1 − f −1
f ′ ( x0 ) = + O( h 2 )
2h
h3 h5 v
f 1 − f −1 = 2h f 0′ + f 0′′′+ f 0 +K
3 60
f 1 − f −1 h 2 h4 v
f 0′ = + f ′′′+ f +K
2h 6 0 120 0
Ift2421 10 Chapitre 5
Utilisation des séries de Taylor
(pour reconstruire les formules de dérivation)
au voisinage de x = x0.
h2 h3 h 4 iv
x1 = x 0 + h f ( x1 ) = f 1 = f 0 + h f 0′ + f 0′′+ f 0′′′+ f 0 +K
2 6 24
h2 h3 h 4 iv
x −1 = x 0 − h f ( x −1 ) = f −1 = f 0 − h f 0′ + f 0′′− f 0′′′+ f 0 +K
2 6 24
f 1 − f −1
f ′ ( x0 ) = + O( h 2 )
2h
f 1 − 2 f 0 + f −1
f ′′( x0 ) = 2 + O( h 2 )
h
4h 3 2h 4 iv
f ( x2 ) = f 2 = f 0 + 2h f 0′ + 2h f 0′′+ 2
f 0′′′+ f 0 +K
3 3
4h 3 2h 4 iv
f ( x −2 ) = f −2 = f 0 − 2h f 0′ + 2h f 0′′− f 0′′′+
2
f 0 +K
3 3
Reconstruire des formules plus complexes :
− f 2 + 16 f 1 − 30 f 0 + 16 f −1 − f −2
f ′′ ( x0 ) = 2 + O( h 4 )
12h
Ift2421 11 Chapitre 5
Ordre d’une approximation
f ( x)
lim n ≤ M
x →0 x
Exemple : Remarque :
f(x) = Sin(x) • On a toujours
Ift2421 12 Chapitre 5
Extrapolation de Richardson
• Pas = h
f ( x ) = f 1 ( x ) + O(h n )
= f 1 ( x) + Kh n + O(h n +1 )
• Pas = 2 h
f ( x ) = f 2 ( x ) + O(( 2h) n )
= f 2 ( x ) + 2 n Kh n + O(( 2h) n +1 )
Alors
f ( x) = f 1 ( x ) + n
1
2 −1
( f 1 ( x ) − f 2 ( x )) + O(h n +1 )
• Interpolation
• Dérivation numérique
• Intégration numérique
Ift2421 13 Chapitre 5
Extrapolation de Richardson
Démonstration
(1) → f ( x ) − f h ( x ) = cn h n + cn +1h n +1 +K
(2) → f ( x ) − f 2h ( x ) = cn (2h) n + cn +1 (2h) n +1 +K
= cn 2 n h n +
2n * (1) - (2) ⇒
2 n f ( x ) − 2 n f h ( x ) − f ( x ) + f 2 h ( x ) = O(h n+1 )
(2 n − 1) f ( x ) − (2 n − 1) f h ( x ) − f h ( x ) + f 2 h ( x ) = O(h n+1 )
(2 n − 1){ f ( x ) − f h ( x )} = f h ( x ) − f 2 h ( x ) + O(h n +1 )
f ( x) − f h ( x ) = n
1
2 −1
{ f h ( x ) − f 2 h ( x )} + O(h n+1 )
f ( x) = f h ( x ) +
1
2 −1
n { f h ( x ) − f 2 h ( x )} + O(h n +1 )
Ift2421 14 Chapitre 5
Exemple : Différences centrées :
• h = 0.1
Dérivée première en x = 2.5
de f’(2.5) = (f1-f-1)/2h + O(h2)
= (0.25337-0.31729)/0.2 +
x f(x) O(h2)
2.3 0.34718 = -0.3196 + O(h2)
2.4 0.31729
2.5 0.28587 • 2h = 0.2
2.6 0.25337
2.7 0.22008 f’(2.5) = (f2-f-2)/2h + O(4h2)
= (0.22008-0.34718)/0.4 +
O(4h2)
= -0.3178 + O(4h2)
f4h
Ift2421 15 Chapitre 5
Ift 2421
Chapitre 5
Intégration
numérique
Ift2421 16 Chapitre 5
Intégration numérique
x0 x1 x2 K xn
f0 f1 f2 K fn
∫
b
f ( x ) dx
a
Ift2421 17 Chapitre 5
Intégration numérique
(Quadrature de Newton Cotes)
x0 x1 x2 K xn
f0 f1 f2 K fn
x0 x0 x0
Ift2421 18 Chapitre 5
Quadrature simple du trapèze
(formule de Newton Cotes pour n = 1)
Polynôme Pn(x) de degré 1
∫ P1 ( x )dx = h ∫ P1 ( s)ds
x1 1
Formule d’erreur :
x0 0
s
∫x0 E1 ( x)dx = h f ′′(ξ1 ) ∫0 2 ds
x1 1
3
s =1
s2
∫x0 P1 ( x )dx = h sf 0 + 2 ∆f 0
x1
s( s − 1)
= h 3 f ′′(ξ1 ) ∫
s=0 1
ds
f − f0 0 2
= h f 0 + 1
2 1
= h 3 f ′′(ξ1 ) −
12
[ f 0 + f1]
h
∫x0 1
x1
P ( x ) dx =
2
Ift2421 19 Chapitre 5
Méthode de Simpson 1/3
(quadrature simple)
∫ P2 ( x )dx = h ∫ P2 ( s)ds
x2 2
Formule d’erreur :
x0 0
[ f + 4 f1 + f 2 ]
h Remarque :
=
3 0 2 s
∫0 3 ds = 0
Nous gagnons alors un ordre
pour l’ereur
2 s
∫x0 E2 ( x)dx = h f (ξ1 ) ∫0 4 ds
x2
5 iv
1
= h f ( ξ1 ) −
5 iv
90
Surface sous la parabole.
Ift2421 20 Chapitre 5
Méthode de Simpson 3/8
(quadrature simple)
∫ P3 ( x )dx = h ∫ P3 ( s)ds
x3 3
Formule d’erreur :
x0 0
s
= h[ f 0 + 3 f1 + 3 f 2 + f 3 ]
3
∫x0 E3 ( x)dx = h f (ξ1 ) ∫0 4 ds
x3 3
5 iv
8
3
= h5 f iv (ξ1 ) −
80
Ift2421 21 Chapitre 5
Exemple :
4 64
5 125 6
6 216 = (0 + 216)
2
= 648
Calculer
∫
6
f ( x )dx
0
3 3* 2
∫0 ∫
6 6
f ( x ) dx ≈ ( f + 4 f3 + f6 ) f ( x )dx ≈ ( f0 + 3 f2 + 3 f4 + f6 )
3 0 0 8
3 3
= (0 + 4 * 27 + 216) = (0 + 3 * 8 + 3 * 64 + 216)
3 4
= 324 = 324
Note : Remarque :
6
x 4
Assuré d’avoir la bonne
∫
6
x dx =
3
réponse car P3(x)
0
4 0
Ift2421 22 Chapitre 5
Quadratures Simples
Résumé :
Problèmes :
Ift2421 23 Chapitre 5
Quadratures composites
2 étapes :
Ift2421 24 Chapitre 5
Quadrature composite du trapèze
h
Ti = ( f + f i −1 ) pour 1 ≤ i ≤ n
2 i
n
h n
A( f ) = ∫ f ( x )dx = ∑ Ti = ∑ ( f i + f i −1 )
xn
x0
i =1 2 i =1
=
h
2
{ f 0 + 2 f1 + 2 f 2 + 2 f 3 +K+2 f n −1 + f n }
Ift2421 25 Chapitre 5
Erreur sur la quadrature composite du trapèze
− h3 n
E( f ) = ∑ f ′′(ξi )
12 i =1
avec xi −1 ≤ ξi ≤ xi
− h2 1 n
= ( xn − x0 ) ∑ f ′′(ξi )
12 n i =1
− h2
= ( x − x0 ) f ′′ (ξ) avec x0 ≤ ξ ≤ xn
12 n
Remarque :
Si f(x) est un polynôme de degré 1 alors A(f) = I(f)
car f’’(x) = 0.
Ift2421 26 Chapitre 5
Exemple :
π π
• Approximez I = ∫0 Sin( x ) dx avec h =
4
π
Valeur exacte : I = ∫0 Sin( x )dx = [− Cos( x )]0 = 2
π
1 1
A π = h( f 0 + f 1 + f 2 + f 3 + f 4 )
h=
4
2 2
π
A π = (1 + 2 ) ≈ 1896
.
h=
4
4
− h2
E= ( x − x0 ) f ′′ (ξ) avec 0 ≤ ξ ≤ π
12 n
π3 π3
E = Sin(ξ) ≤ ≈ 016149
. avec 0 ≤ ξ ≤ π
192 192
π
Ereelle = I − A π = 2 − (1 + 2 ) ≈ 2 − 1896
. ≈ 0.1038
h= 4
4
Ift2421 27 Chapitre 5
Exemple (suite) :
Remarque :
− h2
E= ( x − x0 ) f ′′ (ξ) avec 0 ≤ ξ ≤ π
12 n
π π
E = h 2 Sin( ξ) ≤ h 2 ≤ 0.0005
12 12
⇔
12
h 2 ≤ 0.0005
π
⇔
h ≤ 0.044
π
n> ≈ 718
.
0.044
Donc n ≥ 72 intervalles.
Ift2421 28 Chapitre 5
Quadrature composite de Simpson 1/3
m
h m
A( f ) = ∫ f ( x )dx = ∑ Si = ∑ ( f 2i − 2 + 4 f 2i −1 + f 2i )
x2 m
x0
i =1 3 i =1
=
h
{ f + 4 f1 + 2 f 2 + 4 f 3 +K+4 f n −1 + f n }
3 0
Ift2421 29 Chapitre 5
Erreur de troncature globale pour Simpson 1/3
E = E1 + E2 +K+ En / 2
h5 f iv (ξ1 ) + f iv (ξ 2 ) +K+ f iv (ξ n / 2 ) n
E=− 2
90 n/2
h5 1 1 (b − a ) 5 iv
E=− n f ( ξ) = −
iv
(b − a ) h f ( ξ ) = −
4 iv
f (ξ)
180 180 180 n 4
Remarque :
• E = O( h )
4
Ift2421 30 Chapitre 5
Remarque :
3 points
∫ P2 ( x ) = ∫ P3 ( x ) =
h
( y0 + 4 y1 + y2 )
b b
a a 3
Preuve (exercice)
Ift2421 31 Chapitre 5
Quadrature composite de Simpson 3/8
A( f ) = ∫ f ( x )dx
xn
x0
= h{ f 0 + 3 f1 + 3 f 2 + 2 f 3 +K+2 f n − 3 + 3 f n − 2 + 3 f n −1 + f n }
3
8
E = E1 + E2 +K+ En / 3 (n = 3k )
3 5 f iv ( ξ1 ) + f iv (ξ 2 ) +K+ f iv (ξ n / 3 ) n
E=− h 3
80 n/3
h5 (b − a ) 4 iv 1 (b − a ) 5 iv
E = − n f (ξ) = −
iv
h f (ξ) = − f ( ξ)
80 80 80 n 4
Ift2421 32 Chapitre 5
Intégration de Romberg
I = ∫ f ( x )dx = Tn + E
b
Tn =
h
{ f + 2 f1 + 2 f 2 + 2 f 3 +K+2 f n −1 + f n }
2 0
(b − a ) 2
h f ′′ (ξ ) a ≤ξ≤b
12
Tn − I =
a2h 2 + a4h 4 + a6h 6 + a8h8 +K (∗ )
Ift2421 33 Chapitre 5
Intégration de Romberg
n = 2m
Définition :
1. Première étape :
Calcul des quadratures composites :
T1,n =
h
{ f + 2 f1 + 2 f 2 + 2 f 3 +K+2 f n −1 + f n }
2 0
{ f 0 + 2 f 2 +K+2 f n − 2 + f n }
2h
T n =
1,
2
2
T
1,
n =
4h
2
{ f 0 + 2 f 4 +K+2 f n − 4 + f n }
4
T
1,
n =
8h
2
{ f 0 + 2 f 8 +K+2 f n − 8 + f n }
8
etc...
Ift2421 34 Chapitre 5
I = ∫ f ( x )dx = T1,n + O(h 2 )
b T1,n
a
T2 ,n/ 2
=T + O(( 2h) ) 2
1,
n T1,n / 2 T3,n / 4
2
2 − 1 2 , n2
2 2 T n n
3, 2, 2,
1 4 2 4
T =T n + 2 T n − T n
2,
n
1, 2 − 1 1, 2 1, 4
1
4 2
=T + 4 T − T n
1 T n n
2 − 1 2 , n4 2,
T =T + 2
T n − T n 3,
8
2,
4 8
2,
n
1,
n
2 − 1 1, 4 1,
8 4 8 etc.
etc. Nous avons alors:
Nous avons alors:
I = ∫ f ( x )dx = T
b
+ O( h 6 )
I = ∫ f ( x )dx = T
b n
+ O( h 4 )
a 3,
n 4
a 2,
2
=T n + O(( 2h) 6 )
=T n + O(( 2h) 2 ) 3,
8
2,
4 etc...
etc... Nouvelles itérations possibles
Ift2421 35 Chapitre 5
Intégration de Romberg
T
k +1,
n =
1
4 −1
k (
4 k Tk ,n − Tk ,n / 2 )
2
Remarque:
1 1
T = 2 h f + f
1 intervalle de longueur 2h 1,1 2 0 2 2
1 1
T = h f + f + f
2 intervalle de longueur h 1,2 2 0 1
2 2
4T1,2 − T1,1
= (2 f 0 + 4 f 1 + 2 f 2 − f 0 − f 2 )
h
3 3
= ( f 0 + 4 f1 + f 2 )
h
3
Ift2421 36 Chapitre 5
Exemple :
Attention :
1. Première étape :
Calcul des quadratures composites :
n=4 1,4 2 { f 0 + 2 f 1 + 2 f 2 + 2 f 3 + f 4 }
h
T =
0.2
T1,4 = {0 + 2 * 0199
. + 2 * 0.389 + 2 * 0.565 + 0.717}
2
T1,4 = 0.3023
{ f0 + 2 f2 + f4}
2h
n=2 1,2T =
2
2h
T1,2 = {0 + 2 * 0.389 + 0.717}
2
T1,2 = 0.299
4h
n=1 T1,1 = 2 { 0 + 0.717}
T1,1 = 0.2868
Ordre de l'erreur O(h2)
Ift2421 37 Chapitre 5
2. Deuxième étape :
ère
1 Extrapolation de Richardson
T2 ,2 = T1,4 + 2
1
2 −1
( )
T1,4 − T1,2
1
T2 ,2 = 0.3023 + 2 ( 0.3023 − 0.299)
2 −1
T2 ,2 = 0.3034
T2 ,1 = T1,2 +
1
( T −T
2 2 − 1 1,2 1,1
)
1
T2 ,1 = 0.299 + 2 ( 0.299 − 0.2868)
2 −1
T2 ,1 = 0.303066
3. Troisième étape :
2ème Extrapolation de Richardson
T3,1 = T2 ,2 +
1
(T − T2 ,1
2 4 − 1 2 ,2
)
1
T3,1 = 0.3034 + 4 ( 0.3034 − 0.303066)
2 −1
T3,1 = 0.3034222
Ift2421 38 Chapitre 5
Méthode des Quadratures gaussiennes
Polynôme de Legendre
1 d
Pn ( x ) = n n ( x − 1)
2 n
n = 1,2,3,K
2 n ! dx
P0 ( x) = 1
P1 ( x) = x
1
P2 ( x ) = ( 3x 2 − 1)
2
1
P3 ( x ) = (5x 3 − 3x )
2
1
P4 ( x ) = (35x 4 − 30x 2 + 3)
8
1
P5 ( x ) = (63x 5 − 70 x 3 + 15x )
8
1
P6 ( x ) = (693x 6 − 945x 4 + 315x 2 − 5)
48
Ift2421 39 Chapitre 5
Racines des polynômes de Legrendre
Théorème:
Pn(x) possède n racines réelles, toutes situées entre -1 et 1.
Exemple:
n =1 P1 ( x) = x = 0 ⇔ x = 0
2.5
1
n=2 P2 ( x ) =(3x 2 − 1) = 0
2
2 1.5
⇔ 3x 2 = 1 1
3 0.5
⇔x=±
3 -1.5 -1 -0.5 0.5 1 1.5
-0.5
-1
1.5
1
1
n=3 P3 ( x ) =(5x 3 − 3x ) = 0
2
⇔ x (5x 2 − 3) = 0
0.5
x = 0
-1.5 -1 -0.5 0.5 1 1.5
-0.5 ⇔ 3
x = ±
-1 5
-1.5
Ift2421 40 Chapitre 5
Méthode des Quadratures gaussiennes
Théorème :
−1
i =1
n t −tj
ωi = ∫ ∏t
1
dt
où −1
j =1 i −tj
j ≠i
et
t0, t1, t2, ..., tn sont les zéros du nième polynôme de Legendre.
∫
1
Posons : P(t )dt = ω 1 P(t1 ) + ω 2 P(t 2 ) n=2
−1
Ift2421 41 Chapitre 5
Soit P(t ) = a3t + a 2 t + a1t + a0 a0, a1, a2, a3 quelconque.
3 2
∫
1
( a3t 3 + a2 t 2 + a1t + a0 )dt = ω 1 (a3t13 + a 2 t12 + a1t1 + a0 )
−1
+ω 2 (a3t 23 + a2 t 22 + a1t 2 + a0 )
2
a 3 (0) + a 2 ( ) + a1 (0) + a 0 (2) = a 3 (ω 1t13 + ω 2 t 23 ) + a 2 (ω 1t12 + ω 2 t 22 )
3
+a1 (ω 1t1 + ω 2 t 2 ) + a 0 (ω 1 + ω 2 )
(1) ω 1t13 + ω 2 t 23 = 0
2
( 2) ω 1t12 + ω 2 t 22 =
3
(3) ω 1t1 + ω 2 t 2 = 0
( 4) ω1 + ω 2 = 2
(1) ω 1t13 + ω 2 t 23 = 0
(3) * t12 ω 1t13 + ω 2 t 2 t12 = 0
(1) − (3) * t12 ω 2 t 2 (t 22 − t12 ) = 0
Ift2421 42 Chapitre 5
ω 2 t 2 (t 2 − t1 )(t 2 + t1 ) = 0
ω 2 = 0 ou t2 = 0 ou t2 = t1 ou t 2 = −t1
3 3
∫
1
P(t )dt = P( − ) + P( )
−1 3 3
Ift2421 43 Chapitre 5
Application :
f (t ) = P(t ) + R4
f (t ) ≈ P(t )
−1 −1
∫
1
f (t )dt ≈ f (t1 ) + f (t 2 )
−1
3 3
∫
1
f (t )dt ≈ f ( − )+ f ( )
−1 3 3
Ift2421 44 Chapitre 5
Quadrature gaussienne avec n termes
∫
1
Posons : P(t )dt = ω 1 P(t1 ) + ω 2 P(t 2 ) +K+ω n P(t n )
−1
Trouvons t1, t2, ..., tn, ω1, ω2, ..., ωn pour que le membre de droite
donne la valeur exacte de l’intégrale, quelque soit le polynôme
de degré inférieur à 2n-1 considéré.
Application :
f (t ) ≈ P(t )
−1 −1
∫
1
f (t )dt ≈ ω 1 f (t1 ) + ω 2 f (t 2 ) +K+ω n f (t n )
−1
Ift2421 45 Chapitre 5
Rappel :
• ω i = ∫−1 Li (t )dt
1
Exemple : n = 2
∫
1
f (t )dt ≈ ω 1 f (t1 ) + ω 2 f (t 2 )
−1
3 3
t1 = − t2 =
3 3
3
(t − t 2 ) t−
L1 (t ) = = 3 = − 1 ( 3 t − 1)
( t1 − t 2 ) 2 2
−
3
1
1 1 1 3
ω 1 = ∫ L1 (t )dt = − ∫ ( 3 t − 1)dt = − t 2 − t
1
−1 2 −1 2 2 −1
1 3 3
ω 1 = − − 1 − + 1
2 2 2
ω1 =
Même chose pour ω 2
Ift2421 46 Chapitre 5
Nous allons donc construire une table contenant
Pour différentes valeurs de n,
les racines du polynôme de Legendre de degré n
et les valeurs des poids correspondants.
n Racines Coefficients
2 0.5773502692 1
-0.5773502692 1
3 0.774596692 0.5555555556
0 0.8888888889
-0.774596692 0.5555555556
4 0.8611363116 0.3478548451
0.3399810436 0.6521451549
-0.3399810436 0.6521451549
-0.8611363116 0.3478548451
5 0.9061798459 0.2369268850
0.5384693101 0.4786286705
0 0.5688888889
-0.5384693101 0.4786286705
-0.9061798459 0.2369268850
Remarque:
Ift2421 47 Chapitre 5
Application à un domaine d’intégration quelconque
x=b
I=∫ g ( x)dx
x=a
Effectuer un changement
de variable :
x = x(t)
(b − a ) t + ( a + b )
x=
2
(b − a )
dx = dt
2
x =b b − a t =1 b−a 1
I = ∫ g ( x )dx =
2 ∫t =−1 2 ∫−1
g ( x ( t )) dt = f (t )dt
x =a
b−a
≈
2
{ω 1 f (t1 ) + ω 2 f (t 2 )+K+ω n f (t n )}
b−a
≈
2
{ω 1 g ( x (t1 )) + ω 2 g ( x(t 2 )) +K+ω n g ( x (t n ))}
b−a
≈
2
{ω 1 g ( x1 ) + ω 2 g ( x2 ) +K+ω n g ( xn )}
n choix de l’usager.
Ift2421 48 Chapitre 5
Exemple :
• Changement de variable :
DE BC 1
= x = (t + 1)
AE AC 4
x − a 0.5 1
= dx = dt
t +1 2 4
0.5 1 t =1
2 2 1 − ( t +1) 2
I= ∫
π 0
− x2
e dx = ∫ e 16
π 4 t =−1
dt
t =1 1
1 − ( t +1) 2
I= ∫ 1e
2 π t =−
16
dt
I≈
1
2 π
{ω 1 f (t1 ) + ω 2 f (t 2 ) + ω 3 f (t 3 )} = 0.520500184
1 1
− ( t1 +1) 2 − ( −0.77459667+1) 2
f ( t1 ) = e 16
=e 16
= 0.99682962
1 1
− ( t +1) 2 −
f (t 2 ) = e 16 2
=e 16
= 0.939413062
1 1
− ( t3 +1) 2 − (1.77459667 ) 2
f (t 3 ) = e 16
=e 16
= 0.821334696
Ift2421 49 Chapitre 5
Méthode des Quadratures gaussiennes
3 3
∫
1
P(t )dt = P( − ) + P( )
−1 3 3
∫a 2 ∫a 3
h
( y + 4 y1 + y2 )
b b
P ( x ) = P ( x ) =
3 0
∫x0 P3 ( x)dx = 8 h[ P0 + 3 P1 + 3 P2 + P3 ]
x3 3
Il y a 3 ou 4 termes à évaluer !
Seulement 2 pour la méthode de Gauss.
Problème:
Ift2421 50 Chapitre 5
Méthode des coefficients indéterminés
∫ f ( x )dx = ∑ ω i f ( xi )
xn
x0
i =0
ωi : Poids de la quadrature.
xi : Points de la quadrature
Principe :
Remarques :
Ift2421 51 Chapitre 5
Exemple:
∫
1
f ( x )dx = a f ( −1) + b f (0) + c f (1)
−1
∫ 1dx = [ x]
1
f ( x ) = 1, = 2 = a (1) + b (1) + c (1)
1
−1 −1
a +b+c = 2
1
1 2
∫−1 2 x −1 = 0 = a (−1) + b (0) + c (1)
1
f ( x) = x , xdx =
−a+c= 0
1
1 3 2
∫−1
1
f ( x) = x ,
2
x 2
dx = 3
x = = a (1) + b (0) + c (1)
−1 3
2
a+c =
3
Solution:
1 4 1
a = , b= , c=
3 3 3
Ift2421 52 Chapitre 5
Remarque:
x ( t ) − x0 x 0 + 2h − x0 2h t + 2 x0 + 2h
= x= = h t + x0 + h
t − ( −1) 1 − ( −1) 2
dx = h dt
x = x0 + 2 h b − a t =1 b−a 1
I=∫ f ( x )dx = ∫ f ( x ( t )) dt = ∫ g (t )dt
x = x0 2 t =−1 2 − 1
2h 1 4 1
≈ g ( t1 ) + g ( t 2 ) + g ( t 3 )
2 3 3 3
≈ h{ f ( x (t1 )) + 4 f ( x (t 2 )) + f ( x (t 3 ))}
1
3
Ift2421 53 Chapitre 5
Dérivation des splines cubiques
P3,i ( x) = ai ( x − xi ) 3 + bi ( x − xi ) 2 + ci ( x − xi ) + d i
P3,′i ( x ) = ci
P3′′,i ( x ) = 2bi
Ift2421 54 Chapitre 5
Intégration des splines cubiques
xn + 1 n xi + 1
∫ f ( x)dx = ∑ ∫ P
x1 i =1 xi
3,i ( x )dx
x
ai
n
i+
1
bi ci
= ∑ ( x − xi ) + ( x − xi ) + ( x − xi ) + d i x
4 3 2
i =1 4 3 2 xi
an
b c
= ∑ i ( xi +1 − xi ) 4 + i ( xi +1 − xi ) 3 + i ( xi +1 − xi ) 2 + d i ( xi +1 − xi )
i =1 4 3 2
Exprimée en fonction
des pas
hi = xi +1 − xi
xn + 1
a n
b c
∫ f ( x )dx = ∑ i hi 4 + i hi 3 + i hi 2 + d i hi
x1 i =1 4 3 2
xn + 1
h4 n
h3 n h2 n n
∫ f ( x )dx =
4
∑
i =1
ai + ∑ bi +
3 i =1 2
∑c
i =1
i + h∑ d i
i =1
x1
Ift2421 55 Chapitre 5
Intégrale impropres et indéfinies
∞ 1
I2 = ∫
2
I3 = ∫ x
t
I 1 = ∫ x e dx
−x
dx x 2 + 1 dx
0 0 x 0
• I1 = ?
∞
I 1 = ∫ x e − x dx + ∫ x e − x dx
1
0 1
1 − y dy
1 1
∞ 1 1 −
∫ x e dx = ∫ e − 2 = ∫ 3 e y dy
0
−x
avec 1 1 y y 0y
1 − 1y
lim 3 e = 0
y →0 y
I 1 = ∫ x e − x dx
A
0
A→∞
A I1
1 0.26424
10 0.99950
100 1.00001
1000 1.00001
10000 1.00001
∞ 1.0000
• I2 = ?
1
I2 = ∫
2
dx B→0
B x
• I3 = ?
Ift2421 56 Chapitre 5
Intégrales multiples
∫∫A
f ( x , y)dA = ∫
a
(∫ f ( x, y)dy)dx = ∫ (∫ f ( x, y)dx)dy
b
c
d d
c
b
Ift2421 57 Chapitre 5
Exemple :
∫ f ( x , y )dx = ∫ f ( x ,0.2)dx
3.0 3.0
y = 0.2:
1.5 1.5
h
= ( f + 2 f2 + 2 f3 + f4 )
2 1
0.5
= (0.990 + 2(1568
. ) + 2(2.520) + 4.090)
2
= 3.3140
0.5
y = 0.3: ∫ f ( x ,0.3)dx =
3.0
(1524
. + 2(2.384) + 2(3800
. ) + 6136
. )
1.5 2
= 5.0070
Ift2421 58 Chapitre 5
En faisant de même, nous obtenons :
∫
3.0
y = 0.4: f ( x ,0.4)dx = 6.6522
1.5
∫
3.0
y = 0.5: f ( x ,0.5)dx = 8.2368
1.5
∫
3.0
y = 0.6: f ( x ,0.6)dx = 9.7435
1.5
h
∫
0.6
f ( x , y )dy = ( f 1 + 4 f 2 + 4 f 3 + 4 f 4 + f 5 )
0.2 3
0.1
= (3.3140 + 4(5.0070) + 4(6.6522) + 4(8.2368) + 9.7435)
3
= 2.6446
Ift2421 59 Chapitre 5
Intégrales multiples avec limites variables
x 2 +1
∫∫ f ( x , y )dA = ∫ ∫ f ( x, y)dydx
1
A 0 0
Ift2421 60 Chapitre 5
Si nous utilisons une quadrature composite du trapèze
avec 5 sous intervalles dans chaque direction,
nous obtenons :
h1
S1 = ( f + 2 fb + 2 f c + 2 f d + 2 fe + f f )
2 a
h2
S2 = ( f g + 2 f h + 2 f i + 2 f j + 2 f k + f l )
2
h
S 3 = 3 ( f m + 2 f n + 2 f o +K)
2
...
h
S6 = 6 ( f u + 2 f v + 2 f w + 2 f x + 2 f y + f z )
2
x 2 +1
∫ ∫ f ( x , y )dydx par :
1
Nous avons la valeur de 0 0
hx
I= ( S1 + 2 S 2 + 2 S 3 + 2 S 4 + 2 S5 + S 6 )
2
Ift2421 61 Chapitre 5
Exemple :
x 2 +1
Calculer ∫0 ∫0 f ( x , y )dydx avec une quadrature composite du
1
f(0,y) = 0 x2 + 1 = 1
10
. /5
S1 = (0 + 0 + 0 + 0 + 0 + 0) = 0
2
f(0.2,y) = 0.2 y
1.04 / 5
S2 = (0 + 0.0832 + 01664
. + 0.2496 + 0.3328 + 0.208)
2
= 0.1082
116
. /5
S3 = (0 + 11856
. + 0.3712 + 0.5568 + 0.7428 + 0.464)
2
= 0.2692
S4 = 0.5549
S5 = 10758
.
2.0 / 5
S6 = (0 + 0.8 + 1.6 + 2.4 + 3.2 + 2.0) = 2.0
2
0.2
I= ( 0 + 0.2164 + 0.5384 + 11098
. + 2.1516 + 2.0) = 0.6016
2
Valeur analytique : I = 0.583333
Ift2421 62 Chapitre 5