Simpson 1
a = 0; % Lower limit
b = 3; % Upper limit
n = 6; % Number of subintervals
if mod(n, 3) ~= 0
end
% Step size
h = (b - a) / n;
fprintf('The integral of the function over [%f, %f] is approximately %f\n', a, b, integral);