"The area under the curve" is a picture, not a definition. This post turns it into one. You trap the area between an upper sum that overestimates it and a lower sum that underestimates it, and call the function integrable when the trap can be closed as tightly as you like. From that single idea come proofs that every continuous function and every monotone function is integrable, a function that is not integrable (the Dirichlet function), a surprising one that is (Thomae's function), and both halves of the Fundamental Theorem of Calculus, the result that links this post to the derivatives of post 03. The post ends with improper integrals, Lebesgue's exact criterion for Riemann integrability, and the reason a better integral had to be invented.

Series map: 00 The Real Numbers & Completeness → 01 Sequences & Series → 02 Topology of ℝ & Continuity → 03 Differentiation & Taylor's Theorem → 04 The Riemann Integral (this post) → 05 Uniform Convergence & Power Series.


Learning Outcome

  • Define partitions, upper and lower Darboux sums, and the upper and lower integrals of a bounded function.
  • Prove the refinement lemma and deduce that every lower sum is at most every upper sum.
  • State and prove the Riemann criterion: ff is integrable if and only if U(f,P)−L(f,P)U(f,P) - L(f,P) can be made smaller than any ε>0\varepsilon > 0.
  • Compute ∫01x2 dx\int_0^1 x^2\,dx from the definition, with exact upper and lower sums.
  • Prove that continuous functions and monotone functions on [a,b][a, b] are integrable.
  • Show that the Dirichlet function is not integrable and that Thomae's function is integrable with integral 00.
  • Prove linearity, monotonicity and the triangle inequality for integrals.
  • State and prove both parts of the Fundamental Theorem of Calculus, and use integration by parts and substitution.
  • Decide convergence of the improper integrals ∫1∞x−p dx\int_1^\infty x^{-p}\,dx and ∫01x−p dx\int_0^1 x^{-p}\,dx.
  • State Lebesgue's criterion and explain why the Lebesgue integral exists.

Chapter 1 — Partitions and Darboux sums

Terminology

  • Bounded function — throughout, f:[a,b]→Rf : [a, b] \to \mathbb{R} with a<ba < b and ∣f(x)∣≤B\lvert f(x)\rvert \leq B for all xx. Riemann integration is only defined for bounded functions on closed, bounded intervals; everything else is handled by improper integrals (Chapter 6).
  • Partition — a finite set P={x0,x1,…,xn}P = \{x_0, x_1, \dots, x_n\} with a=x0<x1<⋯<xn=ba = x_0 < x_1 < \dots < x_n = b. The kk-th subinterval is [xk−1,xk][x_{k-1}, x_k], of length Δxk=xk−xk−1\Delta x_k = x_k - x_{k-1}.
  • Mesh — the length of the longest subinterval, max⁡kΔxk\max_k \Delta x_k.
  • Refinement — QQ refines PP if P⊆QP \subseteq Q (it keeps every point of PP and may add more). The common refinement of P1P_1 and P2P_2 is P1∪P2P_1 \cup P_2.
  • Local sup and inf — Mk=sup⁡{f(x):x∈[xk−1,xk]}M_k = \sup\{f(x) : x \in [x_{k-1}, x_k]\} and mk=inf⁡{f(x):x∈[xk−1,xk]}m_k = \inf\{f(x) : x \in [x_{k-1}, x_k]\}. These exist because ff is bounded (completeness, post 00).
  • Upper and lower sums —

U(f,P)=∑k=1nMk Δxk,L(f,P)=∑k=1nmk Δxk.U(f, P) = \sum_{k=1}^{n} M_k\,\Delta x_k, \qquad L(f, P) = \sum_{k=1}^{n} m_k\,\Delta x_k.

Since mk≤Mkm_k \leq M_k, L(f,P)≤U(f,P)L(f, P) \leq U(f, P) for every partition. Picture tall rectangles that cover the graph and short rectangles that sit under it.

The refinement lemma

Lemma. If P⊆QP \subseteq Q, then

L(f,P)≤L(f,Q)≤U(f,Q)≤U(f,P).L(f, P) \leq L(f, Q) \leq U(f, Q) \leq U(f, P).

Refining can only raise lower sums and lower upper sums.

Proof. By induction it is enough to add one point zz to PP, inside [xk−1,xk][x_{k-1}, x_k]. Only the kk-th term of the upper sum changes. It is replaced by

M′ (z−xk−1)+M′′ (xk−z),M'\,(z - x_{k-1}) + M''\,(x_k - z),

where M′M' and M′′M'' are the sups of ff over [xk−1,z][x_{k-1}, z] and [z,xk][z, x_k]. A sup over a smaller set is no bigger, so M′,M′′≤MkM', M'' \leq M_k, and the new term is at most Mk(xk−xk−1)M_k(x_k - x_{k-1}). So U(f,Q)≤U(f,P)U(f, Q) \leq U(f, P). The argument for lower sums is the same with infs, which can only go up. ■\blacksquare

Corollary. For any two partitions P1,P2P_1, P_2: L(f,P1)≤U(f,P2)L(f, P_1) \leq U(f, P_2).

Proof. With the common refinement Q=P1∪P2Q = P_1 \cup P_2: L(f,P1)≤L(f,Q)≤U(f,Q)≤U(f,P2)L(f, P_1) \leq L(f, Q) \leq U(f, Q) \leq U(f, P_2). ■\blacksquare

Upper and lower integrals

Every lower sum is a lower bound for the set of upper sums, so by completeness the following exist and satisfy L(f,P)≤∫‾f≤∫‾f≤U(f,P)L(f,P) \leq \underline{\int} f \leq \overline{\int} f \leq U(f,P) for every PP:

∫ab‾f=sup⁡PL(f,P),∫ab‾f=inf⁡PU(f,P).\underline{\int_a^b} f = \sup_P L(f, P), \qquad \overline{\int_a^b} f = \inf_P U(f, P).

Definition. A bounded ff is (Riemann) integrable on [a,b][a, b] if ∫ab‾f=∫ab‾f\underline{\int_a^b} f = \overline{\int_a^b} f. The common value is ∫abf\int_a^b f or ∫abf(x) dx\int_a^b f(x)\,dx.

Watch out: this is the Darboux form of the definition. The Riemann-sum form picks a sample point tkt_k in each subinterval and asks that ∑f(tk)Δxk\sum f(t_k)\Delta x_k tend to a limit as the mesh tends to 00. The two definitions give the same integrable functions and the same values (Bartle and Sherbert, Section 7.4). The Darboux form is easier to prove things with, because upper and lower sums do not depend on any choice of points.


Chapter 2 — The Riemann criterion and a worked example

Theorem (Riemann criterion). A bounded ff is integrable on [a,b][a, b] if and only if for every ε>0\varepsilon > 0 there is a partition PP with

U(f,P)−L(f,P)<ε.U(f, P) - L(f, P) < \varepsilon.

Proof. (⇐\Leftarrow) For any such PP,

0≤∫‾f−∫‾f≤U(f,P)−L(f,P)<ε.0 \leq \overline{\int} f - \underline{\int} f \leq U(f, P) - L(f, P) < \varepsilon.

The difference is a non-negative number smaller than every ε>0\varepsilon > 0, so it is 00.

(⇒\Rightarrow) Let II be the common value and ε>0\varepsilon > 0. Since I=inf⁡PUI = \inf_P U, there is P1P_1 with U(f,P1)<I+ε/2U(f, P_1) < I + \varepsilon/2. Since I=sup⁡PLI = \sup_P L, there is P2P_2 with L(f,P2)>I−ε/2L(f, P_2) > I - \varepsilon/2. For the common refinement P=P1∪P2P = P_1 \cup P_2 the refinement lemma gives

U(f,P)−L(f,P)≤U(f,P1)−L(f,P2)<ε.■U(f, P) - L(f, P) \leq U(f, P_1) - L(f, P_2) < \varepsilon. \qquad \blacksquare

The criterion is what you use in practice: you never compute a sup over all partitions, you exhibit one good partition for each ε\varepsilon.

Worked example: the integral of x squared on [0, 1]

Let f(x)=x2f(x) = x^2 and let PnP_n be the uniform partition xk=k/nx_k = k/n, k=0,…,nk = 0, \dots, n, so every Δxk=1/n\Delta x_k = 1/n. Since ff is increasing on [0,1][0, 1], on [xk−1,xk][x_{k-1}, x_k] the inf is at the left end and the sup at the right end:

mk=(k−1n)2,Mk=(kn)2.m_k = \left(\frac{k-1}{n}\right)^2, \qquad M_k = \left(\frac{k}{n}\right)^2.

Using ∑k=1nk2=n(n+1)(2n+1)6\sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}:

