A Riemann sum is a finite weighted sum used in calculus to approximate a definite integral. It divides an interval into smaller subintervals, evaluates a function at a selected point in each, and adds the products of these values and the corresponding widths. Geometrically, the terms represent signed rectangular areas. Under appropriate conditions, their limit defines the Riemann integral. The construction is named after Bernhard Riemann. (math.hmc.edu)
Definition and notation
Let be a real-valued function, with . A partition of the interval is an ordered collection
Write . Choose a tag, or sample point, in each subinterval. The corresponding Riemann sum is
The widths need not be equal, and the tags need not follow any fixed rule or be chosen randomly. A partition together with its tags is called a tagged partition. (math.hmc.edu)
The mesh of the partition is its largest subinterval width:
This quantity controls the fineness of the approximation. Merely increasing the number of subintervals does not ensure that every width becomes small: one large subinterval could remain while others are repeatedly subdivided. Thus, general convergence statements require , rather than simply . (openstax.org)
Common sampling rules
For a uniform partition,
Three standard choices give the following sums:
These are the left-endpoint, right-endpoint, and midpoint sums. They differ only in where the function is sampled within each subinterval. (math.hmc.edu)
For an increasing monotonic function, the left sum underestimates its integral and the right sum overestimates it; for a decreasing function, the inequalities reverse. Without monotonicity, endpoint choice alone does not determine the direction of error. Midpoint sums also need not lie consistently above or below the integral without further assumptions. (math.hmc.edu)
The trapezoidal rule averages the endpoint sums:
Its usual geometric interpretation uses trapezoids rather than rectangles, distinguishing it from the standard single-sample Riemann-sum construction. (openstax.org)
Convergence and integrability
A bounded function is Riemann integrable on if there is a number such that, for every , some satisfies
for every tagged partition with . The requirement covers all sufficiently fine partitions and all choices of tags, not merely one convenient sequence of sums. The number is written . (math.ucdavis.edu)
Every continuous function on a closed bounded interval is integrable. Bounded monotonic functions and bounded functions with only finitely many discontinuities are integrable as well. More generally, Lebesgue’s criterion states that a bounded function is Riemann integrable exactly when its discontinuities form a null set—a set of Lebesgue measure zero. (math.ucdavis.edu)
For contrast, consider the function equal to at every rational number and elsewhere on . Rational tags produce sums equal to , while irrational tags produce sums equal to , however small the mesh becomes. It therefore has no Riemann integral, although its Lebesgue integral is zero. (math.ucdavis.edu)
Upper and lower sums
Darboux sums replace selected function values by bounds on each subinterval. Define
The lower and upper sums are
Every tagged Riemann sum lies between these two quantities. A bounded function is integrable precisely when partitions can make arbitrarily small. This provides a criterion that does not require knowing the integral beforehand. (math.libretexts.org)
The infimum and supremum need not be attained. Consequently, upper and lower Darboux sums are not always themselves tagged Riemann sums, although they bound all such sums for the same partition. (math.libretexts.org)
Example and numerical accuracy
For the polynomial on , uniform right-endpoint sampling gives
Thus . Applying the same summation calculation to left endpoints gives
Both approach the same integral, despite their different finite approximations. This is the unit-interval version of the standard sum-of-squares calculation. (openstax.org)
In numerical analysis, convergence and error estimates are distinct questions: convergence identifies the limiting value, while an error bound quantifies finite accuracy. If has a continuous second derivative and , the uniform midpoint rule satisfies
The bound describes how the guaranteed error decreases as the partition is refined. Riemann sums therefore support both the definition of integration and practical approximation when an antiderivative is unavailable or difficult to express. (openstax.org)