4.3 Lebesgue Measure and Integration
Lebesgue outer measure and measurable sets, null sets and Cantor sets, measurable and simple functions, the Lebesgue integral, the monotone convergence theorem, Fatou's lemma and the dominated convergence theorem — and exactly how the Lebesgue integral relates to the Riemann integral.
The Riemann integral slices the domain of a function into small intervals. That works beautifully for continuous functions, but it breaks down as soon as a function jumps too often: the indicator of the rationals has no Riemann integral at all, and a pointwise limit of Riemann integrable functions need not be Riemann integrable even when the functions are bounded by $1$. Lebesgue's idea (1902) is to slice the range instead: to integrate $f$, ask how large the set $\{x: f(x)\gt t\}$ is for each level $t$. That needs a notion of "size" — a measure — for sets far more complicated than intervals: the rationals, a Cantor-type dust, a dense open set of tiny total length. Once measure is in place, the resulting integral has a property the Riemann integral lacks: limits and integrals can be exchanged under simple, checkable hypotheses (monotonicity, or domination by one integrable function). That is why probability, Fourier analysis, the $L^p$ spaces of §8.1 and modern PDE theory are all built on it.
GATE MA examines this section in a very concrete way. MCQs and NATs ask for the measure of a set assembled from intervals, rationals and Cantor-type constructions, or for the value of $\lim_n\int f_n$, where the right theorem (monotone or dominated convergence) gives the answer in two lines and the wrong instinct ("the integrand tends to $0$, so the limit is $0$") gives a wrong option. MSQs list statements about null, dense, nowhere dense and measurable sets, about measurable functions, and about the hypotheses of Fatou's lemma and the convergence theorems; their false options are exactly the counterexamples collected in this section. The full measure-theoretic proofs are in the CSIR course (see the 📚 box below); here every result is stated with its hypotheses, the central ones are proved, and the emphasis is on using them fast and correctly.
Outer Measure and Measurable Sets
Throughout, $\ell(I)$ is the length of an interval $I$ ($\ell((a,b))=\ell([a,b])=b-a$, and $\ell(I)=\infty$ if $I$ is unbounded). A cover of $A\subseteq\mathbb{R}$ is a finite or countable family of open intervals whose union contains $A$.
- (Monotonicity.) $m^*(\varnothing)=0$, and $A\subseteq B\Rightarrow m^*(A)\le m^*(B)$.
- (Countable subadditivity.) $m^*\big(\bigcup_kA_k\big)\le\sum_km^*(A_k)$ for any sets $A_1,A_2,\dots$.
- (Intervals.) $m^*(I)=\ell(I)$ for every interval $I$.
- (Invariance.) $m^*(A+t)=m^*(A)$ and $m^*(cA)=|c|\,m^*(A)$ for all real $t,c$.
- (Null sets.) Every countable set is null; a countable union of null sets is null; and if $N$ is null then $m^*(A\cup N)=m^*(A)$ and $m^*(A\setminus N)=m^*(A)$.
Proof. (1) Every cover of $B$ is a cover of $A$, so the infimum for $A$ is taken over a larger family.
(2) We may assume each $m^*(A_k)$ is finite. Given $\varepsilon\gt0$, choose a cover $(I_{k,j})_j$ of $A_k$ with $\sum_j\ell(I_{k,j})\lt m^*(A_k)+\varepsilon2^{-k}$. All the $I_{k,j}$ together form a countable cover of $\bigcup_kA_k$ of total length less than $\sum_km^*(A_k)+\varepsilon$. Let $\varepsilon\to0$.
(3) For $[a,b]$ the single interval $(a-\varepsilon,b+\varepsilon)$ shows $m^*([a,b])\le b-a$. For "$\ge$", take any cover. By the Heine–Borel theorem (§4.1) finitely many of its intervals already cover $[a,b]$. Start with one containing $a$, say $(a_1,b_1)$; if $b_1\le b$, the point $b_1$ lies in another one, $(a_2,b_2)$ with $a_2\lt b_1\lt b_2$; continue until some $b_r\gt b$. These $r$ intervals overlap in a chain, so their total length exceeds $b_r-a_1\gt b-a$. Other bounded intervals are squeezed between $[a+\varepsilon,b-\varepsilon]$ and $[a,b]$; an unbounded interval contains closed intervals of every length.
(4) $(I_k)$ covers $A$ if and only if $(I_k+t)$ covers $A+t$, with the same lengths; dilating by $c\ne0$ multiplies every length by $|c|$.
(5) List a countable set as $x_1,x_2,\dots$ and cover $x_k$ by an interval of length $\varepsilon2^{-k}$: total length $\varepsilon$. The union statement is (2). Finally $m^*(A)\le m^*(A\cup N)\le m^*(A)+m^*(N)=m^*(A)$; and $m^*(A)\le m^*(A\setminus N)+m^*(N)$, which equals $m^*(A\setminus N)\le m^*(A)$. ∎
Outer measure is defined for every set but is not additive on every pair of disjoint sets (Theorem 4.23 below). Carathéodory's idea is to keep only the sets that split every other set additively.
A set $E\subseteq\mathbb{R}$ is Lebesgue measurable if $$m^*(A)=m^*(A\cap E)+m^*(A\setminus E)$$ for every $A\subseteq\mathbb{R}$. The family of measurable sets is $\mathcal M$, and for $E\in\mathcal M$ we write $m(E)=m^*(E)$, the Lebesgue measure of $E$.
A family $\Sigma$ of subsets of $\mathbb{R}$ is a σ-algebra if $\varnothing\in\Sigma$ and $\Sigma$ is closed under complements and countable unions (hence also under countable intersections and differences). The smallest σ-algebra containing all open sets is the Borel σ-algebra $\mathcal B(\mathbb{R})$; its members are Borel sets. Countable intersections of open sets are $G_\delta$ sets, countable unions of closed sets are $F_\sigma$ sets; both are Borel. For instance $\mathbb{Q}$ is $F_\sigma$ and $\mathbb{R}\setminus\mathbb{Q}$ is $G_\delta$.
- $\mathcal M$ is a σ-algebra. It contains every null set (and hence every subset of a null set) and every interval, so $\mathcal B(\mathbb{R})\subseteq\mathcal M$.
- (Countable additivity.) If $E_1,E_2,\dots\in\mathcal M$ are pairwise disjoint, then $m\big(\bigcup_kE_k\big)=\sum_km(E_k)$. Consequently $m(F\setminus E)=m(F)-m(E)$ when $E\subseteq F$ and $m(E)\lt\infty$.
- (Continuity from below.) If $E_1\subseteq E_2\subseteq\cdots$ are measurable, then $m\big(\bigcup_kE_k\big)=\lim_km(E_k)$.
- (Continuity from above.) If $E_1\supseteq E_2\supseteq\cdots$ are measurable and $m(E_1)\lt\infty$, then $m\big(\bigcap_kE_k\big)=\lim_km(E_k)$.
- (Regularity.) For $E\in\mathcal M$ and $\varepsilon\gt0$ there are an open $U\supseteq E$ and a closed $F\subseteq E$ with $m(U\setminus E)\lt\varepsilon$ and $m(E\setminus F)\lt\varepsilon$. Hence every measurable set is a $G_\delta$ set minus a null set, and an $F_\sigma$ set plus a null set.
Proof of (3) and (4) from (1)–(2). (3) Put $D_1=E_1$ and $D_k=E_k\setminus E_{k-1}$. These are disjoint, measurable, $\bigcup_{k\le n}D_k=E_n$ and $\bigcup_kD_k=\bigcup_kE_k$. By (2), $m\big(\bigcup_kE_k\big)=\sum_km(D_k)$, and this is $\lim_n\sum_{k\le n}m(D_k)=\lim_nm(E_n)$. (4) The sets $E_1\setminus E_k$ increase to $E_1\setminus\bigcap_kE_k$, so by (3) and the difference formula (all measures finite), $m(E_1)-m\big(\bigcap_kE_k\big)=\lim_k\big(m(E_1)-m(E_k)\big)$. Subtract from the finite number $m(E_1)$. ∎
Parts (1), (2) and (5) are Carathéodory's theorem and the regularity theorem; their proofs (checking the splitting condition for half-lines and for unions, and using outer regularity of $m^*$) are in the CSIR course linked below. For GATE you need to use them: every set you can describe by intervals, countable operations, open and closed sets is measurable, and measures of such sets are computed by additivity and continuity.
Proof. Call $x,y\in[0,1]$ equivalent if $x-y\in\mathbb{Q}$. Using the axiom of choice, let $V$ contain exactly one point of each equivalence class. For each rational $q\in[-1,1]$ consider $V+q$. These countably many sets are pairwise disjoint (if $v+q=v'+q'$ then $v-v'\in\mathbb{Q}$, so $v=v'$ and $q=q'$), they all lie in $[-1,2]$, and their union contains $[0,1]$ (each $x\in[0,1]$ is equivalent to some $v\in V$, and $x=v+(x-v)$ with $x-v\in\mathbb{Q}\cap[-1,1]$). If $V$ were measurable with $m(V)=c$, then by translation invariance and countable additivity, $1\le\sum_qc\le3$. But a countable sum of copies of $c$ is $0$ (if $c=0$) or $\infty$ (if $c\gt0$). Contradiction. ∎
Null Sets and Cantor Sets
Countable sets are null, but null sets need not be countable. The standard example — and the source of many GATE options — is Cantor's set, together with its "fat" relatives that look just as thin but have positive measure.
Fix $0\lt\alpha\le1$. Put $K_0=[0,1]$. Having $K_{n-1}$, a union of $2^{n-1}$ disjoint closed intervals, obtain $K_n$ by removing from each of them the concentric open interval of length $\alpha\,3^{-n}$. Let $K_\alpha=\bigcap_{n\ge0}K_n$.
For $\alpha=1$ each removed interval is exactly the open middle third, and $K_1=C$ is the Cantor (ternary) set: the points of $[0,1]$ with a ternary expansion $x=\sum_{k\ge1}a_k3^{-k}$ using only the digits $a_k\in\{0,2\}$. For $0\lt\alpha\lt1$, $K_\alpha$ is a fat Cantor set.
- $C$ is compact, nowhere dense, uncountable (it has the cardinality of $\mathbb{R}$), and $m(C)=0$.
- For $0\lt\alpha\lt1$, $K_\alpha$ is compact and nowhere dense, and $m(K_\alpha)=1-\alpha\gt0$.
Proof. The construction is feasible: by induction each interval of $K_n$ has length $L_n=(1-\alpha)2^{-n}+\alpha3^{-n}$ (check: $\tfrac12\big(L_{n-1}-\alpha3^{-n}\big)=L_n$), which exceeds the gap $\alpha3^{-n-1}$ removed at the next stage. Stage $n$ removes $2^{n-1}$ intervals of length $\alpha3^{-n}$, so
$$m([0,1]\setminus K_\alpha)=\sum_{n\ge1}\frac{2^{n-1}\alpha}{3^n}=\frac\alpha2\cdot\frac{2/3}{1-2/3}=\alpha,$$and $m(K_\alpha)=1-\alpha$ (for $\alpha=1$: $m(C)=0$; directly, $m(C)\le m(K_n)=(2/3)^n\to0$). Each $K_n$ is closed, so $K_\alpha$ is closed and bounded, hence compact. It contains no interval, because an interval inside $K_\alpha$ would lie in one component of $K_n$ for every $n$, and $L_n\to0$; a closed set with empty interior is nowhere dense. Finally, the map $\sum_ka_k3^{-k}\mapsto\sum_k\frac{a_k}{2}2^{-k}$ ($a_k\in\{0,2\}$) sends $C$ onto $[0,1]$ (every number in $[0,1]$ has a binary expansion), so $C$ is at least as large as $[0,1]$: uncountable. ∎
- Throw away countable pieces (rationals, algebraic numbers, end points, finite sets): they are null and never change a measure.
- Split what is left into disjoint intervals and add their lengths (geometric series are typical). If the pieces overlap, use $m(A\cup B)=m(A)+m(B)-m(A\cap B)$, or subadditivity for an upper bound.
- For nested constructions (Cantor-type sets, "digits avoid…" sets), compute the measure $m(K_n)$ at stage $n$ and use continuity from above — always on a set of finite measure.
- For "infinitely many" or "eventually" conditions, write the set as $\bigcap_N\bigcup_{n\ge N}E_n$ or $\bigcup_N\bigcap_{n\ge N}E_n$ and use continuity (Exercise I.6 is the Borel–Cantelli lemma).
Measurable Functions and Simple Functions
From now on $E\in\mathcal M$ is a measurable set, and functions may take the values $\pm\infty$ (as limits and suprema of sequences often do).
A function $f:E\to[-\infty,\infty]$ is (Lebesgue) measurable if $\{x\in E:f(x)\gt a\}\in\mathcal M$ for every $a\in\mathbb{R}$.
A property of points of $E$ holds almost everywhere (a.e.) if the set where it fails is null. So "$f=g$ a.e." means $m(\{f\ne g\})=0$, and "$f_n\to f$ a.e." means $f_n(x)\to f(x)$ for all $x$ outside a null set.
- $f$ is measurable iff $\{f\ge a\}$ is measurable for all $a$, iff $\{f\lt a\}$ is, iff $\{f\le a\}$ is. Then $f^{-1}(B)\in\mathcal M$ for every Borel set $B\subseteq\mathbb{R}$; in particular every level set $\{f=c\}$ is measurable.
- Continuous functions on $E$, monotone functions on intervals, and indicators $\mathbf 1_A$ of measurable sets $A$ are measurable ($\mathbf 1_A$ is measurable iff $A\in\mathcal M$).
- $f+g$, $fg$, $cf$, $\max(f,g)$, $\min(f,g)$, $|f|$, $f^+=\max(f,0)$ and $f^-=\max(-f,0)$ are measurable.
- $\sup_nf_n$, $\inf_nf_n$, $\limsup_nf_n$, $\liminf_nf_n$ are measurable, and so is $\lim_nf_n$ wherever the limit exists.
- $\varphi\circ f$ is measurable for every continuous $\varphi:\mathbb{R}\to\mathbb{R}$.
- If $g=f$ a.e., then $g$ is measurable.
Proof of the key steps. (1) $\{f\ge a\}=\bigcap_k\{f\gt a-\tfrac1k\}$ and $\{f\gt a\}=\bigcup_k\{f\ge a+\tfrac1k\}$; the other two are complements. (2) For continuous $f$, $\{f\gt a\}$ is relatively open in $E$; for increasing $f$ it is an interval (if $x$ is in it and $y\gt x$, then $f(y)\ge f(x)\gt a$); and $\{\mathbf 1_A\gt a\}$ is $\varnothing$, $A$ or $E$.
(3) The heart of the matter is the sum. If $f(x)+g(x)\gt a$, pick a rational $q$ with $a-g(x)\lt q\lt f(x)$; then $f(x)\gt q$ and $g(x)\gt a-q$. The converse is clear, so
$$\{f+g\gt a\}=\bigcup_{q\in\mathbb{Q}}\big(\{f\gt q\}\cap\{g\gt a-q\}\big),$$a countable union of measurable sets. For $a\ge0$, $\{f^2\gt a\}=\{f\gt\sqrt a\}\cup\{f\lt-\sqrt a\}$ (and it is $E$ when $a\lt0$), so $f^2$ is measurable, and then $fg=\tfrac14\big((f+g)^2-(f-g)^2\big)$. The rest follows from $\max(f,g)\gt a\iff f\gt a$ or $g\gt a$, and $|f|=\max(f,-f)$.
(4) $\{\sup_nf_n\gt a\}=\bigcup_n\{f_n\gt a\}$ and $\{\inf_nf_n\lt a\}=\bigcup_n\{f_n\lt a\}$; then $\limsup_nf_n=\inf_n\sup_{k\ge n}f_k$ and $\liminf_nf_n=\sup_n\inf_{k\ge n}f_k$. (5) $\{\varphi\circ f\gt a\}=f^{-1}(W)$ with $W=\varphi^{-1}((a,\infty))$ open, a countable union of open intervals. (6) $\{g\gt a\}$ and $\{f\gt a\}$ differ only inside the null set $\{f\ne g\}$, and every subset of a null set is measurable (Theorem 4.22(1)). ∎
Proof. $\varphi_n$ takes the values $k2^{-n}$ ($0\le k\le n2^n$) on the measurable sets $\{k2^{-n}\le f\lt(k+1)2^{-n}\}$ (and $n$ on $\{f\ge n\}$), so it is simple. Since $2\lfloor s\rfloor\le\lfloor2s\rfloor$, we get $\lfloor2^nt\rfloor/2^n\le\lfloor2^{n+1}t\rfloor/2^{n+1}\le t$, and the cap $n$ only increases with $n$; so $\varphi_n\le\varphi_{n+1}\le f$. If $f(x)\le M\lt\infty$, then for $n\ge M$ the cap is inactive and $0\le f(x)-\varphi_n(x)\lt2^{-n}$ — uniformly on $\{f\le M\}$. If $f(x)=\infty$, then $\varphi_n(x)=n\to\infty$. ∎
Two further theorems explain how close measurable functions are to continuous ones and pointwise convergence to uniform convergence. GATE uses them mainly as true/false statements, so we state them precisely; proofs are in the CSIR course.
- (Egorov.) Let $m(E)\lt\infty$, and let $f_n,f$ be measurable and finite a.e. on $E$ with $f_n\to f$ a.e. Then for every $\varepsilon\gt0$ there is a closed $F\subseteq E$ with $m(E\setminus F)\lt\varepsilon$ such that $f_n\to f$ uniformly on $F$.
- (Lusin.) Let $f$ be measurable and finite a.e. on $[a,b]$. For every $\varepsilon\gt0$ there is a closed $F\subseteq[a,b]$ with $m([a,b]\setminus F)\lt\varepsilon$ such that the restriction $f|_F$ is continuous.
Both conclusions are about restrictions to a large set, not about the original function. For instance $\mathbf 1_{\mathbb{Q}}$ restricted to the closed set $F=[0,1]\setminus U$ of Example 1(e) is the zero function, hence continuous on $F$; yet $\mathbf 1_{\mathbb{Q}}$ is continuous at no point. And Egorov needs $m(E)\lt\infty$: $\mathbf 1_{[n,n+1]}\to0$ everywhere on $\mathbb{R}$, but not uniformly off any set of finite measure.
The Lebesgue Integral and the Convergence Theorems
The integral is built in three steps: simple non-negative functions, then non-negative measurable functions by approximation from below, then integrable functions as differences. We use the convention $0\cdot\infty=0$.
If $\varphi=\sum_{i=1}^ra_i\mathbf 1_{E_i}$ is simple with $a_i\ge0$ and disjoint measurable $E_i$ covering $E$, then $\displaystyle\int_E\varphi=\sum_{i=1}^ra_i\,m(E_i)\in[0,\infty]$ (independent of the representation).
For measurable $f:E\to[0,\infty]$, $$\int_Ef=\sup\Big\{\int_E\varphi:\ \varphi\text{ simple},\ 0\le\varphi\le f\Big\},$$ a number in $[0,\infty]$, also written $\int_Ef\,dm$. For measurable $A\subseteq E$ we write $\int_Af=\int_Ef\mathbf 1_A$, and $\int_a^bf$ for $\int_{[a,b]}f$ (this agrees with the Riemann integral whenever that exists — Theorem 4.34).
Lebesgue integrability is absolute: $f$ is integrable if and only if $|f|$ is. For example $\int_{[0,1]}\mathbf 1_{\mathbb{Q}}=1\cdot m(\mathbb{Q}\cap[0,1])+0\cdot m([0,1]\setminus\mathbb{Q})=0$, and $\int_{[0,1]}\mathbf 1_{K_\alpha}=m(K_\alpha)=1-\alpha$.
- (Monotonicity.) $f\le g\Rightarrow\int_Ef\le\int_Eg$; and $A\subseteq B\subseteq E$ measurable $\Rightarrow\int_Af\le\int_Bf$.
- (Markov–Chebyshev inequality.) For every $t\gt0$, $\ m(\{f\ge t\})\le\dfrac1t\displaystyle\int_Ef$.
- $\int_Ef=0$ if and only if $f=0$ a.e.
- If $\int_Ef\lt\infty$, then $f\lt\infty$ a.e.
- If $f=g$ a.e., then $\int_Ef=\int_Eg$. In particular $\int_Nf=0$ for every null set $N$.
Proof. (1) A simple function below $f$ is below $g$; and $f\mathbf 1_A\le f\mathbf 1_B$. (2) The simple function $t\,\mathbf 1_{\{f\ge t\}}$ lies below $f$, so its integral $t\,m(\{f\ge t\})$ is at most $\int_Ef$. (3) If $\int f=0$, then by (2) each set $\{f\ge\tfrac1k\}$ is null, and so is their union $\{f\gt0\}$. Conversely, if $N=\{f\gt0\}$ is null, every simple $0\le\varphi\le f$ is $0$ off $N$, so each term $a_i\,m(E_i)$ with $a_i\gt0$ has $E_i\subseteq N$ and vanishes. (4) $\{f=\infty\}\subseteq\{f\ge t\}$ has measure at most $\frac1t\int f$ for every $t$. (5) Let $N=\{f\ne g\}$. If $0\le\varphi\le f$ is simple, then $\varphi\mathbf 1_{E\setminus N}\le g$ and has the same integral as $\varphi$, so $\int f\le\int g$; by symmetry they are equal. ∎
The first great theorem says that for increasing sequences of non-negative functions the limit and the integral always commute — no other hypothesis, and the common value may be $\infty$.
Proof. By Theorem 4.28(5) we may change everything on a null set and assume $f_n(x)\uparrow f(x)$ for every $x$; then $f$ is measurable (Theorem 4.25(4)). By monotonicity $\int f_n$ increases to some $L\le\int f$. For the reverse inequality, fix a simple $\varphi=\sum_ia_i\mathbf 1_{A_i}$ with $0\le\varphi\le f$ and a number $c\in(0,1)$, and put $E_n=\{f_n\ge c\varphi\}$. These sets are measurable and increase with $n$, and their union is $E$: if $\varphi(x)=0$ then $x\in E_1$; if $\varphi(x)\gt0$ then $c\varphi(x)\lt\varphi(x)\le f(x)$, so $f_n(x)\ge c\varphi(x)$ for large $n$. Hence
$$\int_Ef_n\ \ge\ \int_{E_n}f_n\ \ge\ c\int_{E_n}\varphi=c\sum_ia_i\,m(A_i\cap E_n).$$By continuity from below (Theorem 4.22(3)), $m(A_i\cap E_n)\to m(A_i)$, so $L\ge c\int_E\varphi$. Let $c\to1$ and take the supremum over $\varphi$: $L\ge\int_Ef$. ∎
- (Additivity.) For measurable $f,g\ge0$ and constants $a,b\ge0$: $\int_E(af+bg)=a\int_Ef+b\int_Eg$.
- (Series of non-negative functions.) For measurable $g_k\ge0$: $\displaystyle\int_E\sum_{k=1}^\infty g_k=\sum_{k=1}^\infty\int_Eg_k$ (both sides may be $\infty$).
- (Countable additivity in the domain.) If $f\ge0$ is measurable and $E=\bigcup_kA_k$ with disjoint measurable $A_k$, then $\int_Ef=\sum_k\int_{A_k}f$.
- (Integrable functions.) $\mathcal L^1(E)$ is a vector space, $f\mapsto\int_Ef$ is linear on it, $\big|\int_Ef\big|\le\int_E|f|$, and a measurable $f$ with $|f|\le g$ for some $g\in\mathcal L^1(E)$ is integrable.
Proof. (1) For simple functions additivity follows from additivity of $m$ (refine both to a common partition). In general take simple $\varphi_n\uparrow f$, $\psi_n\uparrow g$ (Theorem 4.26); then $a\varphi_n+b\psi_n\uparrow af+bg$, and the MCT applied three times gives the formula. (2) By (1) and induction the formula holds for finite sums; the partial sums increase to $\sum_kg_k$, so the MCT finishes. (3) is (2) with $g_k=f\mathbf 1_{A_k}$. (4) $|af+bg|\le|a||f|+|b||g|$ gives the vector space. For $h=f+g$ with $f,g$ finite integrable, $h^++f^-+g^-=h^-+f^++g^+$; integrate both sides with (1) and rearrange the finite numbers. Also $\big|\int f\big|=\big|\int f^+-\int f^-\big|\le\int f^++\int f^-=\int|f|$, and $|f|\le g$ gives $\int|f|\le\int g\lt\infty$. ∎
Theorem 4.26 combined with the MCT is Lebesgue's "slice the range" formula. In its cleanest form (using Tonelli's theorem, see the CSIR course) it is the layer-cake formula $\int_Ef=\int_0^\infty m(\{f\gt t\})\,dt$ for measurable $f\ge0$.
Monotonicity cannot be dropped from the MCT: $f_n=\mathbf 1_{[n,\infty)}$ decreases to $0$ but every $\int f_n=\infty$. For general sequences of non-negative functions only an inequality survives — and it is the tool from which everything else follows.
Proof. Let $g_n=\inf_{k\ge n}f_k$. The $g_n$ are measurable, $0\le g_1\le g_2\le\cdots$, and $g_n\uparrow\liminf_kf_k$. By the MCT, $\int\liminf_kf_k=\lim_n\int g_n$. Since $g_n\le f_k$ for every $k\ge n$, $\int g_n\le\inf_{k\ge n}\int f_k$; letting $n\to\infty$ gives $\lim_n\int g_n\le\liminf_k\int f_k$. ∎
The inequality can be strict: for $f_n=n\mathbf 1_{(0,1/n)}$ on $[0,1]$, $\liminf f_n=0$ while $\int f_n=1$; for $f_n=\mathbf 1_{[0,1]}$ ($n$ odd), $f_n=\mathbf 1_{[1,2]}$ ($n$ even), $\int\liminf f_n=m(\{1\})=0\lt1$. And $f_n\ge0$ matters: $f_n=-\mathbf 1_{[n,n+1]}$ has $\liminf f_n=0$ but $\int f_n=-1$.
Proof. Discarding a null set, assume $f_n\to f$ and $|f_n|\le g\lt\infty$ everywhere. Then $|f|\le g$, so $f$ is measurable and integrable. The functions $h_n=2g-|f_n-f|$ are non-negative (because $|f_n-f|\le|f_n|+|f|\le2g$) and converge to $2g$. Fatou's lemma gives
$$\begin{aligned}\int_E2g&\le\liminf_n\int_E\big(2g-|f_n-f|\big)\\&=\int_E2g-\limsup_n\int_E|f_n-f|.\end{aligned}$$Since $\int2g$ is finite, $\limsup_n\int|f_n-f|\le0$, i.e. $\int|f_n-f|\to0$. Finally $\big|\int f_n-\int f\big|\le\int|f_n-f|$ by Theorem 4.30(4). ∎
- (Bounded convergence.) If $m(E)\lt\infty$, $|f_n|\le M$ and $f_n\to f$ a.e. on $E$, then $\int_Ef_n\to\int_Ef$.
- (Term-by-term integration.) If $g_k$ are measurable and $\sum_k\int_E|g_k|\lt\infty$, then $\sum_kg_k(x)$ converges absolutely for a.e. $x$, its sum is integrable, and $\displaystyle\int_E\sum_kg_k=\sum_k\int_Eg_k$.
- (Continuity in a parameter.) Let $f(\cdot,t)$ be measurable for $t\in(a,b)$, $t\mapsto f(x,t)$ continuous at $t_0$ for a.e. $x$, and $|f(x,t)|\le g(x)$ with $g\in\mathcal L^1(E)$. Then $F(t)=\int_Ef(x,t)\,dx$ is continuous at $t_0$.
- (Differentiation under the integral sign.) If moreover $\partial f/\partial t$ exists on $E\times(a,b)$ and $|\partial f/\partial t(x,t)|\le h(x)$ with $h\in\mathcal L^1(E)$, then $F'(t)=\int_E\frac{\partial f}{\partial t}(x,t)\,dx$.
Proof. (1) Dominate by the constant $M$, which is integrable because $m(E)\lt\infty$. (2) $G=\sum_k|g_k|$ has $\int G=\sum_k\int|g_k|\lt\infty$ (Theorem 4.30(2)), so $G\lt\infty$ a.e.; there the series converges absolutely, and its partial sums are dominated by $G$; apply the DCT. (3) For any $t_n\to t_0$, $f(\cdot,t_n)\to f(\cdot,t_0)$ a.e. with dominating function $g$. (4) For $s_n\to0$, the mean value theorem writes $\frac{f(x,t+s_n)-f(x,t)}{s_n}=\frac{\partial f}{\partial t}(x,\xi_n)$, which is bounded by $h(x)$ and tends to $\frac{\partial f}{\partial t}(x,t)$; apply the DCT. ∎
- What is the pointwise limit? Find $f(x)=\lim f_n(x)$ for a.e. $x$ (ignore single points such as $x=0$ or $x=1$).
- Is the sequence monotone and $\ge0$? Then the MCT gives $\lim\int f_n=\int f$, even if the value is $\infty$. Typical: $(1-\frac xn)^n\mathbf 1_{[0,n]}\uparrow e^{-x}$, partial sums of non-negative series.
- Is there one integrable $g$ with $|f_n|\le g$? Use the inequalities $|\sin u|\le|u|$, $\log(1+u)\le u$, $(1+\frac xn)^{-n}\le(1+\frac x2)^{-2}$ for $n\ge2$, $(1-\frac xn)^n\le e^{-x}$, Bernoulli's $(1+u)^n\ge1+nu$. Then the DCT gives $\lim\int f_n=\int f$. On a set of finite measure, a constant bound suffices.
- No monotonicity, no domination? Suspect that mass escapes: a spike ($n\mathbf 1_{(0,1/n)}$), a bump moving to infinity ($\mathbf 1_{[n,n+1]}$), or a flattening ($\frac1n\mathbf 1_{[0,n]}$). Substitute (e.g. $t=nx$) to see where the mass goes, compute $\int f_n$ directly, or integrate by parts first. Fatou still gives $\int f\le\liminf\int f_n$ when $f_n\ge0$.
Riemann versus Lebesgue
How do the two integrals compare? On a bounded interval, Lebesgue's integral extends Riemann's; on unbounded intervals (or for unbounded integrands) the improper Riemann integral and the Lebesgue integral agree exactly when the integral converges absolutely.
- (Lebesgue's criterion.) A bounded function $f:[a,b]\to\mathbb{R}$ is Riemann integrable if and only if the set of points where $f$ is discontinuous is a null set.
- If $f$ is Riemann integrable on $[a,b]$, then $f$ is Lebesgue measurable and integrable on $[a,b]$, and its Lebesgue integral equals its Riemann integral.
Proof of (2) (sketch). $f$ is bounded, say $|f|\le M$. Choose partitions $P_1\subseteq P_2\subseteq\cdots$, each refining the previous one, whose upper and lower Darboux sums satisfy $U(f,P_n)-L(f,P_n)\to0$. On each subinterval of $P_n$ let $\ell_n$ be the infimum and $u_n$ the supremum of $f$: these are step functions with $\ell_n\le f\le u_n$ (off the countable set of partition points), $\ell_n$ increasing, $u_n$ decreasing, and $\int\ell_n=L(f,P_n)$, $\int u_n=U(f,P_n)$. Their limits $\ell\le f\le u$ are measurable, and by bounded convergence $\int(u-\ell)=\lim\big(U(f,P_n)-L(f,P_n)\big)=0$. So $u=\ell$ a.e. (Theorem 4.28(3)), hence $f=\ell$ a.e. is measurable (Theorem 4.25(6)) and $\int f=\int\ell=\lim L(f,P_n)$, the Riemann integral. For (1), the discontinuity set is $\bigcup_k\{x:\operatorname{osc}_f(x)\ge\tfrac1k\}$, and Riemann integrability is equivalent to each of these compact sets being coverable by subintervals of arbitrarily small total length. ∎
Proof. The functions $|f|\mathbf 1_{[a,n]}$ increase to $|f|$, so by the MCT and Theorem 4.34, $\int_{[a,\infty)}|f|=\lim_n\int_a^n|f|$, which is finite exactly when the improper integral of $|f|$ converges. In that case, for any $b_k\to\infty$ the functions $f\mathbf 1_{[a,b_k]}$ tend to $f$ and are dominated by $|f|\in\mathcal L^1$, so the DCT gives $\int_a^{b_k}f\to\int_{[a,\infty)}f$: the improper integral exists and has the same value. ∎
- Null $\not\Rightarrow$ countable. The Cantor set is uncountable and null; so is the "no digit 7" set of Example 2(c).
- Null and nowhere dense are independent. $\mathbb{Q}$ is null and dense; a fat Cantor set $K_\alpha$ is nowhere dense with measure $1-\alpha$; $C$ is both.
- A dense open set can have tiny measure (Example 1(e)), and then $m(\overline U)=\infty\ne m(U)$. Measure does not respect closures.
- Not every set is measurable (Vitali); outer measure is countably subadditive but not additive. Also, not every measurable set is Borel: every subset of $C$ is measurable (null), and there are $2^{\mathfrak c}$ of them, but only $\mathfrak c$ Borel sets.
- Continuity from above needs finite measure. $E_n=[n,\infty)$ decreases to $\varnothing$, yet $m(E_n)=\infty$ for all $n$.
- $|f|$ or $f^2$ measurable $\not\Rightarrow$ $f$ measurable: $\mathbf 1_V-\mathbf 1_{V^c}$. Measurable level sets are not enough either (Example 3(e)).
- $f\circ g$ can fail to be measurable for $f$ measurable and $g$ continuous: a homeomorphism built from the Cantor function maps $C$ onto a set of measure $1$, and pulls a non-measurable set back to a subset of $C$. ($g\circ f$ with $g$ continuous is always fine.)
- MCT needs an increasing sequence of non-negative functions. $\mathbf 1_{[n,\infty)}\downarrow0$ with every integral $\infty$; $-\mathbf 1_{[n,\infty)}$ increases to $0$, but every $\int f_n=-\infty$.
- Fatou's inequality can be strict and needs $f_n\ge0$ (see after Theorem 4.31).
- DCT needs one integrable dominating function. $n\mathbf 1_{(0,1/n)}$ (spike), $\mathbf 1_{[n,n+1]}$ (escape to infinity) and $\frac1n\mathbf 1_{[0,n]}$ (flattening; it even converges uniformly) all tend to $0$ with $\int f_n=1$. Uniform convergence is enough only on a set of finite measure.
- Convergence of integrals $\not\Rightarrow$ pointwise convergence. The "typewriter" sequence $\mathbf 1_{[j2^{-k},(j+1)2^{-k}]}$ ($n=2^k+j$, $0\le j\lt2^k$) has $\int f_n\to0$ but converges at no point of $[0,1]$.
- Bounded and Lebesgue integrable $\not\Rightarrow$ Riemann integrable: $\mathbf 1_{\mathbb{Q}}$, $\mathbf 1_{K_\alpha}$. And a pointwise limit of Riemann integrable functions bounded by $1$ need not be Riemann integrable: $\mathbf 1_{\{q_1,\dots,q_n\}}\to\mathbf 1_{\mathbb{Q}\cap[0,1]}$.
- Improper Riemann $\not\Rightarrow$ Lebesgue: $\frac{\sin x}{x}$ on $(0,\infty)$, $\sin(x^2)$ on $(0,\infty)$ — conditionally convergent integrals are not Lebesgue integrals.
- $f\in\mathcal L^1(\mathbb{R})$ does not force $f(x)\to0$ as $x\to\infty$, nor boundedness: $\sum_nn\,\mathbf 1_{[n,\,n+n^{-3}]}$ is integrable (integral $\sum n^{-2}$) and unbounded.
- $f\in\mathcal L^1$ $\not\Rightarrow$ $f^2\in\mathcal L^1$ on $[0,1]$: $x^{-1/2}$. (On a set of finite measure, $f^2\in\mathcal L^1\Rightarrow f\in\mathcal L^1$, since $|f|\le1+f^2$.)
- CSIR Unit 1 · §4.4 Lebesgue Measure — the full proof that $m^*([a,b])=b-a$, Carathéodory's theorem (measurable sets form a σ-algebra containing the Borel sets, countable additivity), regularity, the Cantor and fat Cantor sets in detail, Vitali's construction, the closure properties of measurable functions, and complete proofs of Egorov's and Lusin's theorems.
- CSIR Unit 1 · §4.5 The Lebesgue Integral and Convergence Theorems — the integral of simple functions and its independence of representation, the monotone convergence theorem with all its consequences, Fatou's lemma, the dominated convergence theorem and its corollaries, completeness of $L^1$ and density of continuous functions, Riemann versus Lebesgue (proper and improper), and the Tonelli and Fubini theorems.
Two Labs
Exercises
- 1 Find $m\big(\mathbb{Q}\cup[1,3]\cup((5,6)\setminus\mathbb{Q})\big)$.
- 2 Find $m\big(\bigcup_{n\ge1}(n,\,n+\tfrac1{n^2})\big)$, $\ m\big(\bigcup_{n\ge1}(0,\tfrac1n)\big)$ and $\ m\big(\bigcap_{n\ge1}(0,1+\tfrac1n)\big)$.
- 3 Let $T$ be the set of $x\in[0,1]$ whose decimal expansion contains the digit $3$ at least once. Find $m(T)$.
- 4 Prove directly from Definition 4.15 that every set $Z$ with $m^*(Z)=0$ is measurable.
- 5 At stage $n$ remove from each of the $2^{n-1}$ remaining intervals the concentric open interval of length $\beta\,4^{-n}$ (with $0\lt\beta\le1$). Find the measure of the limit set as a function of $\beta$, and the value of $\beta$ that gives measure $0.9$.
- 6 (Borel–Cantelli.) Let $E_1,E_2,\dots$ be measurable with $\sum_nm(E_n)\lt\infty$. Prove that the set of points lying in infinitely many $E_n$ is null.
- 7 Let $A_1,\dots,A_5\subseteq[0,1]$ be measurable with $m(A_k)\ge0.85$ for each $k$. Show that $m(A_1\cap\cdots\cap A_5)\ge0.25$, and give an example with equality.
- 8 Give an example or show that none exists: (a) an open set $U$, dense in $\mathbb{R}$, with $m(U)\lt1$; (b) a closed set $F\subsetneq[0,1]$ with $m(F)=1$; (c) an uncountable null set; (d) a measurable $E\subseteq[0,1]$ with $m(E\cap I)=\tfrac12\ell(I)$ for every interval $I\subseteq[0,1]$ (a statement only; no proof required).
- 1 Show that $f=\mathbf 1_C+x\mathbf 1_{\mathbb{Q}}$ is measurable on $[0,1]$ and compute $\int_{[0,1]}f$.
- 2 Compute $\int_{[0,1]}f$, where $f(x)=x^2$ for irrational $x$ and $f(x)=1$ for rational $x$.
- 3 Compute $\int_{(0,1]}\lfloor1/x\rfloor^{-2}\,dx$ exactly in terms of $\zeta(2)=\sum k^{-2}$ and $\zeta(3)=\sum k^{-3}$, and numerically.
- 4 For which real $p$ is $x^{-p}$ integrable on $(0,1]$? On $[1,\infty)$? On $(0,\infty)$?
- 5 Let $f\ge0$ be measurable on $[0,1]$ with $\int f=2$. Show that $m(\{f\ge10\})\le0.2$, and give an $f$ for which equality holds.
- 6 Let $f(x)=x$ on $[0,1]$ and let $\varphi_n$ be the simple functions of Theorem 4.26. Compute $\int\varphi_2$ and $\int\varphi_n$ for $n\ge1$, and check that they increase to $\int f$.
- 7 Prove: if $f$ is measurable on $E$ and $\int_E|f|=0$, then $\int_Af=0$ for every measurable $A\subseteq E$. Conversely, if $f\in\mathcal L^1(E)$ and $\int_Af=0$ for every measurable $A\subseteq E$, then $f=0$ a.e.
- 8 Let $f$ be measurable and finite a.e. on $[0,1]$. Show that for every $\varepsilon\gt0$ there is $M$ with $m(\{|f|\gt M\})\lt\varepsilon$ (even if $f$ is not integrable).
- 1 $\displaystyle\lim_{n\to\infty}\int_0^1\frac{nx}{1+n^2x^2}\,dx$.
- 2 $\displaystyle\lim_{n\to\infty}\int_0^\infty\frac{dx}{(1+x/n)^n\,x^{1/n}}$.
- 3 $\displaystyle\lim_{n\to\infty}\int_0^1\frac{1+nx}{(1+x)^n}\,dx$.
- 4 $\displaystyle\lim_{n\to\infty}\int_0^{\pi/2}(\sin x)^{1/n}\,dx$.
- 5 $\displaystyle\lim_{n\to\infty}\int_0^n\Big(1+\frac xn\Big)^ne^{-2x}\,dx$.
- 6 Show that $\displaystyle\int_0^\infty\frac{\sin x}{e^x-1}\,dx=\sum_{k\ge1}\frac1{k^2+1}$, justifying the interchange, and evaluate it numerically.
- 7 Give non-negative measurable $f_n$ on $[0,1]$ with $f_n\to f$ everywhere, $\int f_n=1$ for all $n$, and $\int f=\frac12$. Which theorem says that $\int f\gt1$ is impossible?
- 8 For $t\gt0$ let $F(t)=\int_0^\infty e^{-tx}\frac{\sin x}{x}\,dx$. Show that $F'(t)=-\frac1{1+t^2}$ and $F(t)\to0$ as $t\to\infty$, and deduce $F(t)=\frac\pi2-\arctan t$.
- 9 Modelling. A capacitor discharge is modelled by the current pulse $i_n(t)=n\,e^{-nt}$ amperes ($t$ in seconds) through a resistor of $R=10\ \Omega$. Find, as $n\to\infty$: the pointwise limit of $i_n(t)$ for $t\gt0$; the charge $Q_n=\int_0^1i_n\,dt$ delivered in the first second; and the energy $W_n=\int_0^1R\,i_n^2\,dt$ dissipated. Interpret.
- 1 A bounded Lebesgue integrable function on $[0,1]$ is Riemann integrable.
- 2 If Riemann integrable $f_n:[0,1]\to[0,1]$ converge pointwise to $f$, then $f$ is Riemann integrable; and in any case $\int f_n\to\int f$ (Lebesgue integrals).
- 3 If $f:[0,1]\to\mathbb{R}$ is bounded and continuous except on the Cantor set, then $f$ is Riemann integrable.
- 4 $\frac{\sin x}{x^{3/2}}$ is Lebesgue integrable on $(0,\infty)$.
- 5 If $f\in\mathcal L^1(\mathbb{R})$, then $f(x)\to0$ as $x\to\infty$.
- 6 If $f\in\mathcal L^1(\mathbb{R})$ is uniformly continuous, then $f(x)\to0$ as $x\to\infty$.
- 7 If $f\in\mathcal L^1([0,1])$, then $f^2\in\mathcal L^1([0,1])$.
- 8 If $f_n\ge0$ are measurable on $[0,1]$, $f_n\to0$ a.e. and $\int f_n\to0$, then there is $g\in\mathcal L^1$ with $f_n\le g$ for all $n$.
E1. GATE MA · MCQ Let $A=A_1\cup A_2\cup A_3$, where $A_1=\bigcup_{n\ge1}[n,\,n+2^{-n}]$, $A_2=\mathbb{Q}\cap[-1,0]$ and $A_3=[-3,-2]\setminus\mathbb{Q}$. The Lebesgue measure of $A$ is (A) $1$; (B) $2$; (C) $3$; (D) $\infty$.
E2. GATE MA · MCQ $\displaystyle\lim_{n\to\infty}\int_0^\infty\Big(1+\frac xn\Big)^{-n}dx$ (the integrals taken for $n\ge2$) equals (A) $0$; (B) $\tfrac12$; (C) $1$; (D) $e$.
E3. GATE MA · MSQ Which of the following statements is/are true? (One or more options may be correct.) (A) Every subset of the Cantor set is Lebesgue measurable. (B) There is a closed set $F\subseteq[0,1]$ with empty interior and $m(F)=0.99$. (C) Every open set $U\subseteq\mathbb{R}$ that is dense in $\mathbb{R}$ has $m(U)=\infty$. (D) If $E\subseteq[0,1]$ is measurable and $m(E)=1$, then $E$ is dense in $[0,1]$.
E4. GATE MA · MSQ For $n\ge2$ let $f_n=n\,\mathbf 1_{[1/n,\,2/n]}$ on $[0,1]$. Which of the following is/are true? (One or more options may be correct.) (A) $f_n(x)\to0$ for every $x\in[0,1]$. (B) $\displaystyle\lim_{n\to\infty}\int_0^1f_n=0$. (C) $\displaystyle\int_0^1\liminf_nf_n\lt\liminf_n\int_0^1f_n$. (D) There is $g\in\mathcal L^1[0,1]$ with $f_n\le g$ for all $n\ge2$.
E5. GATE MA · NAT The value of $\displaystyle\int_0^\infty\frac{x^2}{e^x-1}\,dx$ is ______ (correct to two decimal places).
E6. GATE MA · NAT The value of $\displaystyle\lim_{n\to\infty}\int_0^\infty\frac{n^2x\,e^{-nx}}{1+x^2}\,dx$ is ______ (correct to two decimal places).
Suggested plan — 3 lectures × 60 min.
- Measure. Open with $\mathbf 1_{\mathbb{Q}}$ and the question "what should $\int_0^1\mathbf 1_{\mathbb{Q}}$ be?". Definition 4.14, Theorem 4.21 (prove (2) and (5) on the board; sketch the chain argument in (3)). Definition 4.15 and Theorem 4.22 as a toolkit — prove continuity from below and above, and show why $m(E_1)\lt\infty$ is needed. Example 1 (let the class build the dense open set of measure $\varepsilon$). Vitali in ten minutes. Definition 4.16, Theorem 4.24 with Interactive 1: compare "middle fraction $r$" (always null) with "gap $\alpha3^{-n}$" (measure $1-\alpha$). Example 2.
- Measurable functions and the integral. Definition 4.17, Theorem 4.25 (do the $f+g$ trick with rationals), Example 3 as a quick-fire prove-or-disprove. Simple functions and Theorem 4.26; Egorov and Lusin as statements, with the $\mathbf 1_{\mathbb{Q}}$ warning. Definitions 4.19–4.20, Theorem 4.28 (Markov on the board), the MCT with full proof, Example 4.
- Convergence theorems and Riemann versus Lebesgue. Fatou's lemma and the DCT with proofs (the DCT proof is Fatou applied to $2g-|f_n-f|$). Project Interactive 2 and go through all six sequences, asking each time "which theorem, if any?". The strategy box, Examples 5 and 6, Theorems 4.34–4.35, Example 7. GATE corner E4 and E6 live.
Discussion questions. (1) The flattening sequence $\frac1n\mathbf 1_{[0,n]}$ converges uniformly to $0$, yet $\int f_n=1$. Which interchange theorem of §4.2 fails here, and why does it not contradict that theorem? (2) Is there a "smallest" dominating function for a sequence, and what does its integrability have to do with the DCT? (Interactive 2, Exercise IV.8.) (3) Measure zero and nowhere dense are both notions of "small". Find sets that are small in one sense and large in the other, and discuss which notion the Riemann integral cares about.
Misconceptions to watch for. Believing null sets are countable or nowhere dense; using continuity from above on sets of infinite measure; concluding $\lim\int f_n=0$ from $f_n\to0$ pointwise; looking for a dominating function that depends on $n$; applying the MCT to decreasing sequences; forgetting that Fatou needs $f_n\ge0$; thinking that every improper Riemann integral is a Lebesgue integral; thinking that a bounded Lebesgue integrable function is Riemann integrable.
Suggested homework. I(2, 3, 5, 6, 8), II(3, 5, 6, 7), III(1, 2, 5, 6, 8, 9), IV(1, 2, 5, 6, 8); GATE corner E1, E3, E5.
Research question. How many real numbers can be approximated by fractions unusually well — and why does the answer "almost none" matter for planets, asteroids and particle beams?
Why it matters. In celestial mechanics and accelerator physics, motions whose frequency ratio is very close to a fraction $p/q$ can resonate and become unstable (the Kirkwood gaps in the asteroid belt, the resonance lines that beam designers at CERN and other laboratories steer away from). The Kolmogorov–Arnold–Moser theory shows that most motions are nevertheless stable, and a key ingredient is a measure statement: the set of ratios that are too well approximable by fractions is small. The tool is exactly the Borel–Cantelli lemma of Exercise I.6.
What to do.
- For $q\ge2$ and $0\le p\le q$ let $I_{p,q}=\big(\frac pq-q^{-3},\ \frac pq+q^{-3}\big)$, and let $A_{Q_0,Q}$ be the union of all $I_{p,q}\cap[0,1]$ with $Q_0\le q\le Q$. Write a short program that sorts and merges these intervals and computes $m(A_{Q_0,Q})$ for $Q_0=2,10,100$ and $Q=100,1000,3000$.
- Compare each value with the subadditivity bound $\sum_{q\ge Q_0}\frac{2(q+1)}{q^3}$. Why does the bound use $q+1$ intervals of length $2q^{-3}$?
- Deduce that the set $W_3$ of all $x\in[0,1]$ with $|x-\frac pq|\lt q^{-3}$ for infinitely many $q$ is a null set. Is it empty? (Try numbers like $\sum_k10^{-k!}$.)
- Repeat step 1 with $q^{-2}$ in place of $q^{-3}$. Dirichlet's theorem says that every irrational $x$ satisfies $|x-\frac pq|\lt q^{-2}$ for infinitely many $q$. What should $m(A_{100,Q})$ do as $Q$ grows, and does your program agree?
Tools: Python (a sort and a merge loop; no libraries needed) or any spreadsheet for the bounds.
Hand in: a table of $m(A_{Q_0,Q})$ for both exponents with the bounds; a five-line proof that $W_3$ is null; one paragraph explaining in words why the exponent $2$ behaves so differently from the exponent $3$.
Going further. Khintchine's theorem: for decreasing $\psi$, almost every $x$ has infinitely many solutions of $|x-\frac pq|\lt\frac{\psi(q)}{q}$ if $\sum\psi(q)=\infty$, and almost none if $\sum\psi(q)\lt\infty$. The Jarník–Besicovitch theorem measures the null set $W_\tau$ more finely: its Hausdorff dimension is $2/\tau$.
🧪 Self-check quiz
Q1. The Lebesgue outer measure of the set of irrational numbers in $[0,2]$ is
Q2. For $f_n=n\,\mathbf 1_{(0,1/n)}$ on $[0,1]$, the pair $\big(\int\lim_nf_n,\ \lim_n\int f_n\big)$ is
Q3. Which hypothesis does the monotone convergence theorem require?
Q4. The indicator function $\mathbf 1_{\mathbb{Q}}$ on $[0,1]$ is
Q5. A closed set $F\subseteq[0,1]$ with empty interior can have Lebesgue measure