trapz function

Numerical integration using the trapezoidal rule