For functions represented as values on a regular
grid, integrals like the one of equation (3) can
be calculated, or rather approximated to increasing
accuracy, by a sum over grid points, as long as
the value of the integrand is known at every grid point:

Peter D. Haynes 2002-10-31