U(f,Pn)=1n3∑k=1nk2=(n+1)(2n+1)6n2,L(f,Pn)=1n3∑k=1n(k−1)2=(n−1)(2n−1)6n2.U(f, P_n) = \frac{1}{n^3}\sum_{k=1}^{n} k^2 = \frac{(n+1)(2n+1)}{6n^2}, \qquad L(f, P_n) = \frac{1}{n^3}\sum_{k=1}^{n} (k-1)^2 = \frac{(n-1)(2n-1)}{6n^2}.

Subtracting,

U(f,Pn)−L(f,Pn)=1n3(n2−02)=1n,U(f, P_n) - L(f, P_n) = \frac{1}{n^3}\bigl(n^2 - 0^2\bigr) = \frac{1}{n},

because the two sums share every term except the largest square n2n^2 and the smallest 020^2. Given ε>0\varepsilon > 0, any n>1/εn > 1/\varepsilon works, so ff is integrable. Both sums tend to 26=13\frac{2}{6} = \frac13, and L(f,Pn)≤∫01x2 dx≤U(f,Pn)L(f, P_n) \leq \int_0^1 x^2\,dx \leq U(f, P_n) for every nn, so

∫01x2 dx=13.\int_0^1 x^2\,dx = \frac13.

nn L(f,Pn)L(f, P_n) U(f,Pn)U(f, P_n) U−LU - L
4 7/32=0.218757/32 = 0.21875 15/32=0.4687515/32 = 0.46875 1/41/4
10 57/200=0.28557/200 = 0.285 77/200=0.38577/200 = 0.385 1/101/10
100 0.328350.32835 0.338350.33835 1/1001/100

