Riemann sums from section 3.32