Calculus I · Adding Up the Infinite

Riemann sums: approximate with rectangles, then take the limit

We cannot find the area under a curve directly, so we approximate it with shapes we can measure — rectangles — and then make the approximation exact with a limit. (This is the identical strategy from Chapter 3, where we approximated a slope with a secant line and took the limit. Calculus has essentially one idea, and this is its second great use.)

Figure 10.3
Figure 10.3

To estimate the area under ff on [a,b][a,b]: chop the interval into nn equal slices, each of width Δx=b−an\Delta x = \dfrac{b-a}{n}. On each slice, build a rectangle whose height is the value of ff at some sample point xix_i in that slice. The rectangle areas are f(xi)Δxf(x_i)\,\Delta x, and their sum approximates the total area:

Area≈∑i=1nf(xi)Δx.\text{Area} \approx \sum_{i=1}^{n} f(x_i)\,\Delta x.

This is a Riemann sum. Using the left edge of each slice as the sample point gives a left sum, the right edge a right sum, the middle a midpoint sum — and for a great many functions, all of them close in on the same number as the rectangles get thinner. (Figure 10.2: the region under a curve filled with rectangles, shown at n=4n=4, n=8n=8, n=16n=16 — the staircase hugging the curve more tightly each time.)

Figure 10.2
Figure 10.2

Now take the limit. As n→∞n \to \infty the rectangles become infinitely thin, the staircase melts onto the curve, and the approximation becomes the exact area.


The definite integral

The definite integral of ff from aa to bb is the limit of its Riemann sums: ∫abf(x)dx=limn→∞∑i=1nf(xi)Δx.\int_a^b f(x)\,dx = \lim_{n\to\infty} \sum_{i=1}^{n} f(x_i)\,\Delta x.

Figure 10.4
Figure 10.4

The notation is a story in itself. The sign ∫\displaystyle\int is an elongated S, for “sum”; it is the Σ\Sigma of the Riemann sum, stretched out as the sum becomes continuous. The dxdx is the width Δx\Delta x in the limit — the infinitely thin slice. Together, ∫abf(x)dx\int_a^b f(x)\,dx reads “sum up f(x)f(x) times a sliver of width dxdx, as xx runs from aa to bb.” The result is a single number: the area.

One subtlety: it is signed area. Where ff is below the axis, f(xi)f(x_i) is negative, so those rectangles contribute negatively. The definite integral counts area above the axis as positive and area below as negative. (For distance, this is exactly right — moving backward subtracts.)

Computing one from the definition. Let’s find ∫01x2dx\displaystyle\int_0^1 x^2\,dx — the area under the parabola from 00 to 11 — with nothing but the definition. Slice [0,1][0,1] into nn pieces of width 1n\tfrac1n and sample at the right edges xi=inx_i = \tfrac{i}{n}:

∑i=1n(in)2⋅1n=1n3∑i=1ni2=1n3⋅n(n+1)(2n+1)6=(n+1)(2n+1)6n2.\sum_{i=1}^{n} \left(\frac{i}{n}\right)^2 \cdot \frac1n = \frac{1}{n^3}\sum_{i=1}^{n} i^2 = \frac{1}{n^3}\cdot\frac{n(n+1)(2n+1)}{6} = \frac{(n+1)(2n+1)}{6n^2}.

(We used the sum-of-squares formula ∑i2=n(n+1)(2n+1)6\sum i^2 = \tfrac{n(n+1)(2n+1)}{6} from Chapter 1.) As n→∞n\to\infty, the dominant terms give 2n26n2=13\dfrac{2n^2}{6n^2} = \dfrac13. So ∫01x2dx=13\displaystyle\int_0^1 x^2\,dx = \frac13. We found the exact area under a parabola by adding up infinitely many rectangles — but it took real work, and we’d have to start over for every new function. Hold that frustration; the next chapter eliminates it entirely.

Properties you’ll use constantly

A few facts follow straight from the definition (sums behave this way, so their limits do too):

  • Linearity: ∫ab[f(x)+g(x)]dx=∫abf+∫abg\displaystyle\int_a^b \big[f(x)+g(x)\big]\,dx = \int_a^b f + \int_a^b g, and ∫abcf(x)dx=c∫abf\displaystyle\int_a^b c\,f(x)\,dx = c\int_a^b f.
  • Additivity over intervals: ∫abf+∫bcf=∫acf\displaystyle\int_a^b f + \int_b^c f = \int_a^c f — areas of adjacent pieces add.
  • A point has no width: ∫aaf=0\displaystyle\int_a^a f = 0.
  • Reversing orientation flips the sign: ∫baf=−∫abf\displaystyle\int_b^a f = -\int_a^b f.

All 12 chapters of Calculus I · Foundations · All courses