The Core Idea

How do you find the area under a curve? Divide the region into thin rectangles, compute each area, and add them up. As rectangles get thinner, the approximation approaches the exact area — the definite integral.

The Notation

For n rectangles on [a, b], each has width Δx = (b−a)/n. The Riemann sum is:

S = Σ f(xᵢ*) · Δx where i goes from 1 to n

Three Types

📋 Left, Right, and Midpoint Rules
Leftxᵢ* = a + (i−1)Δx — use left endpoint of each subinterval
Rightxᵢ* = a + iΔx — use right endpoint
Midpointxᵢ* = a + (i−½)Δx — most accurate of the three

Worked Example

📋 Approximate ∫₀² x² dx with n=4 right rectangles
Step 1Δx = 0.5. Right endpoints: 0.5, 1, 1.5, 2
Step 2f values: 0.25, 1, 2.25, 4
Step 3Sum = 0.5(0.25+1+2.25+4) = 3.75 (exact is 8/3 ≈ 2.667)

The Definite Integral as a Limit

ab f(x) dx = limn→∞ Σ f(xᵢ*) · Δx

Frequently Asked Questions

Which type is most accurate?
The midpoint rule is generally the most accurate of the three basic types. The Trapezoid Rule and Simpson's Rule are even more accurate for smooth functions.
Do I ever compute Riemann sums by hand?
Rarely in practice — you use the Fundamental Theorem instead. But understanding Riemann sums is essential for understanding what an integral actually means.

Why Rectangles Work

The genius of Riemann sums is that any area, no matter how curved the boundary, can be approximated by rectangles. Rectangles have a simple area formula: width times height. The narrower you make them, the better they fit the curve, and the smaller the gaps between the rectangle tops and the actual curve become.

Think of it like filling a bathtub with thin vertical slabs of water. Each slab has a rectangular cross-section. A thousand thin slabs approximates the shape of the tub far better than ten fat ones. The integral is the limit where the slabs are infinitely thin.

The Formal Limit Definition

The definite integral is defined as the limit of Riemann sums as the partition gets infinitely fine:

ab f(x) dx = limn→∞ Σ f(xᵢ*) · Δx

The notation Σ means "sum". xᵢ* is the sample point chosen in each subinterval — choosing the left endpoint, right endpoint, or midpoint gives the three standard Riemann sum types. The remarkable fact is that for any continuous function, all three choices give the same limit.

Which Sum Is Most Accurate?

For the same number of rectangles n, the midpoint rule typically gives the most accurate result, followed by the trapezoid rule (average of left and right), then the left and right rules. This is because the midpoint better captures the "average" height of the function over each interval.

Here is a concrete comparison for ∫₀¹ x² dx (exact answer = 1/3):

📋 Accuracy comparison with n = 4
Left sum= 0.25(0 + 0.0625 + 0.25 + 0.5625) = 0.2188 — error: 0.115
Right sum= 0.25(0.0625 + 0.25 + 0.5625 + 1) = 0.4688 — error: 0.135
Midpoint= 0.25(0.0156 + 0.1406 + 0.3906 + 0.7656) = 0.3281 — error: 0.005
Exact1/3 ≈ 0.3333

Signed vs Unsigned Area

Riemann sums compute signed area. When f(x) is negative, the rectangles have negative height, so they contribute negative area to the sum. The definite integral ∫ₐᵇ f(x)dx gives the net signed area — positive regions minus negative regions. If you want the total area regardless of sign, you need ∫ₐᵇ |f(x)| dx.

Common Confusion

∫₀^(2π) sin(x) dx = 0 — not because there is no area, but because the positive area above the x-axis exactly cancels the negative area below. The total unsigned area is 4.

The Step from Sums to the FTC

Riemann sums are important not just as an approximation method — they explain what integration means. The Fundamental Theorem of Calculus then gives a shortcut: instead of taking the limit of rectangles every time, you can evaluate ∫ₐᵇ f(x) dx = F(b) − F(a) where F is any antiderivative of f. This shortcut only makes sense once you understand that the integral is, at its core, a limit of Riemann sums.

AM
Dr. Aisha Malik, PhD Mathematics
Senior Lecturer in Applied Mathematics · 12 years teaching calculus
Dr. Malik holds a PhD in Applied Mathematics from the University of Edinburgh and has taught calculus to over 4,000 students. She has reviewed this article for mathematical accuracy and pedagogical clarity.
Technically reviewed by: Prof. James Chen, Stanford Mathematics Department · April 2026