function [I] = comptrap(f,a,b,N)
h = (b-a) ./ N
x = linspace(a,b,N+1)
I = sum(f(x)) * h - h/2 * ( f(a) + f(b))
end