For seven chapters you learned to take things apart. The derivative is a local measurement: zoom in on a single point, watch a difference quotient shrink, and read off the slope of the tangent line. Differentiation is the mathematics of the instant.
Prerequisites
- Chapter 12: Antiderivatives
- Chapter 4: Continuity
- Chapter 3: The Limit
Learning Objectives
- Set up the area problem and approximate area with left, right, and midpoint Riemann sums.
- Define the definite integral as the limit of Riemann sums using sigma notation.
- Interpret the definite integral as signed area and evaluate simple integrals by geometry.
- State and apply the properties of definite integrals (linearity, additivity over intervals, comparison).
- State the Mean Value Theorem for Integrals and compute the average value of a function.
- Approximate integrals numerically in Python (Riemann sums and the trapezoidal rule), including the area under the normal curve.
In This Chapter
- 13.1 A New Kind of Problem
- 13.2 Approximating Area by Rectangles
- 13.3 Riemann Sums in Sigma Notation
- 13.4 The Definite Integral
- 13.5 Computing an Integral from the Definition
- 13.6 Signed Area
- 13.7 Evaluating Integrals by Geometry
- 13.8 Properties of the Definite Integral
- 13.9 The Definite Integral as Total Accumulation
- 13.10 Application: Displacement and Distance from Velocity
- 13.11 The Mean Value Theorem for Integrals and Average Value
- 13.12 When Does the Integral Exist?
- 13.13 Numerical Integration
- 13.14 The Area Under the Normal Curve
- 13.15 Looking Toward the Fundamental Theorem
- Looking Ahead
- Reflection
Chapter 13 — The Definite Integral
13.1 A New Kind of Problem
For seven chapters you learned to take things apart. The derivative is a local measurement: zoom in on a single point, watch a difference quotient shrink, and read off the slope of the tangent line. Differentiation is the mathematics of the instant.
This chapter opens Part III, where we run the machinery in reverse. Instead of zooming in, we will zoom out — chopping an interval into many pieces, measuring each, and adding everything up. The motivating question is two thousand years old.
The area problem. Given a function $f$ that is positive on $[a,b]$, how much area lies between its graph and the $x$-axis?
For a rectangle the answer is base times height; for a triangle it is half of that; for a circle the Greeks worked out $\pi r^2$ by heroic effort. But what is the area under $y = x^2$ from $0$ to $1$? The top edge is curved, so no formula from geometry applies. We need a genuinely new idea, and that idea — the definite integral — turns out to be one of the two pillars the whole subject stands on.
The Key Insight. The definite integral is a limit of sums. Geometrically it is the area under a curve; physically it is a total accumulated from a varying rate; computationally it is a single number. The same three-step move — slice the interval, sum the pieces, take the limit — produces all of them. Master that pattern and you have understood integration.
This chapter builds the definite integral from the ground up using only limits and geometry. We will not use the shortcut that makes integrals easy to evaluate — the Fundamental Theorem of Calculus — because that theorem is the subject of Chapter 14, and proving it honestly requires that we first build the integral it is about. Everything here is computed the hard way, by sums and limits, so that the shortcut feels like the miracle it is.
13.2 Approximating Area by Rectangles
Take $f(x) = x^2$ on $[0,1]$ and approximate the area beneath it with rectangles.
Cut $[0,1]$ into $n$ strips of equal width $\Delta x = 1/n$. Over each strip, replace the curve by a flat top — a rectangle. We get to choose the height of each rectangle by sampling $f$ somewhere in the strip. The simplest choice is the right endpoint of each strip. With $n = 4$ the strips are $[0,\tfrac14],[\tfrac14,\tfrac12],[\tfrac12,\tfrac34],[\tfrac34,1]$, their right endpoints are $\tfrac14,\tfrac12,\tfrac34,1$, and the rectangle heights are the squares of those numbers:
$$R_4 = \Delta x\Big[f(\tfrac14)+f(\tfrac12)+f(\tfrac34)+f(1)\Big] = \tfrac14\Big[\tfrac{1}{16}+\tfrac{4}{16}+\tfrac{9}{16}+\tfrac{16}{16}\Big] = \tfrac14\cdot\tfrac{30}{16} = \tfrac{30}{64} \approx 0.469.$$
Because $x^2$ is increasing on $[0,1]$, the right endpoint is the highest point of each strip, so each rectangle pokes above the curve and $R_4$ overestimates the true area. If instead we sample the left endpoint of each strip ($0,\tfrac14,\tfrac12,\tfrac34$), every rectangle sits below the curve and we underestimate:
$$L_4 = \tfrac14\Big[f(0)+f(\tfrac14)+f(\tfrac12)+f(\tfrac34)\Big] = \tfrac14\Big[0+\tfrac{1}{16}+\tfrac{4}{16}+\tfrac{9}{16}\Big] = \tfrac14\cdot\tfrac{14}{16} = \tfrac{14}{64} \approx 0.219.$$
So the true area is trapped: $0.219 < \text{Area} < 0.469$. That is a crude bracket, but notice what we have done — we have bounded a curved-region area using nothing but rectangles. Refining the strips will tighten the bracket.
Geometric Intuition. Picture the curve with the rectangles drawn under it. With right endpoints on an increasing function, each rectangle's top-right corner touches the curve and the rest of its top floats above — the little triangular slivers of overshoot are the error. As you double the number of strips, each sliver is cut roughly in half and there are twice as many of them, so the total overshoot shrinks. In the limit, the slivers vanish and the rectangles fill the region exactly. That vanishing is the whole idea of the integral.
Refining the estimate. Repeat with more strips. The left and right sums for $f(x)=x^2$ on $[0,1]$ close in on a common value:
| $n$ | $L_n$ (left, under) | $R_n$ (right, over) | gap $R_n - L_n$ |
|---|---|---|---|
| 4 | 0.21875 | 0.46875 | 0.25000 |
| 10 | 0.28500 | 0.38500 | 0.10000 |
| 100 | 0.32835 | 0.33835 | 0.01000 |
| 1000 | 0.33283 | 0.33383 | 0.00100 |
The gap is exactly $R_n - L_n = \big(f(1)-f(0)\big)\Delta x = 1\cdot\tfrac1n = \tfrac1n$, which marches to zero. Both sums are squeezing toward $\tfrac13 = 0.3333\ldots$. We will prove that value in §13.5 with no rectangles at all — just algebra and a limit.
13.3 Riemann Sums in Sigma Notation
Let us make "slice, sum" precise for a general function $f$ on $[a,b]$.
A partition of $[a,b]$ is a choice of points $a = x_0 < x_1 < x_2 < \cdots < x_n = b$ that cut the interval into $n$ subintervals $[x_{i-1}, x_i]$. We will almost always use a regular partition, where every subinterval has the same width
$$\Delta x = \frac{b-a}{n}, \qquad x_i = a + i\,\Delta x.$$
In each subinterval pick a sample point $x_i^* \in [x_{i-1}, x_i]$ and build a rectangle of height $f(x_i^*)$ and width $\Delta x$. The total rectangle area is the Riemann sum
$$S_n = \sum_{i=1}^{n} f(x_i^*)\,\Delta x.$$
The standard choices of sample point have names:
- Left endpoint: $x_i^* = x_{i-1} = a + (i-1)\Delta x$.
- Right endpoint: $x_i^* = x_i = a + i\,\Delta x$.
- Midpoint: $x_i^* = \overline{x}_i = \tfrac12(x_{i-1} + x_i) = a + (i - \tfrac12)\Delta x$.
Two more choices matter for theory. The lower sum uses, in each subinterval, the point where $f$ is smallest; the upper sum uses where $f$ is largest. By construction every Riemann sum is trapped between the lower and upper sums for the same partition. This squeeze is exactly what we exploited numerically in §13.2, and it is the engine of the existence proof in §13.12.
Common Pitfall. Students often write the right-endpoint sum as $\sum_{i=1}^n f(a + i\,\Delta x)\,\Delta x$ but then also start the index at $i = 0$, double-counting the left edge. For the right-endpoint regular partition, the sample points are $a+\Delta x,\ a+2\Delta x,\ \ldots,\ a+n\Delta x = b$, so the sum runs $i = 1$ to $n$. For the left-endpoint sum the points are $a,\ a+\Delta x,\ \ldots,\ a+(n-1)\Delta x$, so it runs $i = 0$ to $n-1$ — or equivalently $i=1$ to $n$ with $f(a+(i-1)\Delta x)$. Pick a convention and keep the endpoints straight; an off-by-one here corrupts every digit.
Check Your Understanding. Write the right-endpoint Riemann sum for $\int_1^3 \frac{1}{x}\,dx$ with $n$ subintervals, in sigma notation.
Answer
Here $a=1$, $b=3$, so $\Delta x = \frac{3-1}{n} = \frac{2}{n}$ and $x_i = 1 + \frac{2i}{n}$. The right-endpoint sum is $$S_n = \sum_{i=1}^{n} f(x_i)\,\Delta x = \sum_{i=1}^{n} \frac{1}{\,1 + \tfrac{2i}{n}\,}\cdot\frac{2}{n}.$$ Its limit as $n\to\infty$ is $\int_1^3 \frac{dx}{x}$, a number we will recognize in Chapter 14 as $\ln 3$.
13.4 The Definite Integral
Now take the limit. As the number of subintervals grows, $\Delta x \to 0$, the rectangles get thin, and — for a well-behaved $f$ — the Riemann sums converge to a single number that does not depend on which sample points we chose.
The Definite Integral. Let $f$ be continuous on $[a,b]$. The definite integral of $f$ from $a$ to $b$ is $$\int_a^b f(x)\,dx = \lim_{n\to\infty} \sum_{i=1}^{n} f(x_i^*)\,\Delta x,$$ where $\Delta x = (b-a)/n$ and $x_i^*$ is any sample point in the $i$-th subinterval. For continuous $f$ the limit exists and is independent of the choice of sample points.
The anatomy of the symbol, with Leibniz's deliberate echo of the Riemann sum:
- The sign $\displaystyle\int$ is an elongated "S" for summa — it is the limit of the $\sum$.
- $f(x)$ is the integrand, the height of a rectangle.
- $dx$ is the differential, the limit of the width $\Delta x$.
- $a$ and $b$ are the limits of integration (lower and upper).
- The result is a number, not a function. The variable $x$ is a dummy: $\int_a^b f(x)\,dx = \int_a^b f(t)\,dt$.
Historical Note. Bernhard Riemann gave this definition in 1854, in the paper that introduced what we now call Riemann sums — though, remarkably, it appeared inside a habilitation thesis on Fourier series, where he needed a precise notion of "integrable" to say which functions have a valid Fourier representation. Leibniz had introduced the $\int$ symbol almost two centuries earlier (1675), and Cauchy had defined the integral for continuous functions in the 1820s. Riemann's contribution was the general definition via upper and lower sums that lets us ask which functions are integrable at all.
Math Major Sidebar. The clean "$n\to\infty$ with regular partitions" definition above is enough for continuous functions, but the fully general Riemann integral does not require equal widths. One defines the mesh of a partition as the width of its widest subinterval, $\|P\| = \max_i \Delta x_i$, and declares $f$ integrable with integral $I$ if for every $\varepsilon > 0$ there is a $\delta > 0$ such that every tagged partition with mesh $< \delta$ has $\big|\sum f(x_i^*)\Delta x_i - I\big| < \varepsilon$, no matter how the tags $x_i^*$ are chosen. Equivalently (Darboux's formulation), $f$ is integrable iff its upper and lower sums can be made arbitrarily close. The two formulations agree, and for continuous $f$ both deliver the same $I$ — which is why our simpler definition loses nothing in this book.
13.5 Computing an Integral from the Definition
Let us honor the claim of §13.2 and compute $\int_0^1 x^2\,dx$ exactly — with no antiderivatives, only the limit of a Riemann sum. This is the kind of calculation FTC will mercifully retire, so it is worth doing once by hand.
Use right endpoints: $\Delta x = 1/n$ and $x_i = i/n$. Then $f(x_i) = (i/n)^2 = i^2/n^2$, and
$$R_n = \sum_{i=1}^{n} \frac{i^2}{n^2}\cdot\frac1n = \frac{1}{n^3}\sum_{i=1}^{n} i^2.$$
Now invoke the classical sum-of-squares formula (provable by induction), $\displaystyle\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$. Substituting,
$$R_n = \frac{1}{n^3}\cdot\frac{n(n+1)(2n+1)}{6} = \frac{(n+1)(2n+1)}{6n^2} = \frac{2n^2 + 3n + 1}{6n^2} = \frac13 + \frac{1}{2n} + \frac{1}{6n^2}.$$
Take the limit. The two tail terms vanish, leaving
$$\int_0^1 x^2\,dx = \lim_{n\to\infty} R_n = \frac13.$$
There it is — the value the numerical table was sneaking up on, now pinned exactly. Notice the structure of $R_n = \tfrac13 + \tfrac{1}{2n} + \cdots$: the leading term is the true integral, and the $\tfrac{1}{2n}$ correction is the right-sum overshoot, decaying like $1/n$ exactly as the gap table predicted.
Geometric Intuition. The $\tfrac{1}{2n}$ error term has a picture. The right-endpoint rectangles overshoot the curve by a row of little triangular slivers along the top. Stack those slivers side by side and they form a shape of total width $1$ and height $f(1)-f(0) = 1$ but thickness $\Delta x = 1/n$ — area on the order of $\tfrac12\cdot 1\cdot\tfrac1n$. That is precisely the $\tfrac{1}{2n}$ you see in the formula. The algebra and the geometry are telling the identical story.
Check Your Understanding. Using right endpoints and the formula $\sum_{i=1}^n i = \frac{n(n+1)}{2}$, evaluate $\int_0^1 x\,dx$ from the definition.
Answer
$R_n = \sum_{i=1}^n \frac{i}{n}\cdot\frac1n = \frac{1}{n^2}\cdot\frac{n(n+1)}{2} = \frac{n+1}{2n} = \frac12 + \frac{1}{2n}$. As $n\to\infty$ this $\to \frac12$. Geometry agrees: the region is a triangle of base 1 and height 1, area $\tfrac12$.
13.6 Signed Area
So far $f$ has been positive and the integral has been a literal area. What if $f$ dips below the axis?
Look again at the Riemann sum $\sum f(x_i^*)\Delta x$. When $f(x_i^*) < 0$, that term is negative: it subtracts the area of a rectangle hanging below the axis. So the integral does not measure raw area — it measures signed area, counting regions above the axis as positive and regions below as negative.
The Key Insight. $\displaystyle\int_a^b f(x)\,dx = (\text{area above the axis}) - (\text{area below the axis}).$ This "net" reading is not a quirk to be corrected; it is exactly what makes integrals report net change. If a particle drives forward then back, the signed area under its velocity must be allowed to cancel so the integral can correctly say it ended where it started (§13.10).
For the total, unsigned area between the graph and the axis, integrate the absolute value: $\int_a^b |f(x)|\,dx$. The two differ precisely on the intervals where $f < 0$.
Example (cancellation). Consider $\int_{-1}^{1} x\,dx$. The region is two triangles: one below the axis on $[-1,0]$ with signed area $-\tfrac12$, one above on $[0,1]$ with signed area $+\tfrac12$. They cancel: $$\int_{-1}^{1} x\,dx = -\tfrac12 + \tfrac12 = 0.$$ This also follows because $x$ is an odd function and the interval is symmetric — a shortcut worth remembering: the integral of an odd function over $[-c,c]$ is always $0$.
13.7 Evaluating Integrals by Geometry
Whenever the region under $f$ is a shape whose area you already know, you can read the integral straight off a picture — again, no FTC required.
Constant function. $\displaystyle\int_a^b c\,dx = c(b-a)$: a rectangle of height $c$ and width $b-a$. (If $c<0$ the signed area is negative.)
Linear function (a trapezoid). $\displaystyle\int_0^2 (3x+1)\,dx$. The region under the line $y = 3x+1$ over $[0,2]$ is a trapezoid with parallel vertical sides $f(0)=1$ and $f(2)=7$ and horizontal width $2$. The trapezoid area is the average of the parallel sides times the width: $$\int_0^2 (3x+1)\,dx = \frac{1 + 7}{2}\cdot 2 = 8.$$
Absolute value (two triangles). $\displaystyle\int_{-1}^{1} |x|\,dx$ is two right triangles, each with legs $1$ and area $\tfrac12$, totaling $1$. Here the integrand is never negative, so signed area and total area coincide.
Quarter circle. $\displaystyle\int_0^1 \sqrt{1-x^2}\,dx$. The graph $y = \sqrt{1-x^2}$ is the upper unit semicircle; over $[0,1]$ it traces a quarter of the unit disk, whose area is $\tfrac14\pi r^2 = \tfrac{\pi}{4}$. So $$\int_0^1 \sqrt{1-x^2}\,dx = \frac{\pi}{4}.$$ This one is worth savoring: an algebraic integrand produces $\pi$, and there is no elementary antiderivative shortcut that makes it obvious — geometry sees it instantly.
Common Pitfall. A geometric evaluation only works when the signed area is what you read off. For $\int_0^{2\pi}\sin x\,dx$, students sometimes compute the area of "the hump" as a positive number and forget the second hump dips below the axis. The two humps have equal area but opposite sign, so the integral is $0$, not twice the hump area. Always check where the integrand is negative before equating an integral with a geometric area.
13.8 Properties of the Definite Integral
Each property below is a statement about Riemann sums in the limit; each also has a one-line picture. Throughout, assume $f$ and $g$ are continuous on the relevant interval.
Linearity. Constants pull out and sums split: $$\int_a^b \big[\alpha f(x) + \beta g(x)\big]\,dx = \alpha\int_a^b f(x)\,dx + \beta\int_a^b g(x)\,dx.$$ Why: every Riemann sum of $\alpha f + \beta g$ is $\alpha$ times the sum of $f$ plus $\beta$ times the sum of $g$; limits respect that.
Additivity over intervals. For any $c$ between $a$ and $b$, $$\int_a^c f(x)\,dx + \int_c^b f(x)\,dx = \int_a^b f(x)\,dx.$$ Why: the area over $[a,b]$ is the area over $[a,c]$ plus the area over $[c,b]$ — just split the partition at $c$. This property is the workhorse for integrating piecewise-defined functions.