>
>
>
Agar aniqlikni yanada oshirish lozim boʻlsa, u holda:
Euler
|
d
|
y(t) 1 2 y(t) t 2 , y(0) 1, t 1, output plot, numsteps 50
|
|
;
|
|
|
|
|
|
|
|
|
dt
|
|
|
|
|
35
11-rasm. Maple dasturida Eyler usuli bilan olingan natijalar grafigi.
2-misol. Quyidada keltirilgan Koshi masalasini takomillashtirilgan Eyler usuli bilan yechish.
Yechish. Koshi masalasi
y' - 2y + x2 = 1, x [0;1], y(0) = 1.
Faraz qilaylik, n = 10 , h = (1 - 0)/10 = 0,1.
Boshlangʻich nuqta x0 = 0, y0 = 1.
Dastlabki nuqtani hisoblash.
y
|
|
|
h
|
f(x
|
;
|
y
|
|
))
|
1 0,1 f(0
|
0,1
|
; 1
|
|
0,1
|
f(0; 1))
|
|
0
|
|
0
|
|
|
|
|
|
2
|
0
|
|
|
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0,05 (1 2 1- 0
|
2
|
))
|
1
|
0,1 f(0,05; 1,15)
|
|
|
|
|
|
|
|
|
|
1 0,1
|
|
(1 2
|
|
|
2
|
|
|
|
|
|
|
|
|
1,15 0,05 ) 1,32975
|
|
x
|
1
|
x
|
0
|
h 0,1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Keyingi 2, 3, ... ,10 nuqtalar uchun hisoblashlar xiddi shunday.
|
|
|
|
3-misol. Yuqoridagi 2-misolda keltirilgan Koshi masalasini 4-tartibli
|
|
Runge-Kutta usuli bilan yechish.
|
|
|
|
|
Yechish. Koshi masalasi
|
|
|
|
|
y' - 2y + x2 = 1, x [0;1],
|
y(0) = 1.
|
|
|
|
Faraz qilaylik, n = 10 , h = (1 - 0)/10 = 0,1.
|
|
|
|
Boshlangʻich nuqta
|
|
x0 = 0, y0 = 1.
|
|
|
|
Dastlab C0, C1, C2, C3larning qiymatlarini hisoblab olamiz:
|
|
|
|
C
|
0
|
f(x
|
0
|
; y
|
0
|
) f(0; 1) 1 2 1 02 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C
|
|
f(x
|
|
|
|
h
|
; y
|
|
|
h
|
K 0
|
) f(0,05;1,15) 1 2 1,15 0,052 3,2975
|
|
|
|
1
|
0
|
|
0
|
|
|
|
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C2
|
f(x0
|
h ;
|
y
|
0
|
h K1 ) f(0,05;1,164875)1 2 1,164875 0,052 3,32725
|
|
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
2
|
|
|
|
|
|
C
|
3
|
f(x
|
0
|
h;
|
y
|
0
|
h K
|
2
|
) f(0,1; 1,332725)1 2 1,332725 0,12 3,65545
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36
|
|
C
|
0
|
f(x
|
0
|
; y
|
0
|
) f(0; 1) 1 2 1 02 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C
|
1
|
f(x
|
0
|
h ; y
|
0
|
h K 0 ) f(0,05;1,15) 1 2 1,15 0,052
|
3,2975
|
|
|
|
|
|
2
|
|
|
|
|
2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C2
|
f(x0
|
|
h
|
|
;
|
y0
|
h
|
K1
|
) f(0,05;1,164875)1 2 1,164875 0,052
|
3,32725
|
|
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
2
|
|
|
|
|
C3 f(x0 h;
|
|
y0 h K 2 ) f(0,1; 1,332725)1 2 1,332725 0,12 3,65545
|
|
12-rasm. ODTni 1-tartibli Eyler usuli bilan yechish algoritmi.
37
Dastlabki nuqtani hisoblash:
0,1
6
(C0 2C1 2C2 C3)
(3 2 3,2975 2 3,32725 3,65545) 1,3317491667
Keyingi 2, 3, ... ,10 nuqtalar uchun hisoblashlar xiddi shunday.
13-rasm. Takomillashtirilgan Eyler usulining algoritmi.
14-rasm.4-tartibli Runge-Kutta usulining algoritmi.
|
|
|
2х
|
|
|
|
|
|
|
|
|
|
4-misol.Ushbu у
|
у у
|
oddiy differensial tenglamaning
|
[0,1]
|
|
|
|
kesmada olingan va y(0)=1 boshlang`ich shartni qanotlantiruvchi
|
y(x)
|
|
|
|
|
|
38
|
|
|
yechimining taqribiy qiymatlarini Eyler usuli yordamida h=0,2 qadam bi-lan toping.
Yechish:
f (x, y) y
|
2x
|
; a 0,b 1, x
|
0, y
|
|
1, h 0,2
|
|
|
0
|
|
|
y
|
0
|
|
|
|
|
|
|
|
|
|
quyidagi hisoblash
1-qator . i=0, x
0
jadvalini tuzamiz.
(x0 , y0 ) y0 2x 1 2 * 0 1,000
y1
|
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
y
|
0
|
hf (x
|
0
|
, y
|
0
|
) 0,2*1
|
0,2000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
y
|
i1
|
y
|
i
|
y
|
, i 0; y
|
y
|
0
|
y
|
0
|
1 0,2 1,2000
|
|
|
|
|
|
i
|
|
|
1
|
|
|
|
|
2-qator.
i=1
, x1
|
0 0,2 0,2; y1
|
1,2000;
|
f (x , y ) y
|
|
2x
|
1,2
|
2*0,2
|
0,8667
|
|
|
|
|
|
|
|
1
|
1
|
1
|
|
y
|
|
1,2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
|
|
|
y
|
|
hf (x , y ) 0,2 * 0,8667 0,1733
|
|
|
1
|
|
|
1
|
1
|
|
|
|
|
|
y
|
2
|
y
|
y
|
1,2
|
0,1733 1,3733
|
|
|
|
|
1
|
1
|
|
|
|
|
|
|
i=2,3,4,5 lar uchun hisoblanadi.
i
|
xi
|
yi
|
f(xi ,yi)
|
yi
|
1
|
0,1
|
1,0000
|
1,0000
|
0,200
|
2
|
0,2
|
1,2000
|
0,8667
|
0,1733
|
3
|
0,4
|
1,3733
|
0,7805
|
0,1561
|
4
|
0,6
|
1,5294
|
0,7458
|
0,1492
|
5
|
0,8
|
1,6786
|
0,7254
|
0,1451
|
6
|
1,0
|
1,8237
|
|
|
Do'stlaringiz bilan baham: |