From a user's perspective, integral calculus has a strange paradox. You're told that for any continuous function, the area under its graph (roughly its integral) exists. However, there is an exact paper-and-pencil method for finding integrals only for a tiny minority of continuous functions, and a large part of the art of calculus consists of guessing which of the various methods (integration by parts, substitution, partial fractions, ...) will work on a particular function. This sort of thing is difficult (probably impossible) to specify in an algorithm for a computer, so we use numerical methods to find a number sufficiently close to a definite integral.
The idea is to divide up the values our function
is defined
on into a group of intervals. Over each interval, we make an estimate
of our function whose integral we already know. As we partition into
smaller and smaller intervals, we get closer approximations of our
desired integral.
If a typical subinterval is , then the simplest approximation
of the area under the graph is the rectangle with base of length
and height of
at the midpoint. This leads to the midpoint or
rectangle rule:
A better approximation of our function might be gained by drawing a
line segment between and
, called the trapezoid rule:
If the function might be well-approximated by a quadratic curve (parabola), then we use the two endpoints and the midpoint to determine a unique parabola, and use Simpson's rule:
Which rule to use means making judgements about the nature of the function being approximated, and are beyond the scope of this brief description.