Vous êtes sur la page 1sur 16

Analyse Numrique

Problmes Pratiques
Rsolution d'quations
diffrentielles
Ph. Leray Analyse Numrique 2
Introduction
Ph. Leray Analyse Numrique 3
Principes gnraux

quation diffrentielle :
avec t I = [t
0
,T]

ide gnrale :

discrtiser t
t
n
= t
0
+ nh avec h = (T-t
0
)/n = pas de la mthode
trouver une suite itrative z
n
qui approche y
n
= y(t
n
)
( ) ( ) ( )
( )

'

0 0
y t y
t y , t f t y
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
2
n n n
2
n n 1 n
h O t y , t hf t y y
2
h
t y h t y t y + +

+

+
+
Taylor :
( )

'

+
+
0 0
n n n 1 n
y z
z , t hf z z
schma d'Euler simple
Ph. Leray Analyse Numrique 4
( )

'

+
+
0 0
n n n 1 n
y z
z , t h z z
Schmas un pas 1/

Forme gnrique :
(t
n
,z
n
) calcul partir de z
n

exemples : on peut partir de la proprit :

calcul de l'intgrale I par :


rectangle gauche I = hf(t
n
) schma d'Euler
simple
rectangle droit I = hf(t
n+1
) schma d'Euler
rtrograde
(z
n+1
n'est plus donn directement,
il faut rsoudre le systme)
( ) ( ) ( ) ( ) ( ) ( )

+ +
+

+
+
1 n
n
1 n
n
t
t
n
t
t
n 1 n
dt t y , t f t y dt t y t y t y
( )
n n n 1 n
z , t hf z z +
+
( )
1 n 1 n n 1 n
z , t hf z z
+ + +
+
mthode implicite
Ph. Leray Analyse Numrique 5
Schmas un pas 2/


calcul de l'intgrale I par :
trapzes schma d'Euler centr
I = h[f(t
n
)+ hf(t
n+1
)]/2

comment viter les mthodes implicites en gardant les


avantages du schma d'Euler centr ?
on remplace le z
n+1
"gnant" du Euler centr par son
estimation simple :
schma prdicteur/correcteur d'Euler-
Cauchy
( ) ( ) ( )
1 n 1 n n n n 1 n
z , t f z , t f
2
h
z z
+ + +
+ +
mthode implicite
( )
n n n 1 n
z , t hf z z
~
+
+
( ) ( ) ( )
1 n 1 n n n n 1 n
z
~
, t f z , t f
2
h
z z
+ + +
+ +
Ph. Leray Analyse Numrique 6
Schmas un pas 3/

les schmas de Runge-Kutta

forme gnrique
avec (t,z) dfini par :

un ordre q

les quations suivantes :

problme = trouver les


meilleurs
i

ij

i
( )

'

+
+
0 0
n n n 1 n
y z
z , t h z z
( )

q
1 i
i i
k z , t
( )
( )

'

,
_

+ +
+ +


1 q
1 p
p p , 1 q 11 q q
1 11 1 2
1
k h z , h t f k
hk z , h t f k
z , t f k

Ph. Leray Analyse Numrique 7


Schmas un pas 4/

Runge-Kutta d'ordre 2

1
=0
2
=1
1
=

11
=1/2 : schma du point
milieu

1
=
2
=1/2
1
=

11
=1 : schma d'Euler-
Cauchy
( )

'

+
+
0 0
n n n 1 n
y z
z , t h z z
( )
2 2 2 2
k k z , t +
( )
( )
1 11 1 2
1
hk z , h t f k
z , t f k
+ +

( )

,
_

+ + +
+ n n n n n 1 n
z , t f
2
h
z ,
2
h
t hf z z
( ) ( ) ( ) [ ]
n n n n n n n 1 n
z , t hf z , h t f z , t f
2
h
z z + + + +
+
Ph. Leray Analyse Numrique 8
Schmas un pas 4/

Runge-Kutta d'ordre 4

il faut alors estimer f sur plusieurs valeurs


intermdiaires (souvent coteux)
( )
( )
3 n n 4
2 n n 3
1 n n 2
n n 1
hk z , h t f k
k
2
h
z ,
2
h
t f k
k
2
h
z ,
2
h
t f k
z , t f k
+ +

