Riemann Sums

Suppose that a function f(x) is continuous on a closed interval [a, b]. The graph of a function f(x) over a closed interval [a, b] is shown below, which may have positive values as well as negative values.

We then partition the interval [a, b] into 'n' sub-intervals by choosing n – 1 points, say x_{1}, x_{2}, x_{3}, x_{4}, x_{5}, . . . . . . . . . . ., x_{n – 1}, between a and b subject only to the condition that a = x_{0} < x_{1} < x_{2} < . . . . . . . . . . . < x_{n – 1} < x_{n} = b. The set P = {x_{0}, x_{1}, x_{2}, . . ., x_{n}} is called a partition of the closed interval [a, b].

The partition P = {a = x_{0}, x_{1}, x_{2}, x_{3}, . . ., x_{n} = b} divides the closed interval [a, b] into 'n' sub-intervals called [x_{0}, x_{1}], [x_{1}, x_{2}], [x_{2}, x_{3}], . . ., [x_{i – 1}, x_{i}], . . ., [x_{n – 1}, x_{n}] of lengths Δx_{1}, Δx_{2}, Δx_{3}, . . ., Δx_{i}, . . ., Δx_{n}.

In each sub-interval, we select some number. Denote the number chosen from the i^{th} sub-interval by c_{i}. Then, on each sub-interval we stand a vertical rectangle that reaches from the x-axis to touch the curve at (c_{i}, f(c_{i})). These rectangles could lie either above or below the x-axis.

On each sub-interval, we form the product f(c_{i}) . Δx_{i}. This product can be positive, negative or zero, depending on the value of f(c_{i}). Finally, we take the sum of these products: S_{n} = **f(c**_{i})Δx_{i}. This sum, which depends on the partition P and the choice of the numbers c_{i}, is a **Riemann sum for f(x) on the interval [a, b].**

If we take the sample points to be right hand endpoints of the sub-intervals, then c_{i} = x_{i} and the Riemann sum = **f(x**_{i})Δx_{i}. If we take the sample points to be left hand endpoints of the sub-intervals, then c_{i} = x_{i – 1} and the Riemann sum = **f(x**_{i – 1})Δx_{i}.