Chapter 2: Calculus and the Real Numbers

Integration as Riemann Sums

The integral is built from finite sums. As the mesh shrinks, the sums converge—with explicit error bounds.

The integral is perhaps the most computational object in analysis. It's defined as a limit of finite sums—sums we can actually calculate.

Constructively, we don't just know the limit exists; we know exactly how fine our partition must be to achieve any desired precision.

For a partition P = (a₀, a₁, ..., aₙ) with mesh(P) = max(aᵢ₊₁ - aᵢ):

S(f, P) = Σ f(xᵢ)(aᵢ₊₁ - aᵢ)   where xᵢ ∈ [aᵢ, aᵢ₊₁]

Theorem: |S(f, P) - ∫f| < ε(b - a) when mesh(P) < ω(ε)

The modulus of continuity ω controls everything. If ω(ε) tells us how close inputs must be for outputs to stay within ε, then a partition with mesh < ω(ε) guarantees our Riemann sum is within ε(b-a) of the true integral.

Build a Riemann Sum

Adjust the partition, choose sample points, watch convergence

Riemann Sum Calculator ∫ₐᵇ f(x) dx ≈ Σ f(xᵢ) Δxᵢ
n = 8
[a, b] = [0, 2]
Riemann Sum: 2.625
Exact Integral: 2.667
Error: 0.042
Mesh Size: 0.250

Mesh Convergence

Watch the error shrink as the partition refines

Error Rate

O(1/n)

For ε-accuracy

n ≥ (b-a)M/ε

M = max|f|

Lipschitz bound

The Fundamental Theorem of Calculus

x = 1.00

F(x) = ∫₀ˣ t² dt = x³/3   ⟹   F'(x) = x²

Differentiation and integration are inverse operations. The integral function F has derivative equal to the original function f.

Chapter 2 Complete

The Machine is Built

From regular sequences to integration, we've constructed the real number system and the calculus that lives on it—all with explicit computational content.