clear all

global count

f = @(x) 1./(1e-4 + x.^2);
a = 0; b = 1;
neq = 1000; nad = 100;
% Exact integral value
Qex = 100*atan(100);

% Equidistant composite Simpson rule
% TODO:





% Adaptive composite Simpson rule
% TODO










figure()
loglog(ceq, err, '--k', cad, errAd, '-r');
legend('Equidistant Simpson', 'Adaptive Simpson');
xlabel('Number of function evaluations');
ylabel('Error of Quadrature');
