Differensial tenglamalarni taqribiy yechimlarini aniqlash. Eyler usuli
-masala. Birinchi va ikkinchi takomillashtirish usul bilan quyidagicha
Download 240.28 Kb.
|
Differensial tenglamalarni taqribiy yechimlarini aniqlash. Eyler
- Bu sahifa navigatsiya:
- 9.3- dastur 10 DEF FNE (X,Y)=Y-2*X/Y 12 PRINT: PRINT 14 PRINT “Birinchi tartibli differentsial tenglamasi uchun ”
- 18 PRINT TAB(98) “1-takomillashtirish 2-takomillashtirish” 20 PRINT 22 REM boshlang’ich qiymatlar ,bo‘linish soni, berilgan kesma yuqori chegarasi
- 60 FOR I=1 TO N 80 Y1=Y+H*FINE(X,Y)/2 120 Y2=Y+H*(FINE(X,Y)/2, Y1) 130 Y4=Y3+H*FINE(X,Y3) 140 Y5=Y3+(H/2)*(FINE(X,Y3)+ FINE(X+H,Y4))
- 140 PRINT Y5 “(“I”)=“;USING “.”;Y5 180 NEXT I 200 END RUN
- 9.3- Paskal tili dasturi {Birinchi tartibli differentsial tenglama } {Y
9.2-masala. Birinchi va ikkinchi takomillashtirish usul bilan quyidagicha
differentsial tenglamani h=0,2 qadam bilan u(0)=1 shartni qanoatlantiruvchi yechimni toping. Yechish. 1. Birinchi takomillashtirish usuli. (9.8) va (9.9) formulalar asosida: 1) i=0, xo=0, yo=1 bo‘lganda quyidagicha hisoblaymiz: f0=f (x0, y0)=y0-2x0/y0=1 x1/2=xo+h/2=0.1 y1/2=y0+hf (x0,y0)=1+0.1*1=1.1 f1/2=f (x 1/2,y1/2)= y 1/2- 2x1/2/y1/2=0.9182 = hf (x 1/2,y1/2)=0.2*0.9182=0.1836 bu holda birinchi yaqinlashishning birinchi qiymati: y1=y0+ =1+0.1836=1.1836 2) i=1, x1=0.2 y1=1.183 bo‘lganda quyidagicha hisoblaymiz: f (x 1,y1)=0.1(y1- )=0.0846 x3/2=0.3 y3/2=y1+ f (x 1,y1)=1.1836+0.0846=1.2682 f (x 3/2,y3/2)= y 3/2- 2x3/2/y3/2=0.7942 y0= h f (x 3/2,y3/2)=0.2*0.7942=0.1590 bu holda birinchi yaqinlashishning ikkinchi qiymati: y2= y1+y1=1.1836+0.1590=1,3426 shuningdek i=2, 3, 4, 5 lar uchun ham hisoblab, natijalarni quyidagi jadvalga yozamiz. 9.1-jadval
2. Ikkinchi takomillashtirish usuli. 1) i=0, xo=0, yo=1 bo‘lganda quyidagicha hisoblaymiz: f0=f (x0, y0)=1 , =y0+hf (x0,y0)=1+0.2*1=1.2 f0=0.1 x1=0.2, =1.2 = f (x1, )=0.1(9.2- )=0.0867 y0= (f 0+ )=0.1(9+0.867)=0.1867 bu holda ikkinchi yaqinlashishning birinchi qiymati: y1=y0+ =1*0,1867=1,1867 2) i=1, x1=0.2 y1=1.1867 bo‘lganda quyidagicha hisoblaymiz: f1=f (x1, y1)=1.1867- =0.8497 2=1.1867+0.1619 =1.3566 f1=0.0850 x1=0.4 y2=1.3566 = f (x2, 2)=0.0767 y1= (f 1+ )=0.0850+0.0767=0.1617 bu holda ikkinchi yaqinlashishning ikkinchi qiymati: y2=y1+y1=1.1867+0.1617=1.3484 shuningdek i=3,4,5 lar uchun xam hisoblab, natijalarni quyidagi jadvalga yozamiz. 9.2-jadval
Ushbu misol asosida Eylerning takomillashgan usulida birinchi tartibli differentsial tenglama uchun Koshi masalasini taqribiy yechimini kompyuter yordamida hisoblash quyidagicha dasturida berilgan. 9.3- dastur 10 DEF FNE (X,Y)=Y-2*X/Y 12 PRINT: PRINT 14 PRINT “Birinchi tartibli differentsial tenglamasi uchun ” 15 PRINT “Koshi masalasining taqribiy yechimini” 16 PRINT “Eylerning takomillashgan usulida” 18 PRINT “ hisoblash ” 20 PRINT 18 PRINT TAB(98) “1-takomillashtirish 2-takomillashtirish” 20 PRINT 22 REM boshlang’ich qiymatlar ,bo‘linish soni, berilgan kesma yuqori chegarasi: 40 READ X, Y, N, B 42 REM boshlang’ich qiymatlar , bo‘linish soni, berilgan kesma yuqori chegarasi qiymatlari: 44 DATA 0,1,5,1 50 H=(B-X)/N: Y3=Y 60 FOR I=1 TO N 80 Y1=Y+H*FINE(X,Y)/2 120 Y2=Y+H*(FINE(X,Y)/2, Y1) 130 Y4=Y3+H*FINE(X,Y3) 140 Y5=Y3+(H/2)*(FINE(X,Y3)+ FINE(X+H,Y4)) 102 X=X+H; Y=Y2; Y3=Y5 120 PRINT X “(“;USING “###.###”;I: 122 PRINT ”)=“;USING “###.###”;X; 130 PRINT Y2 “(“I”)=“;USING “###.###”;Y2; 140 PRINT Y5 “(“I”)=“;USING “###.###”;Y5 180 NEXT I 200 END RUN Birinchi tartibli differentsial tenglamasi uchun Koshi masalasining taqribiy yechimini Eylerning takomillashgan usulida hisoblash. 1-takomillashtirish 2-takomillashtirish X(1)=0.20 Y2(1)=1.1836 Y5 (1)=1.1867 X(2)= 0.40 Y2(2)= 1.3427 Y5 (2)=1.3483 X(3)= 0.60 Y2 (3)= 1.4850 Y5 (3)=1.4937 X(4)= 0.80 Y2 (4)= 1.6152 Y5 (4)=1.6279 X(5)= 1.0 Y2 (5)= 1.7362 Y5 (5)=1.7542 9.3- Paskal tili dasturi {Birinchi tartibli differentsial tenglama } {Y1=F(X,Y) uchun} {Koshi masalasini Eylerning takomillashgan usulida} {taqribiy yechimini topish} program AILER3(output,INPUT); function fne(x,y:real):real; begin fne:=Y-2*X/Y; end; var x,y,y1,y2,y3,y4,y5,b,h:real; i,n:integer; begin writeln(' x=','y=',' n=',' b='); readln(x,y,n,b); h:=(b-x)/n; for i:=1 to n BEGIN y1:=y+h*fne(x,y)/2; y2:=y+h*fne(x+h/2,y1); y4:=y3+h*fne(x,y3); y5:=y3+h*(fne(x,y3)+fne(x+h,y4))/2; x:=x+h; y:=y2; y3:=y5; writeln; write(' x(',I:2,')=',x:8:4); WRITE(' y2(',I:2,')=',Y2:8:4); write(' y5(',I:2,')=',Y5:8:4); END; end. O‘z-o‘zini tekshirishuchun savollar: Birinchi tartibli differentsial tenglamalari uchun Koshi masalasi Birinchi tartibli differentsial tenglama taqribiy uchimini Eyler usuli yordamida qanday topiladi? Birinchi tartibli differentsial tenglama taqribiy uchimi Eylerning ketma-ket yaqinlashish usuli yordamida qanday topiladi? Birinchi tartibli differentsial tenglama taqribiy uchimini topishda Eyler va Eylerning ketma-ket yaqinlashish usulidan farqini tushintiring? Echim aniqligini baholashni aniqlovchi shartni yozing. Download 240.28 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling