AP Calculus AB

Lesson 14: Riemann Sums and the Definite IntegralAP

🎧 Listen to this lesson

Antidifferentiation answers "what function has this derivative?" The definite integral answers a different question: "how much has accumulated?" — distance from a velocity, volume from a flow rate, area from a curve. CED Unit 6 (topics 6.1–6.3) builds the answer from finite sums: chop the interval into pieces, approximate the accumulation on each piece by a rectangle, add, and take the limit as the pieces shrink. These finite approximations — Riemann sums — are themselves heavily examined, especially from tables.

Riemann sums: the four standard flavours

Divide [a, b] into n subintervals of width Δx = (b − a)/n. On each subinterval pick a sample point: the left endpoint (LRAM), right endpoint (RRAM), or midpoint (MRAM); or use trapezoids (the trapezoidal rule, the average of LRAM and RRAM for the same partition). The sum Σ f(x_i)·Δx approximates ∫_a^b f(x) dx, and:

Definition. ∫_a^b f(x) dx = lim(n→∞) Σ f(x_i*) Δx, when the limit exists (it does for every continuous f).

Over- and under-estimates. If f is increasing: LRAM underestimates, RRAM overestimates. If f is decreasing: the reverse. If f is concave up: trapezoids overestimate and midpoints underestimate; concave down reverses both. These comparisons are pure reasoning and appear on the exam with no computation at all.

