Riemann Sum

Calculus & Advanced Math

A Riemann sum approximates the area under a curve by adding up the areas of many thin rectangles placed under the graph.

Formula

S = \sum_{i=1}^{n} f(x_i^*) \, \Delta x
Visualization

Definition

A Riemann sum estimates the area under a curve by filling the region with many thin rectangles and adding up their areas; the more rectangles you use, the more accurate the estimate. Formally, it is $\sum_{i=1}^{n} f(x_i^*) \, \Delta x$, where the interval $[a,b]$ is partitioned into $n$ subintervals of width $\Delta x = (b-a)/n$ and $x_i^*$ is a sample point in the $i$th subinterval (left, right, or midpoint sums differ in the choice of $x_i^*$). Using an arbitrary partition with mesh $\|P\|$, $f$ is Riemann integrable if and only if for every $\epsilon > 0$ there exists $\delta$ such that $\|P\| < \delta$ implies $|S - L| < \epsilon$ for any Riemann sum $S$ and integral $L$; Lebesgue's criterion states $f$ is Riemann integrable iff it is bounded and its discontinuity set has measure zero.

Example

To estimate the area under $y = x^2$ from $0$ to $2$, divide into $4$ strips of width $0.5$ and add left-edge rectangle areas: $0(0.5) + 0.25(0.5) + 1(0.5) + 2.25(0.5) = 1.75$, versus the exact value $8/3 \approx 2.67$. A right Riemann sum with $n=4$ gives $x_i^* = 0.5, 1, 1.5, 2$ and sum $(0.25 + 1 + 2.25 + 4)(0.5) = 3.75$, still approximating the same $8/3$. Upper sums (using suprema) and lower sums (using infima) bracket the integral, and $f$ is integrable iff $\inf(\text{upper sums}) = \sup(\text{lower sums})$, the Darboux criterion.

Key Insight

Riemann sums show you HOW integration works, building a continuous area from discrete rectangular pieces; the midpoint rule is typically more accurate than left or right sums, and averaging left and right sums gives the trapezoidal rule. Riemann sums are the conceptual foundation of numerical integration (quadrature), and Gaussian quadrature optimizes the choice of sample points to achieve polynomial-exact integration with minimal evaluations.