intgrat function

Numerical integration using a simple Trapezoidal rule