function B = compboole(a,b,N)
% Composite Boole's Rule for function f(x) 
% on [a,b] using 4N steps
f = @(x) exp(x);
h = (b-a)/(4*N);
i = 0:N-1;
xi = a+4*i*h;
xi1 = a+4*(i+0.25)*h;
xi2 = a+4*(i+0.5)*h;
xi3 = a+4*(i+0.75)*h;
xi4 = a+4*(i+1)*h;
B = (2*h/45)*sum(7*f(xi)+32*f(xi1)+12*f(xi2)...
    +32*f(xi3)+7*f(xi4));
end

