https://www.andlearning.org/riemann-sum-formulas/