Explorer les Livres électroniques
Catégories
Explorer les Livres audio
Catégories
Explorer les Magazines
Catégories
Explorer les Documents
Catégories
DÉPARTEMENT DE PHYSIQUE
MARRAKECH
Faites quelques itérations pour 𝑡 ∈ [0,1] en utilisant un pas ℎ = 0.1 et les méthodes
suivantes :
1) Méthode d’Euler
2) Méthode de Taylor d’ordre 2
3) Méthode d’Euler modifiée (ordre 2)
4) Méthode du point milieu (ordre 2)
5) Méthode de Runge-Kutta d’ordre 4 (déjà traité ; voir Applications 5).
Solution
1) Méthode d’Euler
L’algorithme général est simple : 𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑡𝑛 , 𝑦𝑛 )
𝑦1 = 𝑦0 + ℎ𝑓(𝑡0 , 𝑦0 ) = 𝑦0 + 𝑡02 sin 𝑦0 = 1
L’algorithme devient :
ℎ2
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑡𝑛 , 𝑦𝑛 ) + [2𝑡𝑛 𝑠𝑖𝑛 𝑦𝑛 + 𝑡𝑛4 sin 𝑦𝑛 cos 𝑦𝑛 ]
2
ℎ2
𝑦𝑛+1 = 𝑦𝑛 + ℎ[𝑡𝑛 sin 𝑦𝑛 + [2𝑡𝑛 𝑠𝑖𝑛 𝑦𝑛 + 𝑡𝑛4 sin 𝑦𝑛 cos 𝑦𝑛 ]
2 ]
2
Ainsi :
ℎ2
𝑦1 = 𝑦0 + ℎ[𝑡02 sin 𝑦0 ] + [2𝑡0 𝑠𝑖𝑛 𝑦0 + 𝑡04 sin 𝑦0 cos 𝑦0 ] = 1
2
ℎ2
𝑦2 = 𝑦1 + ℎ[𝑡12 sin 𝑦1 ] +[2𝑡1 𝑠𝑖𝑛 𝑦1 + 𝑡14 sin 𝑦1 cos 𝑦1 ]
2
0.12
𝑦2 = 1 + 0.1[0.12 sin 1] + [2 × 0.1 sin 1 + 0.14 sin 1 cos 1]
2
𝑦2 = 1.000 841 471 + 0.005[0.168 294 197 + 0.000 045 465] = 1.001 683 169
ℎ2
𝑦3 = 𝑦2 + ℎ[𝑡22 sin 𝑦2 ] +
[2𝑡2 𝑠𝑖𝑛 𝑦2 + 𝑡24 sin 𝑦2 cos 𝑦2 ]
2
𝑦3 = 1.001 683 169 + 0.1[0.033 695 169 ] + 0.005[0.336 951 685 + 0.000 726 313]
𝑦3 = 1.001 683 169 + 0.003 369 517 + 0.001 688 39 = 1.006 741 076
…
On continue les calculs en suivant la même procédure.
1
𝑦1 = 𝑦0 + [𝑘1 + 2(𝑘2 + 𝑘3 ) + 𝑘4 ] = 1.000 280 514
6
𝑘1 = ℎ𝑓(𝑡1 , 𝑦1 ) = ℎ𝑡12 sin 𝑦1 = 0.1 × 0.12 sin(1.000 280 514) = 0.000 841 623
ℎ 𝑘1 ℎ 2 𝑘1
𝑘2 = ℎ𝑓 (𝑡1 + , 𝑦1 + ) = ℎ (𝑡1 + ) sin (𝑦1 + ) = 0.001 894 162
2 2 2 2
ℎ 𝑘2 ℎ 2 𝑘2
𝑘3 = ℎ𝑓 (𝑡1 + , 𝑦1 + ) = ℎ (𝑡1 + ) sin (𝑦1 + ) = 0.001 894 801
2 2 2 2
2
𝑘4 = ℎ𝑓(𝑡1 + ℎ, 𝑦1 + 𝑘3 = ℎ(𝑡1 + ℎ) sin 1 + 𝑘3 ) = 0.003 370 577
) (𝑦
1
𝑦2 = 𝑦1 + [𝑘1 + 2(𝑘2 + 𝑘3 ) + 𝑘4 ] = 1.002 245 535
6
𝑘1 = ℎ𝑓(𝑡2 , 𝑦2 ) = ℎ𝑡22 sin 𝑦2 = 0.1 × 0.22 sin 1.002245535 = 0.003 370 729
ℎ 𝑘1 ℎ 2 𝑘1
𝑘2 = ℎ𝑓 (𝑡2 + , 𝑦2 + ) = ℎ (𝑡2 + ) sin (𝑦2 + ) = 0.005 272 427
2 2 2 2
ℎ 𝑘2 ℎ 2 𝑘2
𝑘3 = ℎ𝑓 (𝑡2 + , 𝑦2 + ) = ℎ (𝑡2 + ) sin (𝑦2 + ) = 0.005 275 616
2 2 2 2
𝑘4 = ℎ𝑓(𝑡2 + ℎ, 𝑦2 + 𝑘3 ) = ℎ(𝑡2 + ℎ)2 sin(𝑦2 + 𝑘3 ) = 0.007 609 598
1
𝑦3 = 𝑦2 + [𝑘1 + 2(𝑘2 + 𝑘3 ) + 𝑘4 ] = 1.007 591 604
6