Chapter 4 · Real Analysis

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$.

📘 Definition 4.14 — Lebesgue outer measure
For every $A\subseteq\mathbb{R}$, the Lebesgue outer measure of $A$ is $$m^*(A)=\inf\sum_{k\ge1}\ell(I_k)\ \in[0,\infty],$$ where the infimum is taken over all sequences of open intervals $I_k$ with $A\subseteq\bigcup_{k\ge1}I_k$. A set with $m^*(A)=0$ is a null set (a set of measure zero): it can be covered by intervals of arbitrarily small total length.
📐 Theorem 4.21 — Properties of outer measure
  1. (Monotonicity.) $m^*(\varnothing)=0$, and $A\subseteq B\Rightarrow m^*(A)\le m^*(B)$.
  2. (Countable subadditivity.) $m^*\big(\bigcup_kA_k\big)\le\sum_km^*(A_k)$ for any sets $A_1,A_2,\dots$.
  3. (Intervals.) $m^*(I)=\ell(I)$ for every interval $I$.
  4. (Invariance.) $m^*(A+t)=m^*(A)$ and $m^*(cA)=|c|\,m^*(A)$ for all real $t,c$.
  5. (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.

📘 Definition 4.15 — Measurable sets, σ-algebras and Borel sets

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$.

📐 Theorem 4.22 — Lebesgue measure
  1. $\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$.
  2. (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$.
  3. (Continuity from below.) If $E_1\subseteq E_2\subseteq\cdots$ are measurable, then $m\big(\bigcup_kE_k\big)=\lim_km(E_k)$.
  4. (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)$.
  5. (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.

📐 Theorem 4.23 — Vitali: a non-measurable set
There is a set $V\subseteq[0,1]$ that is not Lebesgue measurable. Consequently there is no countably additive, translation-invariant function on all subsets of $\mathbb{R}$ that gives intervals their length, and $m^*$ is not additive on all pairs of disjoint sets.

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. ∎

✏️ Example 1 — Measures of sets built from intervals and rationals
Find (a) $m(\mathbb{Q}\cap[0,1])$; (b) $m([0,1]\setminus\mathbb{Q})$; (c) $m\big([0,2]\cup((3,5)\setminus\mathbb{Q})\cup\{7\}\big)$; (d) $m\big(\bigcup_{n\ge1}(n,\,n+3^{-n})\big)$. (e) Given $\varepsilon\gt0$, construct an open set $U$ that is dense in $\mathbb{R}$ and has $m(U)\le\varepsilon$. What can you say about $F=[0,1]\setminus U$?
(a) $0$ $\mathbb{Q}\cap[0,1]$ is countable, hence null (Theorem 4.21(5)).
(b) $1$ Removing a null set does not change the measure: $m([0,1]\setminus\mathbb{Q})=m([0,1])=1$. The irrationals of $[0,1]$ contain no interval, yet they have full measure.
(c) $4$ The three pieces are disjoint and measurable, with measures $2$, $2-0=2$ and $0$. Additivity gives $4$.
(d) $\tfrac12$ The intervals are disjoint, so $m=\sum_{n\ge1}3^{-n}=\dfrac{1/3}{1-1/3}=\tfrac12$.
(e) Construction List the rationals as $q_1,q_2,\dots$ and put $U=\bigcup_k\big(q_k-\varepsilon2^{-k-1},\,q_k+\varepsilon2^{-k-1}\big)$. It is open, it contains $\mathbb{Q}$ (so it is dense), and $m(U)\le\sum_k\varepsilon2^{-k}=\varepsilon$ by subadditivity.
(e) The complement $F=[0,1]\setminus U$ is closed, $m(F)\ge1-\varepsilon$, and $F$ contains no interval (any interval meets $\mathbb{Q}\subseteq U$). So $F$ is a closed, nowhere dense set of measure close to $1$: "small" in the topological sense (§8.2) and "large" in the sense of measure. The two notions of size are independent.

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.

📘 Definition 4.16 — The Cantor set and fat Cantor sets

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.

📐 Theorem 4.24 — Properties of Cantor sets
  1. $C$ is compact, nowhere dense, uncountable (it has the cardinality of $\mathbb{R}$), and $m(C)=0$.
  2. 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. ∎

✏️ Example 2 — Cantor-type constructions
(a) Show that $\tfrac14\in C$ and $\tfrac34\in C$, although neither is an end point of a removed interval. (b) From $[0,1]$ remove the open middle interval of length $\tfrac14$; from each of the two remaining intervals remove the concentric open interval of length $\tfrac1{16}$; at stage $n$ remove from each of the $2^{n-1}$ intervals the concentric open interval of length $4^{-n}$. List the intervals left after stage 2 and find the measure of the limit set $S$. (c) Let $D$ be the set of $x\in[0,1]$ that have a decimal expansion with no digit $7$. Find $m(D)$, and decide whether $D$ is countable.
(a) In base $3$, $0.\overline{02}_3=\frac{2}{9}\cdot\frac1{1-1/9}=\frac14$ and $0.\overline{20}_3=\frac23\cdot\frac{1}{1-1/9}=\frac34$. Both use only the digits $0,2$, so both lie in $C$. End points of removed intervals have terminating ternary expansions; $\tfrac14$ does not. So $C$ is more than its end points (which are countable).
(b) Stage 2 Stage 1 leaves $[0,\tfrac38]\cup[\tfrac58,1]$ (each of length $\tfrac38$). Removing a centred gap of length $\tfrac1{16}=\tfrac2{32}$ from each leaves $[0,\tfrac5{32}]\cup[\tfrac7{32},\tfrac{12}{32}]\cup[\tfrac{20}{32},\tfrac{25}{32}]\cup[\tfrac{27}{32},1]$, four intervals of length $\tfrac5{32}$.
(b) Measure The total length removed is $\sum_{n\ge1}2^{n-1}4^{-n}=\tfrac12\sum_{n\ge1}2^{-n}=\tfrac12$, so $m(S)=\tfrac12$. (Feasibility: by induction the stage-$n$ intervals have length $2^{-n-1}+2^{-2n-1}$, which exceeds the next gap $4^{-n-1}$.) $S$ is a compact, nowhere dense set of measure $\tfrac12$ — a fat Cantor set of a slightly different family.
(c) After choosing the first $n$ digits from $\{0,\dots,9\}\setminus\{7\}$ we are left with $9^n$ intervals of length $10^{-n}$: total $0.9^n$. Since $D$ is contained in this union for every $n$, $m(D)\le0.9^n\to0$, so $m(D)=0$. (Numbers with two decimal expansions are countable and do not matter.) But $D$ is uncountable: it contains every number whose decimal digits are $0$s and $1$s, and those are in bijection with infinite $0$–$1$ sequences. Consequently the set of numbers in $[0,1]$ whose expansion does contain a $7$ has measure $1$.
🧭 Computing a measure — GATE routine
  1. Throw away countable pieces (rationals, algebraic numbers, end points, finite sets): they are null and never change a measure.
  2. 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.
  3. 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.
  4. 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).

📘 Definition 4.17 — Measurable functions; almost everywhere

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.

📐 Theorem 4.25 — Measurable functions are closed under the usual operations
Let $f,g$ be measurable on $E$ (real-valued where arithmetic is involved) and $(f_n)$ a sequence of measurable functions on $E$.
  1. $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.
  2. 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$).
  3. $f+g$, $fg$, $cf$, $\max(f,g)$, $\min(f,g)$, $|f|$, $f^+=\max(f,0)$ and $f^-=\max(-f,0)$ are measurable.
  4. $\sup_nf_n$, $\inf_nf_n$, $\limsup_nf_n$, $\liminf_nf_n$ are measurable, and so is $\lim_nf_n$ wherever the limit exists.
  5. $\varphi\circ f$ is measurable for every continuous $\varphi:\mathbb{R}\to\mathbb{R}$.
  6. 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)). ∎