Upper and lower Darboux sums for x squared on 0 to 1 with the uniform partition n = 4: lower sum 7/32, upper sum 15/32, and the four gap rectangles sliding into one column of width 1/4 and height 1, so U minus L equals 1/4; a table shows U minus L = 1/n for n = 4, 10 and 100

Trick: for an increasing function on a uniform partition, the gap rectangles stack into a single column of width b−an\frac{b-a}{n} and height f(b)−f(a)f(b) - f(a). So U−L=(f(b)−f(a))(b−a)nU - L = \frac{(f(b) - f(a))(b - a)}{n} at once. That is the whole proof of the next chapter's monotone theorem.


Chapter 3 — Which functions are integrable?

Monotone functions

Theorem. If ff is monotone on [a,b][a, b], then ff is integrable.

Proof. Say ff is increasing (it is then bounded by f(a)f(a) and f(b)f(b)). On the uniform partition PnP_n, Mk=f(xk)M_k = f(x_k) and mk=f(xk−1)m_k = f(x_{k-1}), so the sum telescopes:

U(f,Pn)−L(f,Pn)=b−an∑k=1n(f(xk)−f(xk−1))=(b−a)(f(b)−f(a))n.U(f, P_n) - L(f, P_n) = \frac{b - a}{n}\sum_{k=1}^{n}\bigl(f(x_k) - f(x_{k-1})\bigr) = \frac{(b - a)\bigl(f(b) - f(a)\bigr)}{n}.

This is smaller than any given ε\varepsilon once nn is large. ■\blacksquare

A monotone function may have infinitely many jumps (for instance one at every 1/k1/k), and it is still integrable.

Continuous functions

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

Proof. A continuous function on the compact set [a,b][a, b] is bounded (EVT) and uniformly continuous (post 02). Let ε>0\varepsilon > 0. Choose δ>0\delta > 0 such that ∣x−y∣<δ\lvert x - y\rvert < \delta implies ∣f(x)−f(y)∣<εb−a\lvert f(x) - f(y)\rvert < \frac{\varepsilon}{b - a}. Take any partition PP with mesh <δ< \delta. On each subinterval, ff attains its max and min (EVT again) at points sk,tks_k, t_k with ∣sk−tk∣<δ\lvert s_k - t_k\rvert < \delta, so Mk−mk=f(sk)−f(tk)<εb−aM_k - m_k = f(s_k) - f(t_k) < \frac{\varepsilon}{b - a}. Therefore

U(f,P)−L(f,P)=∑k=1n(Mk−mk) Δxk<εb−a∑k=1nΔxk=ε.■U(f, P) - L(f, P) = \sum_{k=1}^{n} (M_k - m_k)\,\Delta x_k < \frac{\varepsilon}{b - a}\sum_{k=1}^{n} \Delta x_k = \varepsilon. \qquad \blacksquare

Common pitfall: plain continuity is not enough for this proof. You need one δ\delta that works on every subinterval at once, which is exactly uniform continuity. That is why the theorem is stated on a closed, bounded interval.

Finitely many discontinuities

Theorem. If ff is bounded on [a,b][a, b] and continuous except at finitely many points, then ff is integrable.

Sketch. Say ∣f∣≤B\lvert f\rvert \leq B and the bad points are c1,…,cmc_1, \dots, c_m. Put a small interval of length η\eta around each cjc_j. Their total contribution to U−LU - L is at most 2B⋅mη2B \cdot m\eta, which is small when η\eta is. On the remaining closed intervals ff is continuous, so the previous theorem makes their contribution as small as you like. ■\blacksquare

Changing a function at finitely many points does not change whether it is integrable, or the value of the integral.

A function that is not integrable: Dirichlet

Let D(x)=1D(x) = 1 if x∈Qx \in \mathbb{Q} and D(x)=0D(x) = 0 otherwise, on [0,1][0, 1]. Every subinterval of positive length contains both rationals and irrationals (density of Q\mathbb{Q} and of the irrationals, post 00), so Mk=1M_k = 1 and mk=0m_k = 0 for every kk and every partition. Therefore U(D,P)=1U(D, P) = 1 and L(D,P)=0L(D, P) = 0 always, the upper integral is 11, the lower integral is 00, and DD is not Riemann integrable.

A function that is integrable: Thomae

Thomae's function on [0,1][0, 1] is

