Karrali integrallarni taqribiy hisoblash usullari reja karrali integral haqida ma’lumot
Download 89 Kb.
|
Hisoblash usullari mustaqil ish
C = FNF1(a): D = FNF2(b): PRINT "c="; C, " b="; b 'INPUT "C c = FNF1(a): d = FNF2(b): PRINT "c="; c, "d="; d 'INPUT "C=f1(a),B=f2(b) "; c, d 'INPUT "M= "; M M = FNF(b, d): PRINT "m="; M INPUT "Y=1"; y: IF y = 1 THEN 28 FOR I = 1 TO N X(I) = a + (b - a) * RND(1): y(I) = c + (d - c) * RND(1): Z(I) = M * RND(1) y1(I) = FNF1(X(I)): y2(I) = FNF2(X(I)): NEXT I PRINT " xi yi zi y1(i) y2(i) FNF(xi, yi)" FOR I = 1 TO N PRINT USING "###.#####"; X(I); y(I); Z(I); y1(I); y2(I); FNF(X(I), y(I)): NEXT I FOR I = 1 TO N 'IF y1(I) < y(I) AND y(I) < y2(I) THEN IF Z(I) < FNF(X(I), y(I)) THEN N1 = N1 + 1: xT(N1) = X(I): yT(N1) = y(I): ZT(N1) = Z(I) IF y1(I) < y(I) AND y(I) < y2(I) THEN N1 = N1 + 1: xT(N1) = X(I): yT(N1) = y(I): ZT(N1) = Z(I) NEXT I: PRINT "N1="; N1 INPUT "Y=1"; y: IF y = 1 THEN 73 FOR I = 1 TO N1 PRINT USING "####.#####"; xT(I); yT(I); ZT(I); FNF(xT(I), yT(I)) NEXT I: PRINT FOR I = 1 TO N1 IF ZT(I) < FNF(xT(I), yT(I)) THEN N2 = N2 + 1: xTT(N2) = xT(I): yTT(N2) = yT(I): ZTT(I) = ZT(I) NEXT I: PRINT "N2="; N2 PRINT " xtT(i) ytT(i) ztT(i) FNF(xtT(I), ytT(I))" FOR I = 1 TO N2 PRINT USING "####.#####"; xT(I); yT(I); ZT(I); FNF(xT(I), yT(I)) 'S = S + FNF(xT(I), yT(I)) NEXT I PRINT "w="; (b - a) * (d - c) s1 = (b - a) * (d - c) * N2 * M / N: PRINT " S1="; s1 N=10 A c= 0 d= 1 xi yi zi y1(i) y2(i) FNF(xi, yi) 0.70555 0.53342 0.00000 0.35277 0.70555 1.77240 0.28956 0.30195 0.00000 0.14478 0.28956 0.89346 0.01402 0.76072 0.00000 0.00701 0.01402 1.53546 0.70904 0.04535 0.00000 0.35452 0.70904 0.79974 0.86262 0.79048 0.00000 0.43131 0.86262 2.44358 0.96195 0.87145 0.00000 0.48098 0.96195 2.70484 0.94956 0.36402 0.00000 0.47478 0.94956 1.67759 0.76711 0.05350 0.00000 0.38356 0.76711 0.87412 0.46870 0.29817 0.00000 0.23435 0.46870 1.06503 0.64782 0.26379 0.00000 0.32391 0.64782 1.17541 N1= 4 xt(i) yt(i) zt(i) FNF(xt, yt) 0.70555 0.53342 0.00000 1.77240 0.86262 0.79048 0.00000 2.44358 0.96195 0.87145 0.00000 2.70484 0.46870 0.29817 0.00000 1.06503 S1=0 .4 Y=1
xi yi zi y1(i) y2(i) FNF(xi, yi) 2.82219 17.06957 3.47711 8.46657 22.57752 4.46002 1.15825 9.66234 4.64844 3.47475 9.26600 3.28947 0.05607 24.34315 4.88694 0.16821 0.44856 4.93956 2.83615 1.45129 2.48420 8.50846 22.68921 2.07061 3.45048 25.29536 2.24122 10.35143 27.60382 5.36151 3.84781 27.88627 0.33742 11.54344 30.78250 5.63330 3.79823 11.64860 3.14921 11.39468 30.38581 3.93024 3.06845 1.71214 3.55475 9.20534 24.54757 2.18646 1.87480 9.54129 3.73618 5.62440 14.99840 3.37877 2.59128 8.44137 1.67605 7.77385 20.73028 3.32154 3.31921 26.38727 3.53498 9.95762 26.55365 5.45036 3.94437 29.15086 1.36120 11.83312 31.55498 5.75285 2.78046 31.36010 1.46359 8.34139 22.24370 5.84299 2.13549 3.40383 5.99649 6.40648 17.08394 2.35358 2.70470 0.50253 3.45110 8.11411 21.63763 1.79087 0.40021 3.29672 4.79331 1.20063 3.20167 1.92274 1.13792 1.46077 1.77464 3.41376 9.10337 1.61205 1.52804 9.63106 5.69143 4.58413 12.22434 3.34052 3.91932 12.84398 1.66968 11.75795 31.35454 4.09430 0.64177 5.21029 3.87952 1.92530 5.13413 2.41910 N1= 10
Y=1 2.82219 17.06957 3.47711 4.46002 3.45048 25.29536 2.24122 5.36151 3.84781 27.88627 0.33742 5.63330 3.79823 11.64860 3.14921 3.93024 1.87480 9.54129 3.73618 3.37877 2.59128 8.44137 1.67605 3.32154 3.31921 26.38727 3.53498 5.45036 3.94437 29.15086 1.36120 5.75285 1.52804 9.63106 5.69143 3.34052 3.91932 12.84398 1.66968 4.09430
xtT(i) ytT(i) ztT(i) FNF(xtT(I), ytT(I)) 2.82219 17.06957 3.47711 4.46002 3.45048 25.29536 2.24122 5.36151 3.84781 27.88627 0.33742 5.63330 3.79823 11.64860 3.14921 3.93024 1.87480 9.54129 3.73618 3.37877 2.59128 8.44137 1.67605 3.32154 3.31921 26.38727 3.53498 5.45036 3.94437 29.15086 1.36120 5.75285 w= 128 S1= 307.2 Download 89 Kb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling