Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Riemann sums and the definite integral

~18 min

Antiderivatives answer "what function had this as its slope." A completely different-looking question asks what the exact area trapped under this curve is. Answering it turns out to need its own idea before it can even be stated precisely. Chop the region into thin rectangles, add up their areas, and ask what happens as the rectangles get thinner and more numerous. That sum is a Riemann sum, and the definite integral is simply its limit.

Think of tiling a curved swimming pool's floor with rectangular tiles to estimate its area. Wide tiles leave visible gaps and overhangs wherever the wall curves. Thinner tiles fit the curve more closely. In the limit of infinitely many, infinitesimally thin tiles, the tiling error vanishes completely. What's left is the pool's actual area, not an approximation of it anymore.

A Riemann sum is the name for the "chop into thin pieces and add" approximation: partition [a,b] into n equal pieces of width \Delta x = \frac{b-a}{n} and sum f(x_i^*)\cdot \Delta x over some sample point x_i^* in each piece, approximating \int_a^b f(x)\,dx. The LEFT endpoint, the RIGHT endpoint, and the MIDPOINT are the three standard choices for x_i^*. Each one systematically over- or under-shoots on a curve that's consistently increasing, decreasing, or curved. That direction is predictable, and it's worth being able to name before trusting any single one. The definite integral, \int_a^b f(x)\,dx, is defined as the limit of this sum as n\to\infty. It is not approximated by that limit; it is DEFINED by it, for any continuous f.

Watch left, right, and midpoint sums converge

Try left vs. right at small n, then slide n up — both close in on the same true value from opposite sides.

Loading interactive…

Trapezoids fit a curve better than flat-topped rectangles

Compare a trapezoid sum to left/right at the same n.

Loading interactive…

Worked example

A left-endpoint Riemann sum by hand

  1. 1

    Approximate \displaystyle\int_0^4 x^2\,dx using a left-endpoint sum with n=4 rectangles.

  2. 2

    \Delta x = \frac{4-0}{4} = 1, so the left endpoints are x = 0, 1, 2, 3.

  3. 3

    Sum f(x)\cdot\Delta x at each: f(0)\cdot1 + f(1)\cdot1 + f(2)\cdot1 + f(3)\cdot1 = 0 + 1 + 4 + 9 = 14.

  4. 4

    Since x^2 is increasing on [0,4], a left sum uses the SMALLEST height on each piece. This underestimates the true area. \boxed{\text{left sum} = 14 \text{ (an underestimate)}}

Loading interactive…

Where this shows up

Numerical methods

When a function has no closed-form antiderivative at all, a Riemann-type sum is often the ONLY way to get a usable numeric answer. It gets refined into the trapezoid and Simpson's rules several chapters ahead. This isn't a stepping stone discarded once FTC arrives. It's a permanent tool.

Check your understanding (counts toward your progress)

Approximate \displaystyle\int_0^2 x^2\,dx using a midpoint sum with n=2 rectangles.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Midpoints 0.5, 1.5, each times \Delta x=1 — f(0.5)+f(1.5) = 0.25+2.25 = 2.5.

Correct answer

Also accepted:

Why

Midpoints of [0,1] and [1,2] are 0.5 and 1.5.

With \Delta x=\dfrac{2}{5} and right-endpoint values f(x_1)=17, f(x_2)=2, f(x_3)=-2, f(x_4)=13, f(x_5)=-3, f(x_6)=3, f(x_7)=3, find the Riemann sum \displaystyle\sum_{i=1}^{7}f(x_i)\Delta x.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

\left(17 + 2 + -2 + 13 + -3 + 3 + 3\right)\times\dfrac{2}{5}\approx13.2.

Correct answer

Also accepted:

Why

Add all the f-values, then multiply the total by \Delta x.

For \int_0^{10} f(x)\,dx split into n=5 equal subintervals, what is \Delta x?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

\Delta x = \dfrac{b-a}{n} = \dfrac{10-0}{5} = 2.

Correct answer

Also accepted:

Why

Approximate \displaystyle\int_{-5}^{-1} x^2\,dx using a LEFT-endpoint Riemann sum with 4 rectangles of width 1.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Left endpoints: x=-5, -4, -3, -2. Sum of f(x)=x^2 at each, times width 1: -5^2 + -4^2 + -3^2 + -2^2 = 54$.

Correct answer

Also accepted:

Why

The left endpoints are x = -5, -4, -3, -2 — evaluate f at each and sum (each rectangle has width 1).

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.