T(x)={1/qif x=p/q in lowest terms with q≥1,0if x is irrational,T(x) = \begin{cases} 1/q & \text{if } x = p/q \text{ in lowest terms with } q \geq 1, \\ 0 & \text{if } x \text{ is irrational}, \end{cases}

with T(0)=1T(0) = 1 (as 0=0/10 = 0/1). It is continuous at every irrational and discontinuous at every rational (post 02). Even so:

Claim. TT is integrable on [0,1][0, 1] and ∫01T=0\int_0^1 T = 0.

Proof. Every subinterval contains an irrational, so mk=0m_k = 0 and L(T,P)=0L(T, P) = 0 for every PP. Let ε>0\varepsilon > 0. The points where T(x)≥ε/2T(x) \geq \varepsilon/2 are the fractions p/qp/q with q≤2/εq \leq 2/\varepsilon; there are finitely many, say NN. Choose a partition in which each of these NN points lies in subintervals of total length less than ε/2\varepsilon/2 (for example, give each point its own interval of length less than ε4N\frac{\varepsilon}{4N}; a point on a boundary touches at most two). On those subintervals Mk≤1M_k \leq 1, contributing less than ε/2\varepsilon/2. On all other subintervals Mk<ε/2M_k < \varepsilon/2, contributing at most ε2⋅1\frac{\varepsilon}{2}\cdot 1. So U(T,P)<εU(T, P) < \varepsilon. By the Riemann criterion TT is integrable, and since every lower sum is 00, the integral is 00. ■\blacksquare

For a feel of the numbers: with ε=15\varepsilon = \frac15, the points where T≥110T \geq \frac1{10} are the fractions in [0,1][0, 1] with denominator at most 1010, and there are exactly 3333 of them.


Chapter 4 — Properties of the integral

Let f,gf, g be integrable on [a,b][a, b] and k∈Rk \in \mathbb{R}.

Property Statement
Linearity f+gf + g and kfkf are integrable; ∫(f+g)=∫f+∫g\int (f + g) = \int f + \int g and ∫kf=k∫f\int kf = k\int f
Monotonicity if f≤gf \leq g on [a,b][a, b] then ∫abf≤∫abg\int_a^b f \leq \int_a^b g
Additivity for a<c<ba < c < b: ff integrable on [a,b][a, b] iff integrable on [a,c][a, c] and [c,b][c, b], and ∫abf=∫acf+∫cbf\int_a^b f = \int_a^c f + \int_c^b f
Triangle inequality ∣f∣\lvert f\rvert is integrable and ∣∫abf∣≤∫ab∣f∣\lvert \int_a^b f\rvert \leq \int_a^b \lvert f\rvert
Bound if m≤f≤Mm \leq f \leq M then m(b−a)≤∫abf≤M(b−a)m(b - a) \leq \int_a^b f \leq M(b - a)
Products fgfg is integrable

Proof of the sum rule. On any subinterval, sup⁡(f+g)≤sup⁡f+sup⁡g\sup(f + g) \leq \sup f + \sup g and inf⁡(f+g)≥inf⁡f+inf⁡g\inf(f + g) \geq \inf f + \inf g. So U(f+g,P)≤U(f,P)+U(g,P)U(f + g, P) \leq U(f, P) + U(g, P) and L(f+g,P)≥L(f,P)+L(g,P)L(f + g, P) \geq L(f, P) + L(g, P). Given ε\varepsilon, take a common refinement where both U−LU - L gaps are below ε/2\varepsilon/2; then the gap for f+gf + g is below ε\varepsilon, and its integral is squeezed between L(f,P)+L(g,P)L(f,P) + L(g,P) and U(f,P)+U(g,P)U(f,P) + U(g,P), which both lie within ε\varepsilon of ∫f+∫g\int f + \int g. ■\blacksquare

Proof of monotonicity. g−f≥0g - f \geq 0 has every lower sum ≥0\geq 0, so ∫(g−f)≥0\int (g - f) \geq 0; then use linearity. ■\blacksquare

Proof of the triangle inequality. On any subinterval, for x,yx, y in it, ∣∣f(x)∣−∣f(y)∣∣≤∣f(x)−f(y)∣\bigl\lvert \lvert f(x)\rvert - \lvert f(y)\rvert \bigr\rvert \leq \lvert f(x) - f(y)\rvert, so the oscillation sup⁡∣f∣−inf⁡∣f∣\sup\lvert f\rvert - \inf\lvert f\rvert is at most Mk−mkM_k - m_k. Hence U(∣f∣,P)−L(∣f∣,P)≤U(f,P)−L(f,P)U(\lvert f\rvert, P) - L(\lvert f\rvert, P) \leq U(f, P) - L(f, P) and ∣f∣\lvert f\rvert is integrable. Since −∣f∣≤f≤∣f∣-\lvert f\rvert \leq f \leq \lvert f\rvert, monotonicity gives −∫∣f∣≤∫f≤∫∣f∣-\int\lvert f\rvert \leq \int f \leq \int \lvert f\rvert. ■\blacksquare

Convention. Define ∫baf=−∫abf\int_b^a f = -\int_a^b f and ∫aaf=0\int_a^a f = 0. Then the additivity formula holds for any order of a,b,ca, b, c.

Mean Value Theorem for integrals. If ff is continuous on [a,b][a, b], there is c∈[a,b]c \in [a, b] with ∫abf=f(c)(b−a)\int_a^b f = f(c)(b - a).

Proof. With m,Mm, M the min and max of ff (EVT), the bound property gives m≤1b−a∫abf≤Mm \leq \frac{1}{b-a}\int_a^b f \leq M, and the IVT gives a cc where ff takes this average value. ■\blacksquare

For example, ∫02x2 dx=83\int_0^2 x^2\,dx = \frac83, so c2⋅2=83c^2 \cdot 2 = \frac83, c=23c = \frac{2}{\sqrt 3}: the same point as the MVT example for x3x^3 in post 03, and that is no coincidence, because x33\frac{x^3}{3} is an antiderivative of x2x^2.


Chapter 5 — The Fundamental Theorem of Calculus

Part 1: integrating then differentiating

Theorem (FTC, part 1). Let ff be integrable on [a,b][a, b] and define

F(x)=∫axf(t) dt,x∈[a,b].F(x) = \int_a^x f(t)\,dt, \qquad x \in [a, b].

Then FF is continuous on [a,b][a, b] (in fact Lipschitz). If ff is continuous at c∈[a,b]c \in [a, b], then FF is differentiable at cc and F′(c)=f(c)F'(c) = f(c) (one-sided at an endpoint).

Proof. Let ∣f∣≤B\lvert f\rvert \leq B. For x<yx < y, additivity and the bound give ∣F(y)−F(x)∣=∣∫xyf∣≤B(y−x)\lvert F(y) - F(x)\rvert = \left\lvert \int_x^y f\right\rvert \leq B(y - x). So FF is Lipschitz, hence continuous.

Now let ff be continuous at cc and ε>0\varepsilon > 0. Choose δ\delta with ∣f(t)−f(c)∣<ε\lvert f(t) - f(c)\rvert < \varepsilon for ∣t−c∣<δ\lvert t - c\rvert < \delta. For 0<∣x−c∣<δ0 < \lvert x - c\rvert < \delta,

F(x)−F(c)x−c−f(c)=1x−c∫cx(f(t)−f(c)) dt,\frac{F(x) - F(c)}{x - c} - f(c) = \frac{1}{x - c}\int_c^x \bigl(f(t) - f(c)\bigr)\,dt,

and the right side has absolute value at most 1∣x−c∣⋅ε∣x−c∣=ε\frac{1}{\lvert x - c\rvert}\cdot \varepsilon \lvert x - c\rvert = \varepsilon. ■\blacksquare

So every continuous function has an antiderivative. One famous use: define ln⁡x=∫1xdtt\ln x = \int_1^x \frac{dt}{t} for x>0x > 0. Then FTC 1 gives ln⁡′(x)=1x\ln'(x) = \frac1x at once.

Worked example. Let G(x)=∫0x2cos⁡(t2) dtG(x) = \int_0^{x^2} \cos(t^2)\,dt. With F(u)=∫0ucos⁡(t2) dtF(u) = \int_0^{u} \cos(t^2)\,dt, FTC 1 gives F′(u)=cos⁡(u2)F'(u) = \cos(u^2), and G(x)=F(x2)G(x) = F(x^2). By the chain rule (post 03),

G′(x)=cos⁡((x2)2)⋅2x=2xcos⁡(x4).G'(x) = \cos\bigl((x^2)^2\bigr)\cdot 2x = 2x\cos(x^4).

Part 2: differentiating then integrating

Theorem (FTC, part 2). Let FF be differentiable on [a,b][a, b] (one-sided at the endpoints) and suppose f=F′f = F' is integrable on [a,b][a, b]. Then

∫abf=F(b)−F(a).\int_a^b f = F(b) - F(a).

Proof. Take any partition PP. Apply the Mean Value Theorem (post 03) to FF on each [xk−1,xk][x_{k-1}, x_k]: there is tkt_k in the open subinterval with F(xk)−F(xk−1)=F′(tk)Δxk=f(tk)ΔxkF(x_k) - F(x_{k-1}) = F'(t_k)\Delta x_k = f(t_k)\Delta x_k. Summing, the left side telescopes:

F(b)−F(a)=∑k=1nf(tk) Δxk.F(b) - F(a) = \sum_{k=1}^{n} f(t_k)\,\Delta x_k.

Since mk≤f(tk)≤Mkm_k \leq f(t_k) \leq M_k, this gives L(f,P)≤F(b)−F(a)≤U(f,P)L(f, P) \leq F(b) - F(a) \leq U(f, P) for every PP. So F(b)−F(a)F(b) - F(a) lies between the lower and upper integrals, which are equal. ■\blacksquare

Watch out: the hypothesis "F′F' is integrable" cannot be dropped. F(x)=x2sin⁡(1/x2)F(x) = x^2\sin(1/x^2) with F(0)=0F(0) = 0 is differentiable on [−1,1][-1, 1], but F′(x)=2xsin⁡(1/x2)−2xcos⁡(1/x2)F'(x) = 2x\sin(1/x^2) - \frac{2}{x}\cos(1/x^2) for x≠0x \neq 0 is unbounded near 00, so it is not Riemann integrable. A derivative can even be bounded and still not Riemann integrable (Volterra's function, 1881).

