Скачиваний:
26
Добавлен:
09.12.2013
Размер:
1.15 Кб
Скачать
Program IntBank;
Uses CRT;
Const a=0;
b=1;
eps=0.001;
t1=0.5773;
t2=0.7071;
t3=0.7947;
t4=0.1876;

Var x1,x2,pogr,pogrS,e,
int1,int2,int3,int,eps1:real;
i:integer;

Function x(t,a,b:real):real;
begin
x:=(a+b)/2+(b-a)/2*t;
end;

function f(x:real):real;
begin
f:=(x*x)*sin(4*ln(x))/ln(x)
end;

Begin
clrscr;
x1:=a;x2:=b;e:=eps;
int:=0;pogrS:=0;i:=1;
repeat
int1:=(x2-x1)/2*(f(x(t1,x1,x2))+f(x(-t1,x1,x2)));
int2:=(x2-x1)/3*(f(x(t2,x1,x2))+f(x(-t2,x1,x2))+f(x(0,x1,x2)));
int3:=(x2-x1)/4*(f(x(t3,x1,x2))+f(x(-t3,x1,x2))+f(x(t4,x1,x2))+f(x(-t4,x1,x2)));
pogr:=abs(int2-int1)/2;
eps1:=e*(x2-x1)/(b-a);
if pogr<=eps1 then
begin
int:=int+int3;
pogrS:=pogrS+pogr;
writeln('a[',i,']=',x1:0:6);
writeln('b[',i,']=',x2:0:6);
writeln('I[',i,']=',int2:0:12);
writeln('R[',i,']=',pogr:0:12);
writeln('E[',i,']=',e*(x2-x1)/(b-a):0:12);
writeln;
{readkey;}
x1:=x2;
x2:=b;
i:=i+1;
end
else x2:=(x2+x1)/2;
until b=x1;
writeln('SumI=',int:0:12);
writeln('SumR=',pogrS:0:12);
readln;
end.
Соседние файлы в папке 2ЛАБА~1
  • #
    09.12.20132.23 Кб25BANKMOY.BAK
  • #
    09.12.201321.5 Кб25BANKMOY.EXE
  • #
    09.12.20132.23 Кб27BANKMOY.PAS
  • #
    09.12.20131.15 Кб25INTMOY.BAK
  • #
    09.12.201319.3 Кб25INTMOY.EXE
  • #
    09.12.20131.15 Кб26INTMOY.PAS
  • #
    09.12.20135.93 Кб25INT_MX44.BAK
  • #
    09.12.201320.7 Кб25INT_MX44.EXE
  • #
    09.12.20135.93 Кб27INT_MX44.PAS
  • #
    09.12.20132.25 Кб25L2.BAK
  • #
    09.12.20132.25 Кб26L2.PAS