function I = Regla_Trapezoidal(f, a, b, N)

h = abs(b-a)/N;

suma = f(a); 

for k=1:N-1
    suma = suma + 2*f(a+h*k);
end;
suma = suma + f(b);

I = (b-a)*suma/(2*N);

end