Integration by parts and substitution

Integration by parts. If u,vu, v are differentiable on [a,b][a, b] and u′,v′u', v' are integrable, then

∫abu v′=u(b)v(b)−u(a)v(a)−∫abu′ v.\int_a^b u\,v' = u(b)v(b) - u(a)v(a) - \int_a^b u'\,v.

This is FTC 2 applied to (uv)′=u′v+uv′(uv)' = u'v + uv'. Example: ∫01xex dx=[xex]01−∫01ex dx=e−(e−1)=1\int_0^1 x e^x\,dx = \bigl[x e^x\bigr]_0^1 - \int_0^1 e^x\,dx = e - (e - 1) = 1.

Substitution. If φ:[a,b]→R\varphi : [a, b] \to \mathbb{R} is continuously differentiable and ff is continuous on an interval containing φ([a,b])\varphi([a, b]), then

∫abf(φ(t)) φ′(t) dt=∫φ(a)φ(b)f(u) du.\int_a^b f(\varphi(t))\,\varphi'(t)\,dt = \int_{\varphi(a)}^{\varphi(b)} f(u)\,du.

Proof: both sides, as functions of the upper limit bb, have the same derivative (FTC 1 and the chain rule) and agree when b=ab = a. Example: with u=x2+1u = x^2 + 1, ∫012x(x2+1)3 dx=∫12u3 du=24−144=154\int_0^1 2x(x^2 + 1)^3\,dx = \int_1^2 u^3\,du = \frac{2^4 - 1^4}{4} = \frac{15}{4}.


