Anda di halaman 1dari 5

SOLUTIONAREA NUMERICA A ECUATIILOR DIFERENTIALE ORDINARE

1. Solutionarea unei aplicatii cu programul de calcul ECDIF


Se considera ecuatia diferentiala ordinara:

, cu x0=0, y0=1 si xn=1. Se cere

sa se rezolve numeric ecuatia diferentiala pentru x[0,1], cu pasul de integrare h=0.1.


Pentru inceput, ecuatia se rezolva cu programul ECDIF, rezultatele fiind date in tabelul
de mai jos:

Euler PREDEuler clasic


eroare

Euler modificat

COR

Hammi
Runge-Kutta 4

ng

i
0
1
2
3
4
5
6
7
8
9
1

xi
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9

yi

yi

Eroarea

Yi

eroarea

yi

eroarea

yi

1
1,1
1,191818
1,277438
1,358213
1,435133
1,508966
1,580338
1,649783
1,717779

0
0,004554
0,008601
0,013
0,017
0,021
0,026
0,031
0,037
0,044

1
1,095909
1,184097
1,266201
1,34336
1,416402
1,485956
1,552514
1,616475
1,678166

0
4,63E-04
8,80E-04
1,29E-03
1,72E-03
2,19E-03
2,72E-03
3,33E-03
4,03E-03
4,86E-03

1
1,095657
1,183596
1,265444
1,342327
1,415064
1,484274
1,550437
1,613948
1,675112

0
2,11E-04
3,79E-04
5,32E-04
6,91E-04
8,56E-04
1,04E-03
1,25E-03
1,50E-03
1,80E-03

1
1,095446
1,183217
1,264912
1,341642
1,414216
1,483242
1,549196
1,612455
1,673325

0
0
0
0
6,00E-06
8,00E-06
8,00E-06
9,00E-06
1,10E-05
1,40E-05

1
1,095446
1,183217
1,264912
1,341636
1,414208
1,483234
1,549187
1,612444
1,673311

1,784771

0,053

1,737867

5,83E-03

1,734192

2,15E-03

1,732056

1,60E-05

1,73204

Analiza evolutiei calculelor si a rezultatelor evidentiaza urmatoarele concluzii:

Versiunea clasica a metodei Euler este cea mai putin precisa, observandu-se clar
si fenomenul de propagare a erorii, specific metodelor monopas;
Metodele Euler modificat si Euler Predictor-Corector au o precizie acceptabila
pentru ecuatia considerata si pasul h adoptat, obtinuta pe seama unui volum
mare de calcule, cu un plusa pentru metoda Euler Predictor-Corector;
Metoda Runge-Kutta de ordinul 4 conduce, practic, la valorile exacte ale
rezultatelor (erori de ordinul 10-5,10-6);
Metoda Hamming ofera cu certitudine valorile exacte ale functiei;
Valoarea pasului h este corespunzatoare, evolutia erorilor indicand chiar
posibilitati de augmentare la metodele de ordin superior.
Page | 1

Mirela MOGA

Lucrarea 14

2. Solutionarea manuala a aplicatiei cu versiunea clasica a metodei EULER


Pentru pasul de discretizare se adopta valoarea h=0.1.
f ( x y ) y

2 x
y

x0 0
y0 1
f0 f ( x0 y0)

f0 1

x1 x0 h

x1 0.1

y1 y0 h f0

y1 1.1

f1 f ( x1 y1)

f1 0.918182

x2 x1 h

x2 0.2

y2 y1 h f1

y2 1.191818

f2 f ( x2 y2)

f2 0.856197

x3 x2 h

x3 0.3

y3 y2 h f2

y3 1.277438

f3 f ( x3 y3)

f3 0.807748

x4 x3 h

x4 0.4

y4 y3 h f3

y4 1.358213

f4 f ( x4 y4)

f4 0.769203

x5 x4 h

x5 0.5

y5 y4 h f4

y5 1.435133

3. Solutionarea manuala a aplicatiei cu metoda Euler Predictor-Corector


Pentru pasul de discretizare se adopta valoarea h=0.1, iar pentru eroare se admite
e=0.005.
h 0.1
f ( x y ) y

2 x
y

e 0.005
x0 0
y0 1

pas 1
initializare

f0 f ( x0 y0)

f0 1

x1 x0 h

x1 0.1

y10 y0 h f0

y10 1.1

iteratii

f1 f ( x1 y10)

y11 y0 h

f1 0.918182

er y11 y10

er 0.004091

er e

f0 f1

2
y1 y11

y11 1.095909

Page | 2
Mirela MOGA

Lucrarea 14

pas 2
initializare

f0 f ( x1 y1)

f0 0.913412

x2 x1 h

x2 0.2

y20 y1 h f0

y20 1.18725

iteratii

f1 f ( x2 y20)

y21 y1 h

f1 0.850337

er y21 y20

er 0.003154

er e

f0 f1
2

y21 1.184097

y2 y21

pas 3
initializare
f0 f ( x2 y2)

f0 0.846286

x3 x2 h

x3 0.3

y30 y2 h f0

y30 1.268725

iteratii
f1 f ( x3 y30)

y31 y2 h

f1 0.79581

er y31 y30

er 0.002524

er e

f0 f1
2

y31 1.266201

y3 y31

pas 4
initializare

f0 f ( x3 y3)

f0 0.792343

x4 x3 h

x4 0.4

y40 y3 h f0

y40 1.345436

iteratii

f1 f ( x4 y40)

y41 y3 h

f1 0.750833

er y41 y40

er 0.002076

er e

f0 f1
2

y41 1.34336

y4 y41

pas 5
initializare
f0 f ( x4 y4)

f0 0.747839

x5 x4 h

x5 0.5

y50 y4 h f0

y50 1.418144

iteratii
f1 f ( x5 y50)

y51 y4 h

f1 0.712997

er y51 y50

er 0.001742

er e

f0 f1
2

y51 1.416402

y5 y51

Page | 3
Mirela MOGA

Lucrarea 14

4. Solutionarea manuala a aplicatiei cu metoda Euler Modificat


f ( x y ) y
h 0.1

2 x
y
x0 0

y1 y0 h

y2 y1 h

y3 y2 h

y4 y3 h

y5 y4 h

y0 1

f ( x0 y0) f ( x0 h y0 h f ( x0 y0) )
2

f ( x1 y1) f ( x1 h y1 h f ( x1 y1) )
2
f ( x2 y2) f ( x2 h y2 h f ( x2 y2) )
2

f ( x3 y3) f ( x3 h y3 h f ( x3 y3) )
2
f ( x4 y4) f ( x4 h y4 h f ( x4 y4) )
2

y1 1.095909

x1 x0 h

y2 1.184097

x2 x1 h

y3 1.266201

x3 x2 h

y4 1.34336

x4 x3 h

y5 1.416402

Page | 4
Mirela MOGA

Lucrarea 14

Page | 5
Mirela MOGA

Lucrarea 14

Anda mungkin juga menyukai