,
_

+ +

,
_

+ +

[ ]
4 3 2 1 n 1 n
k k 2 k 2 k
6
h
z z + + + +
+
Ph. Leray Analyse Numrique 9
( )

'

+
+
0 0
n n n 1 n
y z
z , t h z z
Schmas multi-pas 1/

les schmas d'Adams-Bashforth


(t
n
,z
n
) calcul partir de z
n
z
n-1
...

On repart de la proprit :

calcul de l'intgrale I en remplaant f par une


interpolation polynomiale d'ordre q (avec les points t
n

t
n-q
)
( ) ( ) ( ) ( ) ( ) ( )

+ +
+

+
+
1 n
n
1 n
n
t
t
n
t
t
n 1 n
dt t y , t f t y dt t y t y t y
( ) ( ) ( ) ( )

q
0 k
k n k n k
t y , t f ) t ( L t y , t f
L
k
= Polynmes de Lagrange
( ) ( )

q
0 k
k n k n k
t y , t f b h I

+

1 n
n
t
t
k k
dt ) t ( L
h
1
b
Ph. Leray Analyse Numrique 10
Schmas multi-pas 2/

Adams-Bashforth 2 pas

pour n 1
problme : il faut calculer z
1
autrement
(avec une mthode 1 pas comme Runge-Kutta)
( ) ( )
1
]
1

+
+ 1 n 1 n n n n 1 n
z , t f
2
1
z , t f
2
3
h z z
Ph. Leray Analyse Numrique 11
Schmas multi-pas 3/

Adams-Bashforth 3 pas

pour n 2

Adams-Bashforth 4 pas

pour n 3
( ) ( ) ( ) [ ]
2 n 2 n 1 n 1 n n n n 1 n
z , t f 5 z , t f 16 z , t f 23
12
h
z z
+
+ +
( ) ( ) ( ) ( ) [ ]
3 n 3 n 2 n 2 n 1 n 1 n n n n 1 n
z , t f 9 z , t f 37 z , t f 59 z , t f 55
24
h
z z
+
+ +
Ph. Leray Analyse Numrique 12
Schmas multi-pas 4/

les schmas d'Adams-Moulton


calcul de l'intgrale I en remplaant f par une
interpolation polynomiale d'ordre q+1 (avec les points t
n+ 1
t
n-q
)
mthode implicite : z
n+1
va dpendre de f(t
n+1
,z
n+1
)
( cause du k=-1)
( ) ( ) ( ) ( ) ( ) ( )

+ +
+

+
+
1 n
n
1 n
n
t
t
n
t
t
n 1 n
dt t y , t f t y dt t y t y t y
( ) ( )

q
1 k
k n k n k
t y , t f b h I I z z
n 1 n
+
+
Ph. Leray Analyse Numrique 13
Schmas multi-pas 5/

Adams-Moulton 1 pas

pour n 0 (Euler centr)

Adams-Moulton 2 pas

pour n 1


( ) ( ) [ ]
n n 1 n 1 n n 1 n
z , t f z , t f
2
h
z z + +
+ + +
( ) ( ) ( ) [ ]
1 n 1 n n n 1 n 1 n n 1 n
z , t f z , t f 8 z , t f 5
12
h
z z
+ + +
+ +
Ph. Leray Analyse Numrique 14
Schmas multi-pas 6/

Comment viter le ct implicite de Adams-


Moulton ?
on remplace le z
n+1
"gnant" par son estimation
par Adams-Bashford :

Exemple : schma prdicteur/correcteur d'ordre 4


( ) ( ) ( ) ( ) [ ]
3 n 3 n 2 n 2 n 1 n 1 n n n n 1 n
z , t f 9 z , t f 37 z , t f 59 z , t f 55
24
h
z z
~
+
+ +
( ) ( ) ( ) ( ) [ ]
2 n 2 n 1 n 1 n n n 1 n 1 n n 1 n
z , t f z , t f 5 z , t f 19 z
~
, t f 9
24
h
z z
+ + +
+ + +
Ph. Leray Analyse Numrique 15
Sujet de TD
Ph. Leray Analyse Numrique 16
Conclusion

Vous aimerez peut-être aussi