Integrating means obtaining the area between a given curve (some f(x)), the x-axis and two intervals a and b. Mathematically, this is done by finding the antiderivative of the curve (some F(x)) and calculating F(b) – F(a). Unfortunately, finding the derivative isn’t always that easy. So, an approach is to estimate the area with much more simpler methods.


The first approach are the Riemann’s sums. The way this method works is by estimating n rectangles on the [a, b] interval. Adding these returns an approximation to the area. There are two types of sum: left and right. Each one takes the f(x) value as their name says.

To minimize the error, a similar method is used, but instead of using rectangles, trapezoids are used. Trapezoids are far more accurate than rectangles. The trapezoids sum is also the average between the left sum and the right sum.


Sometimes, straight lines (the ones used in trapezoids) aren’t that good for estimating. So, an alternative is to use actual polynomials. There are two main type of polynomials that can be used: quadratic and cubic.


Although Riemann methods are quite intuitive, they aren’t as exact as Simpson’s method. An approach to make them more precise is Romberg. This method uses k levels. In its first step, it calculates k different trapezoid sums, which take from 1 to 2^(k-1) trapezoids (only powers of two). After each one was calculated, we end up with k different integrals (obviously, the first one is less precise than the last one). Then, recursively, we group by two, until we end up with one single integral.