Курсовая работа: Інтеграли зі змінними границями
for i:=0 to nTrap do
X[i]:=aTrap+h*i;
sum:=(y(X[0])+y(X[nTrap]))/2;
for i:=1 to (nTrap-1) do
sum:=sum+y(X[i]);
Result:=sum*h;
end;
//--------------------------------------------------------------
function FullIntegral(aFull,bFull:real):real;
var z1, z2, z3, raznost :real; i, ai, bi :integer;
begin
if(aFull<>bFull)then
begin
for i:=0 to (High(Xgrid)-1) do
begin
if((Xgrid[i]<=aFull)and(aFull<=Xgrid[i+1]))then ai:=i;
if((Xgrid[i]<=bFull)and(bFull<=Xgrid[i+1]))then bi:=i;
end;
raznost:=GridOfInt[ai]+integralTrapeciay(Xgrid[ai],aFull);
Result:=GridOfInt[bi]+integralTrapeciay(Xgrid[bi],bFull)-raznost;
end
else
Result:=0;
end;
//--------------------------------------------------------------
end.
unit UnitMAIN ;
interface
uses