📘 Definition 4.18 — Simple functions
A simple function on $E$ is a measurable $\varphi:E\to\mathbb{R}$ with finitely many values. If its distinct values are $a_1,\dots,a_r$ and $E_i=\{\varphi=a_i\}$, then the $E_i$ are disjoint measurable sets with union $E$ and $\varphi=\sum_{i=1}^ra_i\mathbf 1_{E_i}$ (the canonical form). Step functions are simple; so is $\mathbf 1_{\mathbb{Q}}$, which is not a step function.
📐 Theorem 4.26 — Approximation by simple functions
If $f:E\to[0,\infty]$ is measurable, the simple functions $$\varphi_n=\min\Big(n,\ \frac{\lfloor2^nf\rfloor}{2^n}\Big)$$ (with $\varphi_n=n$ where $f=\infty$) satisfy $0\le\varphi_1\le\varphi_2\le\cdots\le f$ and $\varphi_n(x)\to f(x)$ for every $x$; the convergence is uniform on any set where $f$ is bounded. Every measurable $f$ is a pointwise limit of simple functions (apply this to $f^+$ and $f^-$).

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.

📐 Theorem 4.27 — Egorov and Lusin (statements)
  1. (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$.
  2. (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.

✏️ Example 3 — Measurable or not? Prove or disprove
(a) Every monotone $f:\mathbb{R}\to\mathbb{R}$ is measurable. (b) If $f^2$ is measurable, then $f$ is measurable. (c) If $f:\mathbb{R}\to\mathbb{R}$ is differentiable, then $f'$ is measurable. (d) If $f$ is measurable and $g(x)=f(x)$ for every $x$ outside the Cantor set, then $g$ is measurable. (e) If every level set $\{f=c\}$ ($c\in\mathbb{R}$) is measurable, then $f$ is measurable.
(a) True For increasing $f$, $\{f\gt a\}$ is an interval of the form $(c,\infty)$ or $[c,\infty)$ (or $\varnothing$, $\mathbb{R}$); for decreasing $f$ it is a left half-line. Intervals are measurable. Note that a monotone function may have countably many discontinuities — measurability does not care.
(b) False Let $V$ be Vitali's set and $f=\mathbf 1_V-\mathbf 1_{\mathbb{R}\setminus V}$. Then $f^2\equiv1$ and $|f|\equiv1$ are measurable, but $\{f\gt0\}=V\notin\mathcal M$.
(c) True $f'(x)=\lim_{n\to\infty}n\big(f(x+\tfrac1n)-f(x)\big)$ for every $x$, and each difference quotient is continuous because $f$ is. A pointwise limit of measurable functions is measurable (Theorem 4.25(4)).
(d) True $\{f\ne g\}\subseteq C$, a null set; Theorem 4.25(6). Values on a null set never matter for measurability.
(e) False Put $f(x)=e^x$ for $x\in V$ and $f(x)=-e^x$ for $x\notin V$. Each level set has at most one point (so it is measurable), but $\{f\gt0\}=V$. The definition needs the superlevel sets $\{f\gt a\}$, not the level sets.

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$.

📘 Definition 4.19 — The Lebesgue integral of non-negative functions

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).

📘 Definition 4.20 — Integrable functions; $\mathcal L^1(E)$
A measurable $f:E\to[-\infty,\infty]$ is (Lebesgue) integrable if $\int_E|f|\lt\infty$, and then $\displaystyle\int_Ef=\int_Ef^+-\int_Ef^-$, where $f=f^+-f^-$ and $|f|=f^++f^-$. The integrable functions on $E$ form $\mathcal L^1(E)$. Identifying functions that agree a.e. gives the normed space $L^1(E)$ with $\|f\|_1=\int_E|f|$, which is complete (§8.1).

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$.

📐 Theorem 4.28 — Basic properties of the integral
Let $f,g:E\to[0,\infty]$ be measurable.
  1. (Monotonicity.) $f\le g\Rightarrow\int_Ef\le\int_Eg$; and $A\subseteq B\subseteq E$ measurable $\Rightarrow\int_Af\le\int_Bf$.
  2. (Markov–Chebyshev inequality.) For every $t\gt0$, $\ m(\{f\ge t\})\le\dfrac1t\displaystyle\int_Ef$.
  3. $\int_Ef=0$ if and only if $f=0$ a.e.
  4. If $\int_Ef\lt\infty$, then $f\lt\infty$ a.e.
  5. 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$.

📐 Theorem 4.29 — Monotone convergence theorem (MCT)
Let $f_n:E\to[0,\infty]$ be measurable with $0\le f_1\le f_2\le\cdots$ and $f_n\to f$ a.e. on $E$. Then $$\lim_{n\to\infty}\int_Ef_n=\int_Ef.$$

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$. ∎

📐 Theorem 4.30 — Consequences of the MCT
  1. (Additivity.) For measurable $f,g\ge0$ and constants $a,b\ge0$: $\int_E(af+bg)=a\int_Ef+b\int_Eg$.
  2. (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$).
  3. (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$.
  4. (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$.

✏️ Example 4 — Computing Lebesgue integrals
Compute each integral over $[0,1]$ or $(0,1]$, or show that it is infinite. (a) $f(x)=7$ for $x\in\mathbb{Q}$, $f(x)=x^2$ for $x\in C\setminus\mathbb{Q}$, and $f(x)=\sin\pi x$ otherwise. (b) $g(x)=1/\lfloor1/x\rfloor$ on $(0,1]$. (c) $h(x)=\lfloor1/x\rfloor$ on $(0,1]$. (d) $N(x)=n$ if $x$ lies in one of the open intervals removed at stage $n$ of the construction of the Cantor set, and $N(x)=0$ for $x\in C$.
(a) $\tfrac2\pi$ $f=\sin\pi x$ except on the null set $\mathbb{Q}\cup C$, so $\int f=\int_0^1\sin\pi x\,dx=\tfrac2\pi\approx0.6366$ (Theorem 4.28(5), and Theorem 4.34 for the Riemann integral of $\sin\pi x$).
(b) Level sets $\lfloor1/x\rfloor=k$ exactly on $A_k=\big(\tfrac1{k+1},\tfrac1k\big]$, with $m(A_k)=\tfrac1k-\tfrac1{k+1}=\tfrac1{k(k+1)}$. The $A_k$ are disjoint with union $(0,1]$.
(b) Sum By Theorem 4.30(3), $\int g=\sum_{k\ge1}\frac1k\cdot\frac1{k(k+1)}$. Partial fractions give $\frac1{k^2(k+1)}=\frac1{k^2}-\frac1k+\frac1{k+1}$, and the last two terms telescope to $-1$: so $\int g=\frac{\pi^2}6-1\approx0.6449$.
(c) $\infty$ $\int h=\sum_kk\cdot\frac1{k(k+1)}=\sum_k\frac1{k+1}=\infty$. So $h$ is measurable, finite everywhere, and not integrable. (Compare $h\ge\frac1x-1$ and $\int_0^1\frac{dx}x=\infty$.)
(d) $3$ At stage $n$ we remove $2^{n-1}$ intervals of length $3^{-n}$, so $m(\{N=n\})=2^{n-1}3^{-n}$, and $\{N=0\}=C$ is null. Hence $\int N=\sum_{n\ge1}n\,\frac{2^{n-1}}{3^n}=\frac13\sum_{n\ge1}n\big(\tfrac23\big)^{n-1}$, and with $\sum_{n\ge1}nr^{n-1}=\frac1{(1-r)^2}$ this is $\frac13\cdot9=3$.

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.

📐 Theorem 4.31 — Fatou's lemma
If $f_n:E\to[0,\infty]$ are measurable, then $$\int_E\liminf_{n\to\infty}f_n\ \le\ \liminf_{n\to\infty}\int_Ef_n.$$

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$.

📐 Theorem 4.32 — Lebesgue's dominated convergence theorem (DCT)
Let $f_n:E\to\mathbb{R}$ be measurable with $f_n\to f$ a.e. on $E$, and suppose there is one $g\in\mathcal L^1(E)$ with $|f_n|\le g$ a.e. for every $n$. Then $f\in\mathcal L^1(E)$ and $$\lim_{n\to\infty}\int_E|f_n-f|=0,$$ and hence $$\lim_{n\to\infty}\int_Ef_n=\int_Ef.$$

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). ∎

📐 Theorem 4.33 — Corollaries: bounded convergence, series, parameters
  1. (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$.
  2. (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$.
  3. (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$.
  4. (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. ∎

🧭 Problem-solving strategy — $\lim\int f_n$ in four questions
  1. 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$).
  2. 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.
  3. 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.
  4. 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$.
✏️ Example 5 — Four limits of integrals
Evaluate (a) $\displaystyle\lim_{n\to\infty}\int_0^\infty\frac{n\sin(x/n)}{x(1+x^2)}\,dx$; (b) $\displaystyle\lim_{n\to\infty}\int_0^n\Big(1-\frac xn\Big)^ne^{x/2}\,dx$; (c) $\displaystyle\lim_{n\to\infty}\int_0^1n^2xe^{-nx}\,dx$; (d) $\displaystyle\lim_{n\to\infty}\int_0^1\frac{nx^{n-1}}{1+x}\,dx$.
(a) DCT: $\tfrac\pi2$ For $x\gt0$, $n\sin(x/n)\to x$, so the integrand tends to $\frac1{1+x^2}$. Since $|\sin u|\le|u|$, the integrand is bounded by $\frac1{1+x^2}$, which is integrable on $(0,\infty)$. DCT: the limit is $\int_0^\infty\frac{dx}{1+x^2}=\frac\pi2$.
(b) MCT: $2$ Write the integrand as $f_n(x)=\big(1-\frac xn\big)^n\mathbf 1_{[0,n]}(x)\,e^{x/2}$. For fixed $x\ge0$, $\big(1-\frac xn\big)^n$ increases with $n$ once $n\ge x$ (a standard consequence of the AM–GM inequality) and tends to $e^{-x}$, so $f_n\uparrow e^{-x/2}$. MCT: the limit is $\int_0^\infty e^{-x/2}dx=2$. (Numerically $\int f_{1000}\approx1.992$.)
(c) Neither: $1$ For every $x\in[0,1]$, $n^2xe^{-nx}\to0$. But with $t=nx$, $\int_0^1n^2xe^{-nx}dx=\int_0^nte^{-t}dt=1-(n+1)e^{-n}\to1$. The mass ($=1$) concentrates near $x=0$ in a spike of height $n/e$ at $x=\frac1n$; no integrable function dominates all the $f_n$ (that would force the limit $0$ by the DCT). Fatou's inequality $0\le1$ is strict.
(d) Integrate by parts first: $\tfrac12$ The integrand tends to $0$ for $x\in[0,1)$, but again mass piles up, now at $x=1$. By parts, $\int_0^1\frac{nx^{n-1}}{1+x}dx=\Big[\frac{x^n}{1+x}\Big]_0^1+\int_0^1\frac{x^n}{(1+x)^2}dx$, which is $\frac12+\int_0^1\frac{x^n}{(1+x)^2}dx$. The last integrand is at most $1$ and tends to $0$ a.e., so by bounded convergence the integral tends to $0$. The limit is $\frac12$ (numerically $0.5025$ at $n=100$).
✏️ Example 6 — Integrating series term by term
Show that (a) $\displaystyle\int_0^\infty\frac{x}{e^x-1}\,dx=\frac{\pi^2}{6}$ and (b) $\displaystyle\int_0^1\frac{\log(1+x)}{x}\,dx=\frac{\pi^2}{12}$, justifying each interchange.
(a) Expand For $x\gt0$, $\frac{x}{e^x-1}=\frac{xe^{-x}}{1-e^{-x}}=\sum_{k\ge1}xe^{-kx}$, a series of non-negative terms.
(a) Integrate By Theorem 4.30(2) no further justification is needed: $\int_0^\infty xe^{-kx}dx=\frac1{k^2}$, so the integral is $\sum_{k\ge1}\frac1{k^2}=\frac{\pi^2}6\approx1.6449$.
(b) Expand For $0\le x\lt1$, $\frac{\log(1+x)}{x}=\sum_{k\ge1}g_k(x)$ with $g_k(x)=\frac{(-1)^{k+1}x^{k-1}}{k}$. The terms change sign, so we need Theorem 4.33(2): $\sum_k\int_0^1|g_k|=\sum_k\frac1{k^2}\lt\infty$.
(b) Integrate Hence $\int_0^1\frac{\log(1+x)}{x}dx=\sum_{k\ge1}\frac{(-1)^{k+1}}{k^2}$. Subtracting twice the even terms, $\sum_k\frac{(-1)^{k+1}}{k^2}=\big(1-\frac2{2^2}\big)\sum_k\frac1{k^2}$, which is $\frac{\pi^2}{12}\approx0.8225$.

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.

📐 Theorem 4.34 — Riemann integrable functions are Lebesgue integrable
  1. (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.
  2. 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. ∎

📐 Theorem 4.35 — Improper integrals and Lebesgue integrals
Let $f$ be Riemann integrable on every $[a,b]$ with $b\gt a$. Then $f\in\mathcal L^1([a,\infty))$ if and only if the improper integral $\int_a^\infty|f(x)|\,dx$ converges, and in that case $\int_{[a,\infty)}f$ equals the improper Riemann integral $\int_a^\infty f$. The same holds for an integrand that is unbounded near an end point (for example on $(0,1]$, with $[\delta,1]$ in place of $[a,b]$).

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. ∎

✏️ Example 7 — Riemann, Lebesgue, both or neither?
For each function decide whether it is Riemann integrable (properly or as an improper integral) and whether it is Lebesgue integrable, and give the value where it exists. (a) $\mathbf 1_{\mathbb{Q}}$ on $[0,1]$. (b) Thomae's function $t(x)=\frac1q$ for $x=\frac pq$ in lowest terms ($q\ge1$), $t(x)=0$ for irrational $x$, on $[0,1]$. (c) $\mathbf 1_{K_{1/2}}$ on $[0,1]$. (d) $x^{-1/2}$ on $(0,1]$. (e) $\frac{\sin x}{x}$ on $(0,\infty)$.
(a) Lebesgue only $\mathbf 1_{\mathbb{Q}}$ is discontinuous at every point (rationals and irrationals are both dense), and $[0,1]$ is not null, so it is not Riemann integrable; every upper sum is $1$ and every lower sum is $0$. Its Lebesgue integral is $m(\mathbb{Q}\cap[0,1])=0$.
(b) Both, value $0$ Thomae's function is continuous at every irrational and discontinuous at every rational; the discontinuity set $\mathbb{Q}\cap[0,1]$ is null, so it is Riemann integrable. Since $t=0$ a.e., both integrals are $0$.
(c) Lebesgue only, value $\tfrac12$ $\mathbf 1_{K}$ ($K=K_{1/2}$) is continuous on the open set $[0,1]\setminus K$ and discontinuous at each point of $K$ (every neighbourhood meets the complement, as $K$ has empty interior). The discontinuity set $K$ has measure $\tfrac12\gt0$: not Riemann integrable. Lebesgue: $\int\mathbf 1_K=m(K)=\tfrac12$. Unlike (a), this function cannot be repaired by changing it on a null set.
(d) Improper Riemann and Lebesgue, value $2$ It is unbounded, so not properly Riemann integrable, but $\int_\delta^1x^{-1/2}dx=2-2\sqrt\delta\to2$, and the integrand is positive, so Theorem 4.35 (or the MCT) gives the Lebesgue integral $2$. Lebesgue's integral handles unbounded functions directly.
(e) Improper Riemann only $\int_0^b\frac{\sin x}{x}dx\to\frac\pi2$, but the convergence is conditional: on $[k\pi,(k+1)\pi]$, $\frac{|\sin x|}{x}\ge\frac{|\sin x|}{(k+1)\pi}$, whose integral is $\frac{2}{(k+1)\pi}$, and $\sum_k\frac{2}{(k+1)\pi}=\infty$. So $\int_{(0,\infty)}\big|\frac{\sin x}x\big|=\infty$ and $\frac{\sin x}{x}\notin\mathcal L^1(0,\infty)$; it has no Lebesgue integral (its positive and negative parts both have integral $\infty$).
⚠️ Counterexamples and pitfalls
  1. Null $\not\Rightarrow$ countable. The Cantor set is uncountable and null; so is the "no digit 7" set of Example 2(c).
  2. 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.
  3. 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.
  4. 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.
  5. Continuity from above needs finite measure. $E_n=[n,\infty)$ decreases to $\varnothing$, yet $m(E_n)=\infty$ for all $n$.
  6. $|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)).
  7. $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.)
  8. 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$.
  9. Fatou's inequality can be strict and needs $f_n\ge0$ (see after Theorem 4.31).
  10. 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.
  11. 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]$.
  12. 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]}$.
  13. 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.
  14. $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.
  15. $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$.)
