




We can approximate an integral by choosing n, iding the integration interval into n parts and using a Riemann sum as our approximation.
Let L_{n} be the result of computing the left Riemann sum in this way, and R_{n} be the right Riemann sum. The "trapezoid rule" is .
Here are explicit formulae for these approximate sums:
Simpson's rule works only for n even and gives different weight to the f(x_{k}) depending on the evenness or oddness of k: