% Employing the Composite Midpoint Rule

% Input endpoints
a=0;
b=1;
% Input number of subintervals (even number)
n=10;

h=(b-a)/(n+2);
XI1=0;

for i=0:n/2
   X=a+(2*i+1)*h;
   XI1=XI1+intf(X);
end
XI=2*h*XI1;
display(XI)