📚 Go deeper — full proofs in the CSIR NET course
  • 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

Interactive 1 — Cantor Sets: Thin Dust or Fat Dust?

Each row is one stage of a construction: starting from $[0,1]$, a middle open gap is removed from every interval that is left. The blue pieces remain, the faint red gaps are removed. Below, the total length left after each stage, and (dashed) the measure of the limit set. Compare a rule that always removes a fixed fraction of each interval with one whose gaps shrink like $\alpha3^{-n}$. Press Play to build the stages.

intervals at stage n—
length left m(Kₙ)—
length removed—
measure of the limit set—
Interactive 2 — May I Swap the Limit and the Integral?

The blue graph is $f_n$, with its area shaded; the dashed green graph is the pointwise limit $f$; the dotted purple graph is the envelope $\sup_kf_k$ — the smallest function that dominates every $f_n$. The DCT applies exactly when some integrable function dominates, i.e. when the envelope has finite integral. Choose a sequence and move $n$ (or press Play): watch whether $\int f_n$ approaches $\int f$, and where the missing area goes when it does not.

∫ fₙ—
∫ f (pointwise limit)—
∫ supₖ fₖ (envelope)—
theorem—

Exercises

I
Measure of sets.
  • 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 $\mathbb{Q}$ is null; the rest is $[1,3]$ and $(5,6)$ up to null sets, disjoint: $2+1=3$.
