LeoMath

Foundations of calculus

The integral

The limit of Riemann sums and the fundamental theorem.

about 5 min

Start from a problem

Problem

What is the area of the region under y=x2y=x^2 for 0≤x≤10\le x\le1? We can compute rectangles, triangles and circles, but this shape belongs to none of those.

"Area" is not yet defined for irregular shapes. We need a definition that returns the familiar answers for familiar shapes and a single number for new ones.

Observe

What is the area under y=x2y=x^2 for 0≤x≤10\le x\le1? It is not a shape we know how to measure. But we can cut [0,1][0,1] into nn pieces and replace each by a rectangle; the total Sn=∑i=1n(in)21n=1n3⋅n(n+1)(2n+1)6S_n=\sum_{i=1}^n\left(\frac in\right)^2\frac1n=\frac1{n^3}\cdot\frac{n(n+1)(2n+1)}6 tends to 13\dfrac13 as nn grows.

Conjecture

"Area under a curve" should be defined as a limit of rectangle sums. And the value should not depend on how we cut or which point we sample in each piece: once the cut is fine enough, every choice gives the same answer.

Interactive experimentRiemann sums
Functionsample
∑i=18f(ξi) Δx\sum_{i=1}^{8} f(\xi_i)\,\Delta xRiemann sum 2.1875exact 2.66667error 0.47917

Definition

Definition 4.1Riemann sums and the definite integral

Let ff be bounded on [a,b][a,b]. Take a partition P:a=x0<x1<⋯<xn=bP:a=x_0<x_1<\cdots<x_n=b, write Δxi=xi−xi−1\Delta x_i=x_i-x_{i-1} and ∥P∥=max⁡Δxi\|P\|=\max\Delta x_i. For any choice ξi∈[xi−1,xi]\xi_i\in[x_{i-1},x_i], the sum ∑i=1nf(ξi) Δxi\sum_{i=1}^nf(\xi_i)\,\Delta x_i is a Riemann sum. If there is a number II such that for every ε>0\varepsilon>0 there is δ>0\delta>0 with ∣∑f(ξi)Δxi−I∣<ε\left|\sum f(\xi_i)\Delta x_i-I\right|<\varepsilon whenever ∥P∥<δ\|P\|<\delta, regardless of the ξi\xi_i, then ff is integrable on [a,b][a,b] and ∫abf(x) dx=I\displaystyle\int_a^bf(x)\,dx=I.

This is the same sentence pattern as the definition of a limit: "as accurate as you like". The difference is that closeness must hold uniformly over all partitions and all sample points.

Theorem 4.1Continuous functions are integrable

If ff is continuous on [a,b][a,b], it is integrable.

Proof

A continuous function on a closed interval is uniformly continuous: for every ε>0\varepsilon>0 there is δ\delta with ∣x−y∣<δ⇒∣f(x)−f(y)∣<εb−a|x-y|<\delta\Rightarrow|f(x)-f(y)|<\frac\varepsilon{b-a}. When ∥P∥<δ\|P\|<\delta, on each piece the maximum MiM_i and minimum mim_i of ff differ by less than εb−a\frac\varepsilon{b-a}, so the upper sum minus the lower sum satisfies ∑(Mi−mi)Δxi<ε.\sum(M_i-m_i)\Delta x_i<\varepsilon. Every Riemann sum lies between the lower and upper sums; refining the partition raises lower sums and lowers upper sums, and their common limit is II.

The fundamental theorem of calculus

So far integrals have nothing to do with derivatives: one is an area, the other a slope. The following theorem is the heart of calculus.

Theorem 4.2Fundamental theorem, part I

Let ff be continuous on [a,b][a,b] and F(x)=∫axf(t) dtF(x)=\displaystyle\int_a^xf(t)\,dt. Then FF is differentiable on [a,b][a,b] and F′(x)=f(x)F'(x)=f(x).

Proof

F(x+h)−F(x)h=1h∫xx+hf(t) dt.\frac{F(x+h)-F(x)}h=\frac1h\int_x^{x+h}f(t)\,dt. By continuity, on [x,x+h][x,x+h] we have min⁡f≤1h∫xx+hf≤max⁡f\min f\le\dfrac1h\int_x^{x+h}f\le\max f (monotonicity of the integral). As h→0h\to0 both min⁡f\min f and max⁡f\max f tend to f(x)f(x), so the squeeze theorem gives F′(x)=f(x)F'(x)=f(x).

The rate at which the area grows is the height of the curve: area accumulates faster exactly where the curve is higher.

Theorem 4.3Fundamental theorem, part II

If F′=fF'=f on [a,b][a,b] with ff continuous, then ∫abf(x) dx=F(b)−F(a)\displaystyle\int_a^bf(x)\,dx=F(b)-F(a).

Proof

Let G(x)=∫axfG(x)=\int_a^xf. By part I, G′=f=F′G'=f=F', so (G−F)′=0(G-F)'=0 and, by the corollary of the mean value theorem, G−FG-F is constant. G(a)=0G(a)=0 makes the constant −F(a)-F(a), hence G(b)=F(b)−F(a)G(b)=F(b)-F(a).

Thus ∫01x2 dx=[x33]01=13\int_0^1x^2\,dx=\left[\frac{x^3}3\right]_0^1=\frac13: the opening limit, computed in one line.

Common mistake

∫abf(x) dx\int_a^bf(x)\,dx is a number; the indefinite integral ∫f(x) dx\int f(x)\,dx is a family of functions (an antiderivative plus a constant). The fundamental theorem connects them, but it is a theorem to be proved, not a convention of notation. Also, the definition says "regardless of the ξi\xi_i": computing rectangle sums for one choice of sample points does not prove integrability.

Applications

ApplicationTurning an ODE into an integral equation

Integrating y′=f(t,y)y'=f(t,y) from t0t_0 to tt: y(t)=y0+∫t0tf(s,y(s)) ds.y(t)=y_0+\int_{t_0}^tf(s,y(s))\,ds. This form is the starting point of the uniqueness proof in What is an ODE, of Picard iteration, and of numerical methods.

ApplicationIntegration by parts and substitution

Integrating the product rule (uv)′=u′v+uv′(uv)'=u'v+uv' gives ∫u′v=uv−∫uv′\int u'v=uv-\int uv'; integrating the chain rule gives substitution, ∫abf(g(x))g′(x) dx=∫g(a)g(b)f(u) du\int_a^bf(g(x))g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du. Every integration technique is a differentiation rule read backwards.

Remark

∫\int is an elongated S, for sum. The definition contains only sums and a limit. It is the fundamental theorem that connects it to derivatives, and that connection is a theorem requiring proof, not a coincidence of notation.

Exercises

01
Compute ∫01x2 dx\displaystyle\int_0^1 x^2\,dx to four decimals.
02
Let F(x)=∫0xe−t2 dtF(x)=\displaystyle\int_0^x e^{-t^2}\,dt. Then F′(x)F'(x) equals