Chapter 6 — Improper integrals

The Riemann integral needs a bounded function on a closed, bounded interval. An improper integral relaxes one of these by a limit.

  • Unbounded interval. If ff is integrable on [a,R][a, R] for every R>aR > a, define ∫a∞f=lim⁡R→∞∫aRf\int_a^\infty f = \lim_{R \to \infty} \int_a^R f when the limit exists (the integral converges).
  • Unbounded function. If ff is integrable on [a+η,b][a + \eta, b] for every small η>0\eta > 0, define ∫abf=lim⁡η→0+∫a+ηbf\int_a^b f = \lim_{\eta \to 0^+} \int_{a+\eta}^b f.

The p-test. For p>0p > 0:

∫1Rx−p dx={1−R1−pp−1p≠1,ln⁡Rp=1.\int_1^R x^{-p}\,dx = \begin{cases} \dfrac{1 - R^{1-p}}{p - 1} & p \neq 1, \\ \ln R & p = 1. \end{cases}

As R→∞R \to \infty: if p>1p > 1 then R1−p→0R^{1-p} \to 0 and the integral converges to 1p−1\frac{1}{p - 1}; if p≤1p \leq 1 it diverges to ∞\infty. Near 00 the roles swap: ∫01x−p dx\int_0^1 x^{-p}\,dx converges (to 11−p\frac{1}{1 - p}) exactly when p<1p < 1.

Integral Converges? Value
∫1∞x−2 dx\int_1^\infty x^{-2}\,dx yes (p=2>1p = 2 > 1) 11
∫1∞x−1 dx\int_1^\infty x^{-1}\,dx no (p=1p = 1) diverges
∫01x−1/2 dx\int_0^1 x^{-1/2}\,dx yes (p=12<1p = \frac12 < 1) 22
∫0∞e−x dx\int_0^\infty e^{-x}\,dx yes 11

This mirrors the pp-series test of post 01: ∑1/kp\sum 1/k^p converges exactly when p>1p > 1. The integral test makes the link precise: for ff positive and decreasing on [1,∞)[1, \infty), ∑f(k)\sum f(k) and ∫1∞f\int_1^\infty f converge or diverge together.

Common pitfall: ∫−∞∞f\int_{-\infty}^{\infty} f is defined as ∫−∞0f+∫0∞f\int_{-\infty}^0 f + \int_0^\infty f with both limits existing separately. lim⁡R→∞∫−RRx dx=0\lim_{R \to \infty}\int_{-R}^{R} x\,dx = 0, but ∫−∞∞x dx\int_{-\infty}^\infty x\,dx diverges.


Chapter 7 — Lebesgue's criterion, and why Lebesgue integration exists

Measure zero

A set A⊆RA \subseteq \mathbb{R} has measure zero if for every ε>0\varepsilon > 0 it can be covered by countably many open intervals whose total length is less than ε\varepsilon.

  • Every finite set has measure zero.
  • Every countable set {a1,a2,… }\{a_1, a_2, \dots\} has measure zero: cover aka_k by an interval of length ε/2k+1\varepsilon/2^{k+1}; the total is at most ε/2\varepsilon/2. So Q\mathbb{Q} has measure zero (it is countable, post 00).
  • An interval [c,d][c, d] with c<dc < d does not have measure zero.

Theorem (Lebesgue's criterion). A function f:[a,b]→Rf : [a, b] \to \mathbb{R} is Riemann integrable if and only if ff is bounded and the set of points where ff is discontinuous has measure zero.

This explains every example in the post at once:

Function Discontinuities Integrable?
continuous ff none yes
monotone ff countable (jumps) yes
Thomae TT the rationals: countable yes
Dirichlet DD every point of [0,1][0, 1] no
x−1/2x^{-1/2} on (0,1](0, 1] — but unbounded not Riemann; only improper

The proof is in Abbott, Section 7.6, and Rudin, Theorem 11.33.

Why a better integral was needed

The Riemann integral does not behave well under limits. Enumerate the rationals in [0,1][0, 1] as q1,q2,…q_1, q_2, \dots and let fnf_n be 11 at q1,…,qnq_1, \dots, q_n and 00 elsewhere. Each fnf_n has finitely many discontinuities, so it is integrable with ∫01fn=0\int_0^1 f_n = 0. The functions increase and are bounded by 11, and fn(x)→D(x)f_n(x) \to D(x) at every xx. But the limit DD is not Riemann integrable, so "∫fn→∫lim⁡fn\int f_n \to \int \lim f_n" is not even meaningful.

Lebesgue's integral (1902) partitions the range of ff instead of its domain, and measures the sets where ff takes values in each range slice. It integrates DD (answer 00, since Q\mathbb{Q} has measure zero), agrees with the Riemann integral whenever the latter exists, and satisfies clean limit theorems such as the Monotone and Dominated Convergence Theorems. Post 05 shows the Riemann-world substitute: limits and integrals commute when convergence is uniform.


Practice Exercises

Exercise 1. For f(x)=xf(x) = x on [0,1][0, 1] and the uniform partition PnP_n, compute U(f,Pn)U(f, P_n) and L(f,Pn)L(f, P_n) and deduce ∫01x dx\int_0^1 x\,dx.

Solution

Mk=k/nM_k = k/n and mk=(k−1)/nm_k = (k-1)/n, each times Δxk=1/n\Delta x_k = 1/n. With ∑k=1nk=n(n+1)2\sum_{k=1}^n k = \frac{n(n+1)}{2}: U=n+12nU = \frac{n+1}{2n} and L=n−12nL = \frac{n-1}{2n}. So U−L=1n→0U - L = \frac1n \to 0 and both tend to 12\frac12. Hence ∫01x dx=12\int_0^1 x\,dx = \frac12.

Exercise 2. For f(x)=x3f(x) = x^3 on [0,2][0, 2] with the uniform partition into nn pieces, show U−L=16nU - L = \frac{16}{n}. How large must nn be for U−L<0.01U - L < 0.01?

Solution

By the trick of Chapter 2 (increasing function, uniform partition), U−L=(b−a)(f(b)−f(a))n=2⋅8n=16nU - L = \frac{(b - a)(f(b) - f(a))}{n} = \frac{2 \cdot 8}{n} = \frac{16}{n}. Explicitly, U=4(n+1)2n2U = \frac{4(n+1)^2}{n^2} and L=4(n−1)2n2L = \frac{4(n-1)^2}{n^2}, whose difference is 16nn2\frac{16n}{n^2}. Then 16n<0.01\frac{16}{n} < 0.01 needs n>1600n > 1600, so n=1601n = 1601 is the smallest. Both sums tend to 4=∫02x3 dx4 = \int_0^2 x^3\,dx.

Exercise 3. Let f=0f = 0 on [0,1][0, 1] except f(12)=5f(\frac12) = 5. Prove from the definition that ff is integrable with integral 00.

Solution

Every lower sum is 00 (each subinterval contains points where f=0f = 0). Given ε>0\varepsilon > 0, take 0<δ<min⁡(ε10,12)0 < \delta < \min(\frac{\varepsilon}{10}, \frac12) and the partition {0,12−δ,12+δ,1}\{0, \frac12 - \delta, \frac12 + \delta, 1\}. Only the middle subinterval has Mk=5M_k = 5, so U=5⋅2δ<εU = 5 \cdot 2\delta < \varepsilon. By the Riemann criterion ff is integrable, and the integral is squeezed to 00.

Exercise 4. Evaluate ∫01dxx\int_0^1 \frac{dx}{\sqrt x} and decide whether ∫1∞dxx\int_1^\infty \frac{dx}{x} converges.

Solution

∫η1x−1/2 dx=2−2η→2\int_\eta^1 x^{-1/2}\,dx = 2 - 2\sqrt\eta \to 2 as η→0+\eta \to 0^+, so the first integral is 22. For the second, ∫1Rdxx=ln⁡R→∞\int_1^R \frac{dx}{x} = \ln R \to \infty: it diverges (p=1p = 1).

Exercise 5. Let ff be continuous on [a,b][a, b] with f≥0f \geq 0 and ∫abf=0\int_a^b f = 0. Prove f(x)=0f(x) = 0 for all xx.

Solution

Suppose f(c)>0f(c) > 0 for some cc. By continuity there is an interval [c′,d′]⊆[a,b][c', d'] \subseteq [a, b] of positive length containing cc on which f≥f(c)2f \geq \frac{f(c)}{2}. By additivity and monotonicity, ∫abf≥∫c′d′f≥f(c)2(d′−c′)>0\int_a^b f \geq \int_{c'}^{d'} f \geq \frac{f(c)}{2}(d' - c') > 0. Contradiction. (Continuity is needed: Thomae's function is ≥0\geq 0, not identically 00, and has integral 00.)

Exercise 6. Find H′(x)H'(x) for H(x)=∫xx2dttH(x) = \int_{x}^{x^2} \frac{dt}{t} on x>0x > 0, and explain the answer.

Solution

Write H(x)=∫1x2dtt−∫1xdttH(x) = \int_1^{x^2} \frac{dt}{t} - \int_1^{x} \frac{dt}{t}. By FTC 1 and the chain rule, H′(x)=1x2⋅2x−1x=1xH'(x) = \frac{1}{x^2}\cdot 2x - \frac1x = \frac1x. Indeed H(x)=ln⁡(x2)−ln⁡x=ln⁡xH(x) = \ln(x^2) - \ln x = \ln x.

Exercise 7. Explain why the pointwise limit of integrable functions need not be integrable, using the functions fnf_n from Chapter 7.

Solution

Each fnf_n is 11 at nn rationals and 00 elsewhere, so it has nn discontinuities and ∫01fn=0\int_0^1 f_n = 0. At a rational x=qmx = q_m, fn(x)=1f_n(x) = 1 once n≥mn \geq m; at an irrational xx, fn(x)=0f_n(x) = 0 for all nn. So fn→Df_n \to D pointwise, and DD is not Riemann integrable (upper integral 1, lower integral 0). The convergence is not uniform: sup⁡∣fn−D∣=1\sup\lvert f_n - D\rvert = 1 for every nn.


Cheat-sheet

Idea Statement
Upper / lower sum U=∑MkΔxkU = \sum M_k\Delta x_k, L=∑mkΔxkL = \sum m_k\Delta x_k
Refinement P⊆Q⇒L(P)≤L(Q)≤U(Q)≤U(P)P \subseteq Q \Rightarrow L(P) \leq L(Q) \leq U(Q) \leq U(P)
Integrable lower integral == upper integral
Riemann criterion for every ε\varepsilon some PP has U−L<εU - L < \varepsilon
Increasing, uniform partition U−L=(b−a)(f(b)−f(a))/nU - L = (b - a)(f(b) - f(a))/n
x2x^2 on [0,1][0,1] U−L=1/nU - L = 1/n, integral 1/31/3
Always integrable continuous; monotone; bounded with finitely many discontinuities
Not integrable Dirichlet (upper 1, lower 0); unbounded functions
Thomae integrable, integral 0
Triangle inequality ∣∫f∣≤∫∣f∣\lvert \int f\rvert \leq \int \lvert f\rvert
FTC 1 F(x)=∫axfF(x) = \int_a^x f is Lipschitz; F′(c)=f(c)F'(c) = f(c) where ff is continuous
FTC 2 F′=fF' = f integrable ⇒∫abf=F(b)−F(a)\Rightarrow \int_a^b f = F(b) - F(a)
p-test ∫1∞x−p\int_1^\infty x^{-p} converges iff p>1p > 1; ∫01x−p\int_0^1 x^{-p} iff p<1p < 1
Lebesgue criterion bounded and discontinuities of measure zero

What's next

Post 05 studies sequences and series of functions. It separates pointwise from uniform convergence, proves that uniform limits of continuous functions are continuous and that integrals commute with uniform limits (the theorem the Dirichlet example above was missing), and then applies everything to power series: radius of convergence, term-by-term differentiation and integration, Abel's theorem and the Weierstrass approximation theorem.


References

  • Stephen Abbott, Understanding Analysis, 2nd ed., Springer (Undergraduate Texts in Mathematics), 2015 — Chapter 7, "The Riemann Integral", including Section 7.6 on Lebesgue's criterion.
  • Walter Rudin, Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976 — Chapter 6, "The Riemann–Stieltjes Integral", and Chapter 11 for Lebesgue theory.
  • Robert G. Bartle and Donald R. Sherbert, Introduction to Real Analysis, 4th ed., Wiley, 2011 — Chapter 7 (Riemann sums, the Darboux integral and their equivalence, FTC, Lebesgue's criterion).
  • Michael Spivak, Calculus, 4th ed., Publish or Perish, 2008 — Chapters 13–14 (integrals and the Fundamental Theorem).
  • Jiří Lebl, Basic Analysis I: Introduction to Real Analysis, free textbook — jirka.org/ra, Chapter 5.
  • MIT OpenCourseWare, 18.100A Real Analysis (Fall 2020), lecture notes on the Riemann integral and the Fundamental Theorem of Calculus.

Note: this post is in progress. Planned additions: the Riemann–Stieltjes integral, a full proof of Lebesgue's criterion, the integral test with its error bounds, and the integral form of the Taylor remainder from post 03.