2 The intervals $(n,n+n^{-2})$ are disjoint, so the first measure is $\sum n^{-2}=\frac{\pi^2}6\approx1.645$. The second union is $(0,1)$: measure $1$. The intersection is $(0,1]$: measure $1$ (continuity from above also gives $\lim(1+\frac1n)=1$).
3 The complement (no digit $3$) has measure $\le0.9^n$ for every $n$, as in Example 2(c), so it is null and $m(T)=1$.
4 For any $A$: $A\cap Z\subseteq Z$ gives $m^*(A\cap Z)=0$, and $A\setminus Z\subseteq A$ gives $m^*(A\setminus Z)\le m^*(A)$. So $m^*(A\cap Z)+m^*(A\setminus Z)\le m^*(A)$; the reverse inequality is subadditivity.
5 Removed length $\sum_{n\ge1}2^{n-1}\beta4^{-n}=\frac\beta2\sum_{n\ge1}2^{-n}=\frac\beta2$, so the limit set has measure $1-\frac\beta2$; measure $0.9$ needs $\beta=0.2$. (Feasibility: the stage-$n$ intervals have length $2^{-n}\big(1-\frac\beta2(1-2^{-n})\big)\ge2^{-n-1}$, larger than the next gap $\beta4^{-n-1}$.)
6 The set is $L=\bigcap_N\bigcup_{n\ge N}E_n$. For every $N$, $m(L)\le m\big(\bigcup_{n\ge N}E_n\big)\le\sum_{n\ge N}m(E_n)$, the tail of a convergent series, which tends to $0$. So $m(L)=0$.
7 The complements $B_k=[0,1]\setminus A_k$ have $m(B_k)\le0.15$, so $m\big(\bigcup B_k\big)\le0.75$ and $m\big(\bigcap A_k\big)=1-m\big(\bigcup B_k\big)\ge0.25$. Equality: $A_k=[0,1]\setminus[0.15(k-1),\,0.15k)$, $k=1,\dots,5$, whose complements are disjoint; the intersection is $[0.75,1]$.
8 (a) Yes: Example 1(e) with $\varepsilon=\frac12$. (b) None: if $x\in[0,1]\setminus F$, then since the complement of $F$ is open there is a non-degenerate interval $J\subseteq[0,1]$ around $x$ (one-sided if $x$ is an end point) missing $F$, so $m(F)\le1-\ell(J)\lt1$. (c) The Cantor set. (d) None — this is a theorem (Lebesgue's density theorem): almost every point of $E$ has density $1$, so no measurable set can fill exactly half of every interval.
II
Measurable functions and Lebesgue integrals.
  • 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 $\mathbf 1_C$ and $\mathbf 1_{\mathbb{Q}}$ are indicators of measurable sets and $x$ is continuous; sums and products are measurable. $f=0$ off the null set $C\cup\mathbb{Q}$, so $\int f=0$.
2 $f=x^2$ a.e., so $\int f=\int_0^1x^2dx=\frac13$.
3 On $\big(\frac1{k+1},\frac1k\big]$ the integrand is $k^{-2}$, so the integral is $\sum_k\frac{1}{k^2}\cdot\frac1{k(k+1)}=\sum_k\frac1{k^3(k+1)}$. Partial fractions: $\frac1{k^3(k+1)}=\frac1{k^3}-\frac1{k^2}+\frac1k-\frac1{k+1}$, so the sum is $\zeta(3)-\zeta(2)+1\approx0.5571$.
4 $x^{-p}\ge0$, so by the MCT and Theorem 4.35 its Lebesgue integral equals the improper integral: finite on $(0,1]$ iff $p\lt1$, on $[1,\infty)$ iff $p\gt1$, and on $(0,\infty)$ for no $p$.
5 Markov: $m(\{f\ge10\})\le\frac{2}{10}=0.2$. Equality for $f=10\cdot\mathbf 1_{[0,0.2]}$ (integral $2$, and $\{f\ge10\}=[0,0.2]$).
6 For $n\ge1$ the cap $n$ is inactive ($f\le1$) and $\varphi_n=\lfloor2^nx\rfloor/2^n$ takes the value $k2^{-n}$ on an interval of length $2^{-n}$, $k=0,\dots,2^n-1$ (and $1$ at the single point $x=1$). So $\int\varphi_n=2^{-2n}\sum_{k=0}^{2^n-1}k=\frac{2^n-1}{2^{n+1}}$: $\int\varphi_2=\frac38$, and $\frac14,\frac38,\frac7{16},\dots\uparrow\frac12=\int f$.
7 First part: $\big|\int_Af\big|\le\int_A|f|\le\int_E|f|=0$. Converse: take $A=\{f\gt0\}$; then $\int f^+=\int_Af=0$, so $f^+=0$ a.e. (Theorem 4.28(3)); similarly with $\{f\lt0\}$ for $f^-$.
8 The sets $\{|f|\gt M\}$, $M=1,2,\dots$, decrease to $\{|f|=\infty\}$, a null set, and all lie in $[0,1]$ (finite measure). Continuity from above: $m(\{|f|\gt M\})\to0$.
III
Limits of integrals: MCT, Fatou, DCT. Evaluate the limits in parts 1–5, naming the theorem you use.
  • 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 Pointwise limit $0$ for $x\gt0$. Bounded convergence: $\frac{nx}{1+n^2x^2}\le\frac12$ (AM–GM) on a set of finite measure. Limit $0$. (Directly: the integral is $\frac{\log(1+n^2)}{2n}\to0$.)
2 Pointwise limit $e^{-x}$. DCT with $g=x^{-1/2}$ on $(0,1)$ and $g=(1+\frac x2)^{-2}$ on $[1,\infty)$, valid for $n\ge2$ (as $x^{-1/n}\le x^{-1/2}$ for $x\lt1$, $x^{-1/n}\le1$ for $x\ge1$, and $(1+\frac xn)^n$ increases in $n$). Limit $\int_0^\infty e^{-x}dx=1$.
3 By Bernoulli, $(1+x)^n\ge1+nx$, so the integrand lies in $[0,1]$; it tends to $0$ for $x\gt0$. Bounded convergence: limit $0$.
4 For $0\lt x\le\frac\pi2$, $(\sin x)^{1/n}\to1$, and $0\le(\sin x)^{1/n}\le1$. Bounded convergence: limit $\frac\pi2$.
5 $(1+\frac xn)^n\mathbf 1_{[0,n]}(x)$ increases to $e^x$, so the integrand increases to $e^{-x}$. MCT: limit $1$.
6 For $x\gt0$, $\frac{\sin x}{e^x-1}=\sum_{k\ge1}e^{-kx}\sin x$. Since $|\sin x|\le x$, $\sum_k\int_0^\infty e^{-kx}|\sin x|\,dx\le\sum_k\frac1{k^2}\lt\infty$, so Theorem 4.33(2) applies. With $\int_0^\infty e^{-kx}\sin x\,dx=\frac{1}{k^2+1}$ the integral is $\sum_k\frac1{k^2+1}=\frac{\pi\coth\pi-1}{2}\approx1.0767$.
7 $f_n=\mathbf 1_{[0,1/2]}+\frac n2\mathbf 1_{(0,1/n)}$: $\int f_n=\frac12+\frac12=1$, and $f_n\to\mathbf 1_{[0,1/2]}$ at every point (at $x=0$ the second term is always $0$; for $x\gt0$ it vanishes once $n\gt1/x$). $\int f=\frac12$. Fatou's lemma gives $\int f\le\liminf\int f_n=1$.
8 For $t\ge t_0\gt0$: $\big|e^{-tx}\frac{\sin x}{x}\big|\le e^{-t_0x}$ (as $|\sin x|\le x$) and $\big|\frac{\partial}{\partial t}e^{-tx}\frac{\sin x}x\big|=e^{-tx}|\sin x|\le e^{-t_0x}$, integrable. Theorem 4.33(4): $F'(t)=-\int_0^\infty e^{-tx}\sin x\,dx=-\frac1{1+t^2}$. Also $|F(t)|\le\int_0^\infty e^{-tx}dx=\frac1t\to0$. So $F(t)=C-\arctan t$ with $C=\frac\pi2$. (Letting $t\to0^+$ recovers $\int_0^\infty\frac{\sin x}xdx=\frac\pi2$, but that step needs a separate argument, since $\frac{\sin x}{x}\notin\mathcal L^1$.)
9 $i_n(t)\to0$ A for every $t\gt0$. $Q_n=1-e^{-n}\to1$ C. $W_n=10\int_0^1n^2e^{-2nt}dt=5n\,(1-e^{-2n})\to\infty$ J. The pulses converge to $0$ pointwise but deliver a fixed charge of $1$ C in a shorter and shorter time — an idealised impulse (a "delta function"), which is not a function and to which no dominated-convergence argument applies; the energy, which depends on $i_n^2$, blows up.
IV
Prove or disprove; Riemann versus Lebesgue.
  • 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$.
1 False. $\mathbf 1_{\mathbb{Q}}$ (or $\mathbf 1_{K_{1/2}}$) is bounded and Lebesgue integrable but discontinuous on a set of positive measure.
2 First claim false: enumerate $\mathbb{Q}\cap[0,1]$ as $q_1,q_2,\dots$ and let $f_n=\mathbf 1_{\{q_1,\dots,q_n\}}$ (Riemann integrable, finitely many discontinuities); the limit $\mathbf 1_{\mathbb{Q}}$ is not. Second claim true: bounded convergence on $[0,1]$ ($0\le f_n\le1$), and here $\int f_n=0=\int f$.
3 True. Its discontinuities lie in $C$, a null set; Lebesgue's criterion (Theorem 4.34(1)).
4 True. $\big|\frac{\sin x}{x^{3/2}}\big|\le x^{-1/2}$ on $(0,1]$ (as $|\sin x|\le x$) and $\le x^{-3/2}$ on $[1,\infty)$; both are integrable there (II.4).
5 False. $f=\sum_{n\ge1}n\,\mathbf 1_{[n,\,n+n^{-3}]}$ has $\int f=\sum_nn\cdot n^{-3}=\frac{\pi^2}6\lt\infty$ (MCT), but $f(n)=n\to\infty$. Even a continuous example exists: replace each block by a tent of height $n$ and base $2n^{-3}$.
6 True. If not, there are $\varepsilon\gt0$ and $x_k\to\infty$ with $|f(x_k)|\ge\varepsilon$; we may take $x_{k+1}\gt x_k+1$. Uniform continuity gives $\delta\in(0,\tfrac12)$ with $|f(x)-f(y)|\lt\frac\varepsilon2$ when $|x-y|\lt\delta$, so $|f|\ge\frac\varepsilon2$ on each of the disjoint intervals $(x_k-\delta,x_k+\delta)$, and $\int|f|\ge\sum_k\varepsilon\delta=\infty$. Contradiction.
7 False. $f=x^{-1/2}$: $\int_0^1f=2$, but $\int_0^1f^2=\int_0^1\frac{dx}x=\infty$.
8 False. Let $f_n=\frac{n}{\log n}\mathbf 1_{(0,1/n)}$ for $n\ge2$: then $f_n\to0$ everywhere and $\int f_n=\frac1{\log n}\to0$. But any $g\ge f_n$ for all $n$ satisfies $g\ge\frac{n}{\log n}$ on $\big[\frac1{n+1},\frac1n\big)$, so $\int g\ge\sum_{n\ge2}\frac{n}{\log n}\cdot\frac{1}{n(n+1)}$, which is $\sum_{n\ge2}\frac1{(n+1)\log n}=\infty$. The DCT is sufficient, not necessary.
🎯 GATE corner GATE MA · MCQGATE MA · MSQGATE MA · NAT

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$.

Idea The three pieces are disjoint and measurable. The intervals $[n,n+2^{-n}]$ are disjoint (each lies in $[n,n+\tfrac12]$), with total length $\sum_{n\ge1}2^{-n}=1$; $\mathbb{Q}\cap[-1,0]$ is countable, measure $0$; $[-3,-2]\setminus\mathbb{Q}$ has measure $1$.
Answer (B) $m(A)=1+0+1=2$.

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$.

DCT $(1+\frac xn)^n$ increases to $e^x$, so the integrand decreases to $e^{-x}$ and, for $n\ge2$, is at most $(1+\frac x2)^{-2}$, which is integrable on $[0,\infty)$ (integral $2$). The limit is $\int_0^\infty e^{-x}dx=1$.
Check Directly, $\int_0^\infty(1+\frac xn)^{-n}dx=\frac{n}{n-1}\to1$.
Answer (C).

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]$.

