Build integrals from first principles using partitions and Riemann sums
The Riemann integral is built from approximating areas with rectangles. We partition an interval, form upper and lower sums, and take limits as the partition becomes finer. A function is Riemann integrablewhen the upper and lower integrals agree.
This section develops the Riemann integral rigorously and proves the celebrated Fundamental Theorem of Calculus, connecting differentiation and integration.
Approximate the integral by summing rectangle areas. Choose left, right, midpoint, or random sample points. Watch convergence as you increase the number of rectangles.
Riemann Sum
1.920000
Exact Integral
2.666667
Error
0.746667
The Riemann sum approximates the integral by summing rectangle areas:
Sn = Σ f(xi*) · Δxi
As n → ∞, the sum converges to the definite integral (for integrable functions).
The upper sum uses supremums, the lower sum uses infimums. For integrable functions, they squeeze together as the partition refines.
Upper Sum U
3.5200
Lower Sum L
1.9200
Gap (U - L)
1.6000
Exact ∫
2.6667
Upper sum U(f, P): Use supremum of f on each subinterval
Lower sum L(f, P): Use infimum of f on each subinterval
A function is Riemann integrable iff sup L(f, P) = inf U(f, P) (the upper and lower integrals agree). As the partition gets finer, U and L squeeze together toward the integral value.
Continuous functions are always integrable. But what about discontinuous functions? Explore the surprising integrability of Thomae's function and the failure of the Dirichlet function.
Continuous functions are always integrable
U - L = 0.100000
Gap shrinks as n increases → function is integrable
A bounded function f on [a, b] is Riemann integrable iff:
For every ε > 0, ∃ partition P such that U(f, P) - L(f, P) < ε
• Continuous functions: Always integrable
• Finitely many discontinuities: Still integrable
• Monotone functions: Always integrable
• Dirichlet function: NOT integrable (discontinuous everywhere)
• Thomae function: Integrable! (continuous on irrationals)
The FTC connects differentiation and integration: the derivative of the accumulation function F(x) = ∫[a,x] f(t) dt equals f(x). See this relationship in action.
f(1.50) = 2.2500
F'(1.50) = 2.2500
They match! (FTC Part 1)
Part 1 (Differentiation): If F(x) = ∫[a,x] f(t) dt, then F'(x) = f(x)
d/dx [∫[a,x] f(t) dt] = f(x)
Part 2 (Evaluation): If F is an antiderivative of f, then
∫[a,b] f(x) dx = F(b) - F(a)
The FTC connects the two fundamental operations: differentiation and integration are inverses!
What happens when integration limits extend to infinity or the integrand is unbounded? Some improper integrals converge to finite values, others diverge.
Partial Integrals:
Integral Converges
∫[1,∞) 1/x² dx = 1 (converges)
An improper integral has either an infinite limit or an unbounded integrand:
∫[a,∞) f(x) dx = limN→∞ ∫[a,N] f(x) dx
• ∫[1,∞) 1/x² dx = 1 (converges - area is finite)
• ∫[1,∞) 1/x dx = ∞ (diverges - area is infinite)
• p-test: ∫[1,∞) 1/xp dx converges iff p > 1
A bounded function f is integrable on [a, b] iff for every ε > 0, there exists a partition P with U(f, P) - L(f, P) < ε.
If f is continuous and F(x) = ∫[a,x] f(t) dt, then F'(x) = f(x). Integration and differentiation are inverse operations.
If F is an antiderivative of f on [a, b], then ∫[a,b] f(x) dx = F(b) - F(a).
A bounded function is Riemann integrable iff its set of discontinuities has measure zero.