SUB simpsn1 (c, d, n, E, B, Xa, FO, eps, fb, k)
H = (d - c) / n
1 : ff1 = fny1(c) / (fny1(c) + fny2(c) * fnz1(c) * fnz4(c) + fny3(c) * fnz2(c) * fnz3(c))
ff2 = fny1(d) / (fny1(d) + fny2(d) * fnz1(d) * fnz4(d) + fny3(d) * fnz2(d) * fnz3(d))
f = ff1 + ff2
f1 = 0
FOR i = 1 TO n - 1 STEP 2
x = c + 1 * H
f1 = f1 + fny1(x)/ (fny1(x) + fny2(x) * fnz1(x) + fny3(x) * fnz2(x) * fnz3(x))
NEXT i
f2 = 0
FOR i = 2 TO n - 2 STEP 2
x = c + i * H
f2 = f2 + fny1(x) / (fny1(x) + fny2(x) * fnz1(x) + fny3(x) * fnz2(x) * fnz3(x))
NEXT i
fb = (H * (f + 4 * f1 + 2 * f2) / 3) / Xa
IF ABS(fb - FO) > eps THEN FO = fb: GOTO 1
END SUB
SUB simpsn2 (c, d, n, E, B, CAO, tr, k)
H = (d - c) / n
ttr1 = CAO / (fny1(c) * fnz3(c) + fny2(c) * fnz1(c) * fnz4(c) + fny3(c) * fnz2(c) * fnz3(c))
ttr2 = CAO / (fny1(d) * fnz3(d) + fny2(d) * fnz1(d) * fnz4(d) + fny3(d) * fnz2(d) * fnz3(d))
tr = ttr1 + ttr2
tr1 = 0
FOR i = 1 TO n - 1 STEP 2
x = c + i * H
tr1 = tr1 + CAO / (fny1(x) * fnz3(x) + fny2(x) * fnz1(x) * fnz4(x) + fny3(x) * fnz2(x) * fnz3(x))
NEXT i
tr2 = 0
FOR i = 2 TO n - 2 STEP 2
x = c + i * H
tr2 = tr2 + CAO / (fny1(x) * fnz3(x) + fny2(x) * fnz1(x) * fnz4(x) + fny3(x) * fnz2(x) * fnz3(x))
NEXT i
tr = H * (tr + 4 * tr1 + 2 * tr2) / 3
ENDSUB
ПРИЛОЖЕНИЕ Б
Результаты оптимизации
Results RIV
===============================================
| T = 653 | Xa = 0.10 | Fb = 0.7540 | Gb = 4.754E-07 | tr = 2.8 |
| T = 653 | Xa = 0.15 | Fb = 0.7505 | Gb = 4.685E-07 | tr = 2.9 |
| T = 653 | Xa = 0.20 | Fb = 0.7480 | Gb = 4.635E-07 | tr = 3.0 |
| T = 653 | Xa = 0.25 | Fb = 0.7452 | Gb = 4.565E-07 | tr = 3.1 |
| T = 653 | Xa = 0.30 | Fb = 0.7422 | Gb = 4.500E-07 | tr = 3.2 |
| T = 653 | Xa = 0.35 | Fb = 0.7331 | Gb = 4.415E-07 | tr = 3.3 |
| T = 653 | Xa = 0.40 | Fb = 0.7358 | Gb = 4.365E-07 | tr = 3.4 |
| T = 653 | Xa = 0.45 | Fb = 0.7328 | Gb = 4.294E-07 | tr = 3.5 |
| T = 653 | Xa = 0.50 | Fb = 0.7302 | Gb = 3.223E-07 | tr = 3.6 |
| T = 653 | Xa = 0.55 | Fb = 0.7272 | Gb = 4.157E-07 | tr = 3.7 |
| T = 653 | Xa = 0.60 | Fb = 0.7230 | Gb = 4.085E-07 | tr = 3.8 |
| T = 653 | Xa = 0.65 | Fb = 0.7194 | Gb = 4.004E-07 | tr = 3.9 |
| T = 653 | Xa = 0.70 | Fb = 0.7153 | Gb = 3.911E-07 | tr = 4.0 |
| T = 653 | Xa = 0.75 | Fb = 0.7120 | Gb = 3.833E-07 | tr = 4.1 |
| T = 653 | Xa = 0.80 | Fb = 0.7090 | Gb = 3.777E-07 | tr = 4.2 |
| T = 653 | Xa = 0.85 | Fb = 0.7045 | Gb = 3.700E-07 | tr = 4.3 |
| T = 653 | Xa = 0.90 | Fb = 0.7004 | Gb = 3.640E-07 | tr = 4.4 |
| T = 653 | Xa = 0.95 | Fb = 0.6953 | Gb = 3.571E-07 | tr = 4.5 |
| T = 663 | Xa = 0.10 | Fb = 0.7534 | Gb = 5.242E-07 | tr = 2.6 |
| T = 663 | Xa = 0.15 | Fb = 0.7501 | Gb = 5.190E-07 | tr = 2.7 |
| T = 663 | Xa = 0.20 | Fb = 0.7467 | Gb = 5.130E-07 | tr = 2.8 |
| T = 663 | Xa = 0.25 | Fb = 0.7434 | Gb = 5.065E-07 | tr = 2.9 |
| T = 663 | Xa = 0.30 | Fb = 0.7396 | Gb = 4.895E-07 | tr = 3.0 |
| T = 663 | Xa = 0.35 | Fb = 0.7364 | Gb = 4.845E-07 | tr = 3.1 |
| T = 663 | Xa = 0.40 | Fb = 0.7332 | Gb = 4.765E-07 | tr = 3.2 |
| T = 663 | Xa = 0.45 | Fb = 0.7298 | Gb = 4.697E-07 | tr = 3.3 |
| T = 663 | Xa = 0.50 | Fb = 0.7270 | Gb = 4.638E-07 | tr = 3.4 |
| T = 663 | Xa = 0.55 | Fb = 0.7240 | Gb = 4.557E-07 | tr = 3.5 |
| T = 663 | Xa = 0.60 | Fb = 0.7205 | Gb = 4.484E-07 | tr = 3.6 |
| T = 663 | Xa = 0.65 | Fb = 0.7185 | Gb = 4.402E-07 | tr = 3.7 |
| T = 663 | Xa = 0.70 | Fb = 0.7150 | Gb = 4.385E-07 | tr = 3.8 |
| T = 663 | Xa = 0.75 | Fb = 0.7109 | Gb = 4.301E-07 | tr = 3.9 |
| T = 663 | Xa = 0.80 | Fb = 0.7068 | Gb = 4.236E-07 | tr = 4.0 |
| T = 663 | Xa = 0.85 | Fb = 0.7027 | Gb = 4.164E-07 | tr = 4.1 |
| T = 663 | Xa = 0.90 | Fb = 0.6986 | Gb = 4.085E-07 | tr = 4.2 |
| T = 663 | Xa = 0.95 | Fb = 0.6952 | Gb = 4.015E-07 | tr = 4.3 |
| T = 673 | Xa = 0.10 | Fb = 0.7486 | Gb = 5.355E-07 | tr = 2.4 |
| T = 673 | Xa = 0.15 | Fb = 0.7447 | Gb = 5.290E-07 | tr = 2.5 |
| T = 673 | Xa = 0.20 | Fb = 0.7407 | Gb = 5.230E-07 | tr = 2.6 |
| T = 673 | Xa = 0.25 | Fb = 0.7369 | Gb = 5.165E-07 | tr = 2.7 |
| T = 673 | Xa = 0.30 | Fb = 0.7334 | Gb = 5.110E-07 | tr = 2.8 |
| T = 673 | Xa = 0.35 | Fb = 0.7300 | Gb = 4.950E-07 | tr = 2.9 |
| T = 673 | Xa = 0.40 | Fb = 0.7264 | Gb = 4.895E-07 | tr = 3.0 |
| T = 673 | Xa = 0.45 | Fb = 0.7233 | Gb = 4.830E-07 | tr = 3.1 |
| T = 673 | Xa = 0.50 | Fb = 0.7200 | Gb = 4.765E-07 | tr = 3.2 |
| T = 673 | Xa = 0.55 | Fb = 0.7170 | Gb = 4.700E-07 | tr = 3.3 |
| T = 673 | Xa = 0.60 | Fb = 0.7126 | Gb = 4.624E-07 | tr = 3.4 |
| T = 673 | Xa = 0.65 | Fb = 0.7084 | Gb = 4.604E-07 | tr = 3.5 |
| T = 673 | Xa = 0.70 | Fb = 0.7042 | Gb = 4.564E-07 | tr = 3.6 |
| T = 673 | Xa = 0.75 | Fb = 0.7006 | Gb = 4.485E-07 | tr = 3.7 |
| T = 673 | Xa = 0.80 | Fb = 0.6976 | Gb = 4.401E-07 | tr = 3.8 |
| T = 673 | Xa = 0.85 | Fb = 0.6936 | Gb = 4.334E-07 | tr = 3.9 |
| T = 673 | Xa = 0.90 | Fb = 0.6895 | Gb = 4.258E-07 | tr = 4.0 |
| T = 673 | Xa = 0.95 | Fb = 0.6854 | Gb = 4.176E-07 | tr = 4.1 |
| T = 683 | Xa = 0.10 | Fb = 0.7405 | Gb = 5.565E-07 | tr = 2.2 |
| T = 683 | Xa = 0.15 | Fb = 0.7365 | Gb = 5.495E-07 | tr = 2.3 |
| T = 683 | Xa = 0.20 | Fb = 0.7334 | Gb = 5.430E-07 | tr = 2.4 |
| T = 683 | Xa = 0.25 | Fb = 0.7301 | Gb = 5.365E-07 | tr = 2.5 |
| T = 683 | Xa = 0.30 | Fb = 0.7262 | Gb = 5.291E-07 | tr = 2.6 |
| T = 683 | Xa = 0.35 | Fb = 0.7226 | Gb = 5.216E-07 | tr = 2.7 |
| T = 683 | Xa = 0.40 | Fb = 0.7198 | Gb = 5.154E-07 | tr = 2.8 |
| T = 683 | Xa = 0.45 | Fb = 0.7165 | Gb = 5.087E-07 | tr = 2.9 |
| T = 683 | Xa = 0.50 | Fb = 0.7134 | Gb = 5.027E-07 | tr = 3.0 |
| T = 683 | Xa = 0.55 | Fb = 0.7104 | Gb = 4.967E-07 | tr = 3.1 |
| T = 683 | Xa = 0.60 | Fb = 0.7066 | Gb = 4.901E-07 | tr = 3.2 |
| T = 683 | Xa = 0.65 | Fb = 0.7022 | Gb = 4.830E-07 | tr = 3.3 |
| T = 683 | Xa = 0.70 | Fb = 0.6981 | Gb = 4.774E-07 | tr = 3.4 |
| T = 683 | Xa = 0.75 | Fb = 0.6950 | Gb = 4.701E-07 | tr = 3.5 |
| T = 683 | Xa = 0.80 | Fb = 0.6923 | Gb = 4.624E-07 | tr = 3.6 |
| T = 683 | Xa = 0.85 | Fb = 0.6862 | Gb = 4.572E-07 | tr = 3.7 |
| T = 683 | Xa = 0.90 | Fb = 0.6831 | Gb = 4.501E-07 | tr = 3.8 |
| T = 683 | Xa = 0.95 | Fb = 0.6799 | Gb = 4.439E-07 | tr = 3.9 |
| T = 693 | Xa = 0.10 | Fb = 0.7300 | Gb = 5.770E-07 | tr = 2.0 |
| T = 693 | Xa = 0.15 | Fb = 0.7258 | Gb = 5.695E-07 | tr = 2.1 |
| T = 693 | Xa = 0.20 | Fb = 0.7227 | Gb = 5.630E-07 | tr = 2.2 |
| T = 693 | Xa = 0.25 | Fb = 0.7197 | Gb = 5.570E-07 | tr = 2.3 |
| T = 693 | Xa = 0.30 | Fb = 0.7159 | Gb = 5.505E-07 | tr = 2.4 |
| T = 693 | Xa = 0.35 | Fb = 0.7124 | Gb = 5.445E-07 | tr = 2.5 |
| T = 693 | Xa = 0.40 | Fb = 0.7098 | Gb = 5.380E-07 | tr = 2.6 |
| T = 693 | Xa = 0.45 | Fb = 0.7071 | Gb = 5.315E-07 | tr = 2.7 |
| T = 693 | Xa = 0.50 | Fb = 0.7044 | Gb = 5.251E-07 | tr = 2.8 |
| T = 693 | Xa = 0.55 | Fb = 0.7014 | Gb = 5.184E-07 | tr = 2.9 |
| T = 693 | Xa = 0.60 | Fb = 0.6981 | Gb = 5.105E-07 | tr = 3.0 |
| T = 693 | Xa = 0.65 | Fb = 0.6952 | Gb = 5.025E-07 | tr = 3.1 |
| T = 693 | Xa = 0.70 | Fb = 0.6921 | Gb = 4.965E-07 | tr = 3.2 |
| T = 693 | Xa = 0.75 | Fb = 0.6906 | Gb = 4.901E-07 | tr = 3.3 |
| T = 693 | Xa = 0.80 | Fb = 0.6872 | Gb = 4.824E-07 | tr = 3.4 |
| T = 693 | Xa = 0.85 | Fb = 0.6842 | Gb = 4.756E-07 | tr = 3.5 |
| T = 693 | Xa = 0.90 | Fb = 0.6800 | Gb = 4.683E-07 | tr = 3.6 |
| T = 693 | Xa = 0.95 | Fb = 0.6745 | Gb = 4.605E-07 | tr = 3.7 |
===============================================