(A) True A subset $Z$ of the null set $C$ has $m^*(Z)=0$, and every set of outer measure $0$ is measurable (Exercise I.4).
(B) True The fat Cantor set $K_{0.01}$ is closed, nowhere dense (empty interior) and has measure $1-0.01=0.99$ (Theorem 4.24).
(C) False $U=\bigcup_k\big(q_k-2^{-k-1},q_k+2^{-k-1}\big)$ over an enumeration of $\mathbb{Q}$ is open and dense with $m(U)\le1$ (Example 1(e)).
(D) True If $E$ missed some open interval $(a,b)\subseteq[0,1]$ with $a\lt b$, then $m(E)\le1-(b-a)\lt1$.
Answer (A), (B) and (D).

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$.

(A) True $f_n(0)=0$ for all $n$; for $x\gt0$, $f_n(x)=0$ as soon as $\frac2n\lt x$.
(B) False $\int_0^1f_n=n\cdot\frac1n=1$ for every $n\ge2$.
(C) True The left side is $\int0=0$ and the right side is $1$: Fatou's inequality is strict here.
(D) False If such $g$ existed, the DCT would give $\int f_n\to\int0=0$, contradicting (B). (Indeed $\sup_nf_n=\lfloor2/x\rfloor\ge\frac2x-1$ on $(0,1]$, which is not integrable.)
Answer (A) and (C).