Worked Example 1: a velocity table (numerical — the exam's signature problem)

Problem. A car's velocity v(t) (m/s) is recorded every second: t = 0, 1, 2, 3, 4 with v = 2, 5, 9, 8, 6. Estimate the distance travelled in 4 s using left, right, and trapezoidal sums.

Left sum  (t = 0..3):  1·(2 + 5 + 9 + 8) = 24 m
Right sum (t = 1..4):  1·(5 + 9 + 8 + 6) = 28 m
Trapezoidal: (24 + 28)/2 = 26 m

Answer: ≈ 26 m by the trapezoidal rule. Because v rises then falls (not monotonic), neither the left nor the right sum can be certified as the over-estimate — saying so, when a problem asks, is worth marks. The units multiply out (m/s × s = m); on FRQs a Riemann sum without correct units is unfinished.

Worked Example 2: midpoint sum versus the exact value

Problem. Approximate ∫_0^2 x^2 dx with a midpoint sum, n = 4, and compare with the exact value 8/3 ≈ 2.667.

Δx = 0.5; midpoints: 0.25, 0.75, 1.25, 1.75
f values: 0.0625, 0.5625, 1.5625, 3.0625;  sum = 5.25
M4 = 0.5 × 5.25 = 2.625
(Trapezoidal for comparison: 0.5 × (0/2 + 0.25 + 1 + 2.25 + 4/2) = 2.75.)

Answer: M4 = 2.625, an underestimate — as theory predicts for a concave-up function, since each midpoint rectangle's top edge (the tangent at the midpoint) lies below the curve. The trapezoidal value 2.75 overestimates for the same reason. Exact answers come next lesson; note how both estimates bracket 8/3, which is the real function of an approximation pair.

Worked Example 3: evaluating integrals geometrically

Problem. Evaluate (i) ∫ from −3 to 3 of sqrt(9 − x^2) dx; (ii) ∫ from 1 to 5 of (x − 3) dx.

(i) y = sqrt(9 − x^2) is the upper semicircle of radius 3.
    Area = (1/2)π(3)^2 = 9π/2 ≈ 14.14.
(ii) y = x − 3 is a line crossing zero at x = 3.
    Triangle below the axis on [1, 3]: base 2, height 2 → area 2, signed −2.
    Triangle above the axis on [3, 5]: base 2, height 2 → +2.
    Total: 0.

Answers: 9π/2 and 0. The definite integral is signed area: regions below the axis count negative. Confusing "integral" with "area" is the error this example exists to prevent — the two coincide only when the integrand is nonnegative.

Properties of the definite integral

  • ∫_a^a f = 0 and ∫_a^b f = −∫_b^a f (reversing bounds flips the sign)
  • ∫_a^b f + ∫_b^c f = ∫_a^c f (interval additivity — splits at kinks and zeros)
  • ∫_a^b (f ± g) = ∫ f ± ∫ g; ∫_a^b k·f = k ∫ f
  • If f ≤ g on [a, b], then ∫ f ≤ ∫ g on [a, b] (comparison)

Quick use. Given ∫ from 0 to 5 of f = 7 and ∫ from 3 to 5 of f = 4, then ∫ from 0 to 3 of f = 7 − 4 = 3, by additivity. Half of the exam's "given these integrals, find that one" items are this single move.

Real-world application: from rain gauge rates to rainfall

A weather station records rainfall *rate* (mm per hour) every 3 hours during a storm: 0, 4, 9, 7, 2 mm/h at t = 0, 3, 6, 9, 12. The trapezoidal estimate of total rainfall is 3 × (0/2 + 4 + 9 + 7 + 2/2) = 3 × 21 = 63 mm. This is not a classroom fiction: hydrological services publish storm totals computed exactly this way from rate telemetry, and the same rate-times-time accumulation gives drug doses from infusion pumps, charge from current, and production totals from line-speed sensors. Wherever a rate is measured and a total is wanted, a Riemann sum is already running.

Common mistakes

  • Certifying over/under-estimates without monotonicity. Left and right sums are only classifiable when f is monotonic on the interval; a table that rises then falls certifies neither.
  • Trapezoid arithmetic with unequal widths or using n = number of table rows instead of number of subintervals (5 rows = 4 subintervals).
  • Reporting "area" when the integral is signed. ∫ (x − 3) from 1 to 5 is 0, not 4 — the question's wording decides.
  • Dropping units in applied sums: rate (gal/min) × time (min) = gallons; state them.
Try it. Using the velocity table of Worked Example 1, compute the left and right Riemann sums with only the values at t = 0, 2, 4 (n = 2), and confirm that their average is again the trapezoidal estimate. Then evaluate ∫ from 0 to 4 of sqrt(16 − x^2) dx by recognising a quarter circle of radius 4, and evaluate ∫ from −2 to 2 of x^3 dx using symmetry (odd function, symmetric interval).

AP Exam Experience

1. A table gives v(t) at t = 0, 2, 4, 6 as 3, 7, 6, 5 (units: feet per second). Using the trapezoidal rule with the subintervals given, the approximate distance travelled from t = 0 to t = 6 is

  • (A) 30 ft
  • (B) 32 ft
  • (C) 34 ft
  • (D) 36 ft

Answer: (C). Δt = 2; T = 2 × (3/2 + 7 + 6 + 5/2) = 2 × 17 = 34 ft. Halving the two endpoint values (and only the endpoints) is the whole rule.

2. (No calculator.) ∫ from −2 to 2 of sqrt(4 − x^2) dx =

  • (A) π
  • (B) 2π
  • (C) 4π
  • (D) 8π

Answer: (B). The integrand is the upper semicircle of radius 2; the integral is its area, (1/2)π(2)^2 = 2π. No antiderivative is needed — recognising the geometry is the skill.

3. If ∫ from 1 to 4 of f(x) dx = 6 and ∫ from 1 to 4 of g(x) dx = −2, then ∫ from 1 to 4 of (3f(x) − 2g(x)) dx =

  • (A) 10
  • (B) 14
  • (C) 22
  • (D) 26

Answer: (C). Linearity: 3(6) − 2(−2) = 18 + 4 = 22. The doubled negative is the trap — a "minus 2g" with g itself negative adds.

Free-response question. Water flows into a tank at rate r(t) gallons per minute. Values of r are recorded in the table: r(0) = 5, r(10) = 8, r(20) = 6, r(30) = 9, r(40) = 7.

(a) Use a trapezoidal sum with the four subintervals given by the table to estimate the total number of gallons that flowed into the tank during the 40 minutes. (b) Compute the left and right Riemann sums for the same data, and explain how they relate to your answer in (a). (c) Explain the meaning of ∫ from 0 to 40 of r(t) dt in the context of this problem, including units.

Scoring guideline.

  • (a) 2 points. 1 point for the trapezoidal setup with Δt = 10 and endpoints halved: 10 × (5/2 + 8 + 6 + 9 + 7/2); 1 point for the value 290 gallons.
  • (b) 2 points. 1 point for the left sum 10 × (5 + 8 + 6 + 9) = 280 and the right sum 10 × (8 + 6 + 9 + 7) = 300. 1 point for the observation that the trapezoidal estimate (a) is their average, (280 + 300)/2 = 290 — true for any equally spaced partition.
  • (c) 1 point. The integral is the total volume of water (in gallons) that entered the tank over the 40-minute period — accumulated rate × time — i.e., the quantity estimated in (a). Answers saying "area under the curve" without the contextual interpretation earn no point.

Additional worked practice

The trapezoidal rule has one exactness worth knowing: it is exact for linear integrands, because a trapezoid under a straight segment *is* the region, not an approximation of it. Check with ∫ from 0 to 1 of x dx using n = 2: Δx = 0.5, values 0, 0.5, 1, and T = 0.5 × (0/2 + 0.5 + 1/2) = 0.5 × 1 = 0.5, the exact value. Everywhere else the rule's error is a concavity tax (Lesson 14): positive for concave-up integrands, negative for concave-down, and shrinking like 1/n^2 as the partition refines — doubling the rectangles quarters the trapezoidal error, roughly. Midpoint sums share the 1/n^2 rate with the opposite sign and about half the constant, which is why the two estimates bracket the truth so usefully in Worked Example 2.

Extension: a Riemann sum evaluated exactly, with sigma notation

Finite sums become definite integrals by a limit — and occasionally the limit can be computed by hand. For ∫ from 0 to 1 of x dx, use n right rectangles: Δx = 1/n, sample points x_k = k/n, so the sum is Σ (k/n)(1/n) for k = 1..n = (1/n^2) Σ k = (1/n^2) · n(n + 1)/2 = (n + 1)/(2n). As n → ∞ this tends to 1/2 — matching the triangle's area, as it must. The sum formula Σ k = n(n + 1)/2 did all the work; similar closed forms for Σ k^2 and Σ k^3 evaluate ∫ x^2 and ∫ x^3 the same way (tediously), which is historically how these integrals were first computed before the FTC made the exercise optional.

One more symmetry worth banking: for an odd function (f(−x) = −f(x)), ∫ from −a to a of f = 0 exactly — the two halves cancel. For an even function, the same integral is 2 ∫ from 0 to a. Half of the "impossible-looking" symmetric integrals on the exam dissolve the moment symmetry is checked.

📊 Interactive

Interactive — hover or explore the chart above.

Keep reading to complete this lesson