The Trapezoid Rule for Approximating Integrals