E5. GATE MA · NAT The value of $\displaystyle\int_0^\infty\frac{x^2}{e^x-1}\,dx$ is ______ (correct to two decimal places).

Expand $\frac{x^2}{e^x-1}=\sum_{k\ge1}x^2e^{-kx}$ for $x\gt0$, a series of non-negative terms: integrate term by term (Theorem 4.30(2)).
Integrate $\int_0^\infty x^2e^{-kx}dx=\frac{2}{k^3}$, so the integral is $2\sum_{k\ge1}k^{-3}=2\zeta(3)$. On the calculator: $2\big(1+\frac18+\frac1{27}+\frac1{64}+\frac1{125}+\cdots\big)$, whose partial sums settle at $2.404\ldots$ (the tail after $N$ terms is below $\frac1{N^2}$).
Answer $2.40$ (accept $2.39$ to $2.42$).

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).

Trap For each $x\ge0$ the integrand tends to $0$, but it is not dominated by an integrable function (its peaks near $x=\frac1n$ grow like $\frac ne$), so "the limit is $0$" is unjustified — and wrong.
Substitute With $t=nx$: the integral is $\displaystyle\int_0^\infty\frac{te^{-t}}{1+t^2/n^2}\,dt$. Now the integrand tends to $te^{-t}$ and is dominated by $te^{-t}\in\mathcal L^1(0,\infty)$. DCT: the limit is $\int_0^\infty te^{-t}dt=1$.
Answer $1.00$ (accept $0.99$ to $1.01$). (Numerically the integral is $0.9976$ at $n=50$.)
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. 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.
  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.
  3. 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–Teaching NexusResearch-tutored · optional, about 60 minutes

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.

  1. 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$.
  2. 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}$?
  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!}$.)
  4. 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$.

Instructor note: with exponent $3$, $m(A_{10,Q})\approx0.142,\ 0.152,\ 0.153$ for $Q=100,1000,3000$ (bound $0.221$), and $m(A_{100,Q})\approx0.0002,\ 0.0135,\ 0.0143$ (bound $0.0202$); for $Q_0=2$ the bound $1.69$ is useless while $m(A_{2,3000})\approx0.830$. With exponent $2$, the intervals for small $q$ already cover $[0,1]$, so $m(A_{2,Q})=m(A_{10,Q})=1$, while $m(A_{100,Q})\approx0.020,\ 0.9935,\ 0.9993$ for $Q=100,1000,3000$ — creeping up to $1$, as Dirichlet's theorem predicts. Liouville numbers such as $\sum_k10^{-k!}$ lie in $W_3$, so it is null but non-empty (indeed uncountable).

🧪 Self-check quiz

0/5 correct

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