---
title: "Product Measures, Fubini, Change of Variables"
book: "University Mathematics — Year 3"
subject: math
language: en
chapter: 11
exercises: 12
source: https://one-course.com/books/math/5/en/chapter/11-product-measures-fubini-change-of-variables
---

# Chapter 11 — Product Measures, Fubini, Change of Variables

One-dimensional Lebesgue theory becomes multi-dimensional calculus through two theorems. *Tonelli–Fubini* says that integrals over products are iterated integrals — slicing is legitimate, in either order, under hypotheses one can actually check. The *change of variables formula* transports integrals along $\mathcal C^1$ diffeomorphisms, with the Jacobian determinant as the exchange rate for volume; we prove it completely, starting from the linear case where it explains what the determinant *is*. Applications cascade: the layer cake formula, convolution, [polar coordinates](#ex-b3-product-polar), the volume of the $n$-ball — and, in the weekend problem, Stirling’s formula with an honest error analysis.

## 11.1 Product $\sigma$-algebras and product measures

**Definition 11.1.**

For [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) spaces $(X, \mathcal A)$, $(Y, \mathcal B)$, the *product $\sigma$-algebra* $\mathcal A \otimes \mathcal B$ on $X \times
Y$ is generated by the *rectangles* $A \times B$ ($A \in
\mathcal A$, $B \in \mathcal B$) — a $\pi$-system. For $E
\subseteq X\times Y$ and $x \in X$, the *section* is $E_x
= \{y : (x,y) \in E\}$; for a function $f$ on the product, $f_x = f(x, \cdot)$.

**Proposition 11.2.**

(a) If $E \in \mathcal A\otimes\mathcal B$, every section $E_x
\in \mathcal B$ (and symmetrically); if $f$ is $\mathcal
A\otimes\mathcal B$-measurable, every $f_x$ is $\mathcal
B$-measurable. (b) $\mathcal B(\R^m)\otimes\mathcal B(\R^n) = \mathcal
B(\R^{m+n})$.

**Proof.** (a) Good sets: $\{E : E_x \in \mathcal B\ \forall x\}$ is a $\sigma$-algebra (sections commute with complements and countable unions) containing the rectangles. For $f$: $(f_x)^{-1}(B) = (f^{-1}(B))_x$. (b) ($\subseteq$) Rectangles of Borel sets: it suffices that open$\times$open boxes are Borel in $\R^{m+n}$ (they are open) and that general Borel rectangles are limits — good sets again: $\{A : A\times\R^n \in \mathcal B(\R^{m+n})\}$ is a $\sigma$-algebra containing the opens; intersect two such. ($\supseteq$) Every [open set](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-topology) of $\R^{m+n}$ is a countable union of rational open boxes $U\times V$: contained in the product $\sigma$-algebra. ∎

**Theorem 11.3 (Product measure).**

Let $(X, \mathcal A, \mu)$ and $(Y, \mathcal B, \nu)$ be *$\sigma$-finite*. For every $E \in \mathcal
A\otimes\mathcal B$, the function $x \mapsto \nu(E_x)$ is [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable), and

$$
(\mu\otimes\nu)(E) = \int_X \nu(E_x)\,\dd\mu(x)
$$

defines the unique [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) on $\mathcal A\otimes\mathcal B$ with $(\mu\otimes\nu)(A\times B) = \mu(A)\nu(B)$. It is $\sigma$-finite, and symmetric: the same [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) is obtained by integrating $x$-sections against $\nu$.

**Proof.** *[Measurability](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) of $x \mapsto \nu(E_x)$.* First let $\nu$ be finite. The class $\mathcal D$ of $E$ for which the map is [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) contains the rectangles ($\nu((A\times B)_x) =
\nu(B)\mathbf 1_A(x)$) and is a $\lambda$-system: for $E
\subseteq F$ in $\mathcal D$, $\nu((F\setminus E)_x) =
\nu(F_x) - \nu(E_x)$ (finiteness); for $E_n \uparrow E$, $\nu((E_n)_x) \uparrow \nu(E_x)$ ([continuity](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) from below), and monotone limits of [measurable functions](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) are [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable). Rectangles form a $\pi$-system: Dynkin ([Theorem 9.4](https://one-course.com/books/math/5/en/chapter/9-measure-theory#thm-b3-measure-dynkin)) gives $\mathcal D = \mathcal
A\otimes\mathcal B$. If $\nu$ is $\sigma$-finite, write $Y =
\bigcup Y_k$, $Y_k \uparrow$, $\nu(Y_k) < \infty$: $\nu(E_x) =
\lim_k\nu_k(E_x)$ with $\nu_k = \nu(\cdot\cap Y_k)$ finite.

*[Measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure).* $\sigma$-additivity of $E \mapsto
\int\nu(E_x)\dd\mu$ follows from [Corollary 10.7](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#cor-b3-lebesgue-additivity) (sections of disjoint sets are disjoint). On rectangles it gives $\mu(A)\nu(B)$. *Uniqueness*: two candidates agree on the $\pi$-system of rectangles; $\sigma$-finiteness provides rectangles $X_k\times
Y_k \uparrow X\times Y$ of finite [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure): [Theorem 9.7](https://one-course.com/books/math/5/en/chapter/9-measure-theory#thm-b3-measure-uniqueness). Symmetry: the other-order construction is also a [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) agreeing on rectangles — unique, hence the same. ∎

**Definition 11.4.**

*Lebesgue measure on $\R^d$* is $\lambda_d = \lambda\otimes\cdots\otimes\lambda$ ($d$ factors; associativity of the construction is checked on boxes and propagated by uniqueness). It is the unique Borel [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) giving each box $\prod\intoc{a_i}{b_i}$ its volume $\prod(b_i - a_i)$; it is translation-invariant (translates agree on boxes), $\sigma$-finite, and [complete](https://one-course.com/books/math/5/en/chapter/7-complete-spaces-baire-ascoli-stoneweierstrass#def-b3-complete-complete) after Carathéodory [completion](https://one-course.com/books/math/5/en/chapter/7-complete-spaces-baire-ascoli-stoneweierstrass#thm-b3-complete-completion) — we write $\lambda_d$ for the completed [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) and integrate accordingly.

## 11.2 Tonelli and Fubini

**Theorem 11.5 (Tonelli).**

$\mu, \nu$ $\sigma$-finite, $f \colon X\times Y \to [0,
+\infty]$ [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable). Then $x \mapsto \int_Y f_x\,\dd\nu$ is [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) and

$$
\int_{X\times Y}f\,\dd(\mu\otimes\nu)
= \int_X\Bigl(\int_Y f(x,y)\,\dd\nu(y)\Bigr)\dd\mu(x)
= \int_Y\Bigl(\int_X f(x,y)\,\dd\mu(x)\Bigr)\dd\nu(y).
$$

**Proof.** The standard machine. For $f = \mathbf 1_E$ this is [Theorem 11.3](#thm-b3-product-existence) (and its symmetric form). By linearity it holds for simple $f \geq 0$. For general $f \geq
0$: take simple $s_n \nearrow f$ ([Theorem 10.4](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#thm-b3-lebesgue-approximation)); then $\int_Y(s_n)_x
\dd\nu \nearrow \int_Y f_x\dd\nu$ for each $x$ (MCT in $Y$), so the left members converge by MCT in $X$, while $\int s_n\,\dd(\mu\otimes\nu) \nearrow \int f$ by MCT on the product. ∎

**Theorem 11.6 (Fubini).**

$\mu, \nu$ $\sigma$-finite, $f \in L^1(\mu\otimes\nu)$. Then for $\mu$-a.e. $x$ the section $f_x$ is $\nu$-integrable, the a.e.-defined function $x \mapsto \int f_x\dd\nu$ is [integrable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1), and the two iterated integrals both equal $\int f\,\dd(\mu\otimes\nu)$.

**Proof.** Tonelli applied to $\abs f$ shows $\varphi(x) = \int\abs{f_x}
\dd\nu$ has finite integral, hence is finite a.e.: $f_x \in
L^1(\nu)$ for a.e. $x$. Split $f = f^+ - f^-$ (real case; complex by components): Tonelli computes each iterated integral of $f^\pm$ as $\int f^\pm\dd(\mu\otimes\nu) <
\infty$, and the a.e.-defined difference integrates to the difference. Symmetrically for the other order. ∎

**Method 11.7.**

To interchange two integrals (or an integral and a sum, or two sums): if the integrand is *nonnegative*, interchange freely (Tonelli). Otherwise, first apply Tonelli to $\abs f$ in whichever order is easier to estimate; if the result is finite, Fubini legitimizes the interchange. Never skip the $\abs f$ check: [Exercise 11.4](#exo-b3-product-4)’s integrand has two iterated integrals with *different values*.

**Proposition 11.8 (Layer cake).**

For $f \geq 0$ [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) on $(X, \mathcal A, \mu)$ $\sigma$-finite:

$$
\int_X f\,\dd\mu = \int_0^{+\infty}\mu(\{f > t\})\,\dd t,
\qquad
\int_X f^p\,\dd\mu = p\int_0^{+\infty}t^{p-1}\mu(\{f >
t\})\,\dd t \quad (p \geq 1).
$$

**Proof.** Apply Tonelli to $\mathbf 1_{\{(x,t) : 0 < t < f(x)\}}$ on $X
\times \intoo0{+\infty}$ ([measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable): it is $\{(x,t): f(x) - t
> 0\}\cap\{t > 0\}$, a Borel-type combination of the [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) $(x,t)\mapsto f(x) - t$): integrating in $t$ first gives $\int f\,\dd\mu$; in $x$ first, $\int_0^\infty\mu(f >
t)\dd t$. For $f^p$: substitute $t = s^p$ in $\int\mu(f^p > t)
\dd t$, i.e. apply the first formula to $f^p$ and change variables in the one-dimensional integral ($\{f^p > s^p\} =
\{f > s\}$). ∎

**Theorem 11.9 (Convolution on L1L^1L1).**

For $f, g \in L^1(\R^d, \lambda_d)$, the integral

$$
(f * g)(x) = \int_{\R^d} f(x - y)\,g(y)\,\dd y
$$

converges absolutely for a.e. $x$, defines $f * g \in
L^1(\R^d)$ with $\norm{f*g}_1 \leq \norm f_1\norm g_1$, and $*$ is commutative and associative.

**Proof.** $(x, y) \mapsto f(x-y)g(y)$ is [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) ($(x,y)\mapsto x -
y$ is [continuous](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity); compose and multiply). Tonelli:

$$
\int\!\!\int \abs{f(x-y)}\abs{g(y)}\,\dd y\,\dd x
= \int\abs{g(y)}\Bigl(\int\abs{f(x - y)}\dd x\Bigr)\dd y
= \norm f_1\norm g_1 < \infty
$$

(translation invariance of $\lambda_d$ in the inner integral). So the double integral is finite; Fubini gives a.e. absolute convergence and the norm bound $\norm{f*g}_1 \leq \norm
f_1\norm g_1$. Commutativity: substitute $y \mapsto x - y$ (translation and reflection invariance — reflection invariance holds on boxes, hence everywhere by uniqueness). Associativity: Tonelli–Fubini on a triple integral. ∎

## 11.3 Change of variables

**Theorem 11.10 (Linear change of variables).**

For $T \in GL_d(\R)$ and $A \in \mathcal B(\R^d)$: $\lambda_d(T(A)) = \abs{\det T}\,\lambda_d(A)$; consequently $\int f(y)\dd y = \abs{\det T}\int f(Tx)\,\dd x$ for $f \geq 0$ or [integrable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1).

**Proof.** The [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $\mu_T(A) = \lambda_d(T(A))$ is a Borel [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) ([homeomorphisms](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) preserve Borel sets, [Problem 9.1](https://one-course.com/books/math/5/en/chapter/9-measure-theory#pb-b3-measure-1)), translation-invariant ($T(A + x) = T(A) + Tx$), finite on the unit box: by the characterization of [Lebesgue measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-lebesgueouter) ([Exercise 9.6](https://one-course.com/books/math/5/en/chapter/9-measure-theory#exo-b3-measure-6), whose proof works verbatim in $\R^d$ with dyadic cubes), $\mu_T = c(T)\lambda_d$ with $c(T)
= \lambda_d(T(\intco01^d))$. The map $T \mapsto c(T)$ is multiplicative ($c(ST) = c(S)c(T)$, by composing), so it suffices to compute $c$ on generators of $GL_d$: elementary matrices. Diagonal $\operatorname{diag}(a, 1, \dots, 1)$: maps the unit cube to a box of volume $\abs a$: $c = \abs a =
\abs\det$. Transposition of coordinates: permutes the cube: $c
= 1 = \abs\det$. Transvection $T(x) = x + \alpha
x_2e_1$: the image of the unit cube is a sheared prism; by Tonelli its [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) is $\int\lambda_1(\text{section})\dd x_2
\cdots \dd x_d = 1$, each $x_1$-section being an interval of length $1$: $c = 1 = \abs{\det}$. Every invertible matrix is a product of these (Gaussian elimination), and both $c$ and $\abs\det$ are multiplicative: $c(T) = \abs{\det T}$. The integral formula follows by the standard machine (indicators, simple, MCT). ∎

**Theorem 11.11 (Change of variables).**

Let $U, V \subseteq \R^d$ be open and $\Phi \colon U \to V$ a $\mathcal C^1$ diffeomorphism. For every [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) $f \colon V
\to [0, +\infty]$ (or $f \in L^1(V)$):

$$
\int_V f(y)\,\dd y = \int_U
f\bigl(\Phi(x)\bigr)\,\abs{\det D\Phi(x)}\,\dd x .
$$

**Proof.** Write $J(x) = \abs{\det D\Phi(x)}$. The heart of the proof is the inequality

$$
\lambda_d\bigl(\Phi(A)\bigr) \leq \int_A J\,\dd\lambda_d
\qquad\text{for every Borel } A \subseteq U;
\tag{$*$}
$$

Step 4 below upgrades $(*)$ — applied to both $\Phi$ and $\Phi^{-1}$ — to the equality of the theorem. Note that $\Phi^{-1}$ is itself a $\mathcal C^1$ diffeomorphism with Jacobian $\abs{\det D\Phi^{-1}(y)} = J(\Phi^{-1}y)^{-1}$ (chain rule on $\Phi\circ\Phi^{-1} = \mathrm{id}$).

*Step 1: $(*)$ for cubes with a distortion factor.* Fix a closed cube $Q \subseteq U$ of [center](https://one-course.com/books/math/5/en/chapter/1-group-theory#ex-b3-groups-actions) $x_0$ and side $2r$ (sup-norm ball). Claim: for every $\varepsilon > 0$, if $\Phi$ is differentiable on $Q$ with $\norm{D\Phi(x) - D\Phi(x_0)} \leq \varepsilon$ on $Q$ ([operator norm](https://one-course.com/books/math/5/en/chapter/8-banach-spaces-and-the-fundamental-theorems#def-b3-banach-operator) for the sup-norm), then

$$
\Phi(Q) \subseteq \Phi(x_0) + D\Phi(x_0)\Bigl(\,\bigl(1 +
\varepsilon\norm{D\Phi(x_0)^{-1}}\bigr)\,(Q - x_0)\Bigr),
$$

because for $x \in Q$, the mean value inequality applied to $\Phi(x) - \Phi(x_0) - D\Phi(x_0)(x - x_0)$ gives $\norm{\Phi(x) - \Phi(x_0) - D\Phi(x_0)(x-x_0)}_\infty \leq
\varepsilon\norm{x - x_0}_\infty \leq \varepsilon r$, and $D\Phi(x_0)^{-1}$ pulls this defect into an $\varepsilon\norm{D\Phi(x_0)^{-1}}\,r$-enlargement of the cube. By [Theorem 11.10](#thm-b3-product-linearchange),

$$
\lambda_d(\Phi(Q)) \leq \abs{\det D\Phi(x_0)}\,
\bigl(1 + \varepsilon\,C\bigr)^{d}\,\lambda_d(Q),
\qquad C = \sup_{Q}\norm{D\Phi(\cdot)^{-1}} .
$$

*Step 2: $(*)$ for [compact](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-compact) cubes, by subdivision.* Let $Q
\subseteq U$ be a [compact](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-compact) cube and $\varepsilon > 0$. On $Q$, $D\Phi$ is uniformly [continuous](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) and $\norm{D\Phi^{-1}}$ bounded (compactness); subdivide $Q$ into $2^{kd}$ subcubes $Q_i$ small enough that the oscillation of $D\Phi$ on each is $\leq \varepsilon$. Step 1 on each subcube ([center](https://one-course.com/books/math/5/en/chapter/1-group-theory#ex-b3-groups-actions) $x_i$):

$$
\lambda_d(\Phi(Q)) \leq \sum_i\lambda_d(\Phi(Q_i))
\leq (1 + C\varepsilon)^d \sum_i \abs{\det
D\Phi(x_i)}\,\lambda_d(Q_i)
\leq (1 + C\varepsilon)^d\Bigl(\int_Q J + \varepsilon'\Bigr),
$$

the last step because $\sum_i\abs{\det D\Phi(x_i)}\mathbf
1_{Q_i} \to J$ uniformly on $Q$ ([continuity](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) of $\det D\Phi$) — Riemann-sum comparison. Let $\varepsilon \to 0$: $(*)$ holds for [compact](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-compact) cubes.

*Step 3: $(*)$ for all Borel $A$.* The set function $A
\mapsto \lambda_d(\Phi(A))$, on Borel subsets of $U$, is a [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) ($\Phi$ is a bijection onto $V$ preserving Borel sets and countable disjointness), and so is $A \mapsto \int_AJ$. Every open subset of $U$ is a countable union of almost-disjoint dyadic [compact](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-compact) cubes (standard dyadic decomposition: take maximal dyadic cubes contained in the [open set](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-topology)), and both [measures](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) are additive across them (boundaries of cubes are $\lambda_d$-null, and their $\Phi$-images are null by Step 2 applied to thin cube-coverings of the faces): $(*)$ passes from cubes to [open sets](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-topology). General Borel $A$: exhaust $U$ by [compacts](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-compact) $K_m \uparrow U$ with $K_m \subseteq
\mathring K_{m+1}$, and fix $m$; on $\mathring K_{m+1}$, $J$ is bounded by some $M_m$. By outer regularity of $\lambda_d$ (proof as in [Theorem 9.13](https://one-course.com/books/math/5/en/chapter/9-measure-theory#thm-b3-measure-regularity), with boxes), choose [open sets](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-topology) $O_n$ with $A \cap K_m \subseteq O_n
\subseteq \mathring K_{m+1}$ and $\lambda_d\bigl(O_n \setminus
(A\cap K_m)\bigr) \to 0$. Then

$$
\lambda_d\bigl(\Phi(A\cap K_m)\bigr) \leq
\lambda_d\bigl(\Phi(O_n)\bigr) \leq \int_{O_n}J
\leq \int_{A\cap K_m}J + M_m\,\lambda_d\bigl(O_n\setminus(A\cap
K_m)\bigr) \xrightarrow[n\to\infty]{} \int_{A\cap K_m}J .
$$

Let $m \to \infty$: [continuity](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) from below on the left, MCT on the right. This establishes $(*)$.

*Step 4: equality and the integral formula.* First extend $(*)$ from sets to integrals: for every [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) $g
\geq 0$ on $V$,

$$
\int_V g(y)\,\dd y \leq \int_U g(\Phi(x))\,J(x)\,\dd x .
\tag{$**$}
$$

Indeed, for $g = \mathbf 1_B$ this is $(*)$ with $A =
\Phi^{-1}(B)$; linearity extends it to simple $g$, and MCT to all $g \geq 0$ (the standard machine). Now apply $(**)$ twice: first to $g$, then — for the diffeomorphism $\Phi^{-1}$ — to the function $x \mapsto g(\Phi(x))J(x)$:

$$
\int_Vg \leq \int_U g(\Phi(x))J(x)\dd x
\leq \int_V g(y)\,J(\Phi^{-1}y)\,\abs{\det
D\Phi^{-1}(y)}\,\dd y = \int_V g ,
$$

since $J(\Phi^{-1}y)\abs{\det D\Phi^{-1}(y)} = \abs{\det\bigl(
D\Phi(\Phi^{-1}y)\,D\Phi^{-1}(y)\bigr)} = 1$ (chain rule on $\Phi\circ\Phi^{-1} = \mathrm{id}$). All inequalities are equalities: the formula holds for $g \geq 0$, and for $L^1$ functions by decomposition. ∎

**Example 11.12 (Polar coordinates; the Gaussian again).**

$\Phi(r, \theta) = (r\cos\theta, r\sin\theta)$ is a $\mathcal
C^1$ diffeomorphism from $\intoo0{+\infty}\times\intoo0{2\pi}$ onto $\R^2$ minus a half-line (null set), with $\det D\Phi =
r$:

$$
\int_{\R^2}f(x, y)\,\dd x\,\dd y
= \int_0^{2\pi}\!\!\int_0^{+\infty}
f(r\cos\theta, r\sin\theta)\,r\,\dd r\,\dd\theta .
$$

For $f = \eu^{-x^2-y^2}$, Tonelli and this formula give

$$
G^2 = \Bigl(\int_\R \eu^{-x^2}\dd x\Bigr)^2
= \int_{\R^2}\eu^{-x^2-y^2}
= 2\pi\int_0^\infty r\eu^{-r^2}\dd r = \pi:
$$

the classical two-line proof of $G = \sqrt\pi$, now fully justified (compare the parameter proof of [Problem 10.1](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#pb-b3-lebesgue-1)).

**Theorem 11.13 (Volume of the unit ball).**

Let $v_d = \lambda_d(B(0,1))$ in $\R^d$. Then

$$
v_d = \frac{\pi^{d/2}}{\Gamma\bigl(\frac d2 + 1\bigr)} :
\qquad
v_1 = 2,\quad v_2 = \pi,\quad v_3 = \tfrac{4\pi}3,\quad
v_4 = \tfrac{\pi^2}2,\ \dots
$$

**Proof.** Compute $I = \int_{\R^d}\eu^{-\norm x_2^2}\dd\lambda_d$ twice. By Tonelli it factors: $I = G^d = \pi^{d/2}$. By the layer cake formula ([Proposition 11.8](#prop-b3-product-layercake)) with $f = \eu^{-
\norm x^2}$, whose level sets are balls: $\{f > t\} =
B\bigl(0, \sqrt{-\ln t}\bigr)$ for $0 < t < 1$, of [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $v_d(-\ln t)^{d/2}$ (dilation by $\rho$ scales $\lambda_d$ by $\rho^d$: [Theorem 11.10](#thm-b3-product-linearchange)), so

$$
I = \int_0^1 v_d\,(-\ln t)^{d/2}\,\dd t
\overset{t = \eu^{-s}}{=}
v_d\int_0^\infty s^{d/2}\eu^{-s}\,\dd s
= v_d\,\Gamma\Bigl(\frac d2 + 1\Bigr).
$$

Equate. (The values: $\Gamma(\frac32) = \frac{\sqrt\pi}2$, $\Gamma(2) = 1$, etc.) Note $v_d \to 0$ as $d \to \infty$ — the weekend problem quantifies how fast, via Stirling. ∎

## 11.4 Exercises

**Exercise 11.1 ★.**

Let $\mu$ be counting [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) on $(\intcc01, \mathcal
B(\intcc01))$ (not $\sigma$-finite) and $\lambda$ [Lebesgue measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-lebesgueouter), and let $\Delta = \{(x,x)\}$ be the diagonal in $\intcc01^2$. Show that $\Delta$ is [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable), and compute the two iterated integrals of $\mathbf 1_\Delta$ against $\lambda$ and $\mu$: they differ. Which hypothesis of [Theorem 11.5](#thm-b3-product-tonelli) fails?

**Solution of Exercise 11.1.**

$\Delta$ is closed in $\intcc01^2$, hence Borel, and $\mathcal
B(\intcc01^2)$ is the product $\sigma$-algebra ([Proposition 11.2](#prop-b3-product-sections)(b)). Iterating one way:

$$
\int_{\intcc01}\Bigl(\int \mathbf 1_\Delta(x,y)
\,\dd\lambda(y)\Bigr)\dd\mu(x)
= \int \lambda(\{x\})\,\dd\mu(x) = 0 ;
$$

the other way:

$$
\int_{\intcc01}\Bigl(\int\mathbf
1_\Delta(x,y)\,\dd\mu(x)\Bigr)\dd\lambda(y)
= \int \mu(\{y\})\,\dd\lambda(y) = \int 1\,\dd\lambda = 1 .
$$

The failing hypothesis is $\sigma$-finiteness of the counting [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $\mu$ on the uncountable $\intcc01$: no countable family of finite-$\mu$ sets covers it.

**Exercise 11.2 ★.**

Justify the interchange and re-derive Dirichlet’s integral: for $A > 0$,

$$
\int_0^A\frac{\sin x}x\,\dd x
= \int_0^A\!\!\int_0^{+\infty}\eu^{-xy}\sin x\,\dd y\,\dd x
= \int_0^{+\infty}\!\!\int_0^A \eu^{-xy}\sin x\,\dd x\,\dd y,
$$

compute the inner integral in closed form, and let $A \to
+\infty$ (dominate the $y$-integral) to get $\int_0^\infty\frac{\sin x}x\dd x = \frac\pi2$.

**Solution of Exercise 11.2.**

On $\intcc0A\times\intoo0{+\infty}$: $\int_0^A\int_0^\infty\eu^{-xy}\abs{\sin x}\,\dd y\,\dd x =
\int_0^A\frac{\abs{\sin x}}x\dd x \leq A < \infty$ (Tonelli for the absolute value): Fubini applies, and since $\int_0^\infty\eu^{-xy}\dd y = \frac1x$,

$$
\int_0^A\frac{\sin x}x\dd x
= \int_0^\infty\Bigl(\int_0^A\eu^{-xy}\sin x\,\dd
x\Bigr)\dd y
= \int_0^\infty \frac{1 - \eu^{-Ay}(\cos A + y\sin A)}{1 +
y^2}\,\dd y
$$

(the inner integral: $\operatorname{Im}\int_0^A\eu^{(\iu -
y)x}\dd x$, computed directly). As $A \to \infty$, the correction term is bounded by $\int_0^\infty\eu^{-Ay}\frac{1 +
y}{1 + y^2}\dd y \leq \frac32\int_0^\infty\eu^{-Ay}\dd y =
\frac3{2A} \to 0$; the main term is $\int_0^\infty\frac{\dd y}{1+y^2} = \frac\pi2$. Hence $\int_0^\infty\frac{\sin x}x\dd x = \frac\pi2$ — Dirichlet’s integral by Fubini.

**Exercise 11.3 ★★.**

(a) Prove that for $f \geq 0$ [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) and $\mu$ finite: $\sum_{n\geq1}\mu(\{f \geq n\}) \leq \int f\,\dd\mu \leq
\mu(X) + \sum_{n\geq1}\mu(\{f\geq n\})$: [integrability](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1) is summability of the tail [measures](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure). (b) Deduce that $f \in L^1(\mu)$ ($\mu$ finite) iff $\sum_n\mu(\abs f \geq n) < \infty$.

**Solution of Exercise 11.3.**

(a) Layer cake ([Proposition 11.8](#prop-b3-product-layercake)): $\int
f\,\dd\mu = \int_0^\infty\mu(f > t)\,\dd t$, and $t \mapsto
\mu(f > t)$ is nonincreasing. On $[n-1, n]$: $\mu(f \geq n)
\leq \mu(f > t) \leq \mu(f > n - 1) \leq \mu(f \geq n - 1)$; summing the integrals over the unit intervals:

$$
\sum_{n\geq1}\mu(f \geq n) \leq \int f\,\dd\mu \leq
\sum_{n\geq1}\mu(f \geq n - 1) = \mu(f \geq 0) +
\sum_{n\geq1}\mu(f\geq n) \leq \mu(X) + \sum_{n\geq1}\mu(f\geq
n).
$$

(b) Apply (a) to $\abs f$: finiteness of the integral and of the series are equivalent (the extra $\mu(X)$ is finite).

**Exercise 11.4 ★★.**

For $f(x, y) = \dfrac{x^2 - y^2}{(x^2 + y^2)^2}$ on $\intoo01^2$, show

$$
\int_0^1\!\!\int_0^1 f\,\dd y\,\dd x = \frac\pi4,
\qquad
\int_0^1\!\!\int_0^1 f\,\dd x\,\dd y = -\frac\pi4
$$

*(note $f = \partial_y\bigl(\frac{y}{x^2+y^2}\bigr)$)*, and verify directly that $\int\!\int\abs f = +\infty$: Fubini’s [integrability](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1) hypothesis is not decorative.

**Solution of Exercise 11.4.**

Since $f(x,y) = \partial_y\bigl(\frac{y}{x^2+y^2}\bigr)$ for $x \ne 0$:

$$
\int_0^1 f(x, y)\,\dd y = \frac{1}{x^2 + 1}
\ \Longrightarrow\
\int_0^1\!\!\int_0^1 f\,\dd y\,\dd x =
\int_0^1\frac{\dd x}{1 + x^2} = \frac\pi4 ;
$$

by the antisymmetry $f(y,x) = -f(x,y)$, the other order gives $-\frac\pi4$. Absolute values: for $0 < y < x$,

$$
\int_0^x f(x,y)\,\dd y = \Bigl[\frac{y}{x^2 +
y^2}\Bigr]_0^x = \frac1{2x},
\quad\text{and } f \geq 0 \text{ there, so}\quad
\int_0^1\!\!\int_0^1\abs f \geq \int_0^1\frac{\dd x}{2x} =
+\infty .
$$

No contradiction with Fubini: its hypothesis $f \in L^1$ fails, and the two iterated integrals are simply two different numbers.

**Exercise 11.5 ★★.**

(a) Compute $\mathbf 1_{\intcc01} * \mathbf 1_{\intcc01}$ explicitly (a tent function), and $(\mathbf 1 * \mathbf 1 *
\mathbf 1)$’s general shape. (b) Show $\operatorname{supp}(f * g) \subseteq
\overline{\operatorname{supp}f + \operatorname{supp}g}$. (c) Show that if $f \in L^1$ and $g$ is bounded and [continuous](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity), $f * g$ is [continuous](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity). *(DCT via [continuity](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) of translation on the bounded $g$.)*

**Solution of Exercise 11.5.**

(a) $(\mathbf 1_{\intcc01}*\mathbf 1_{\intcc01})(x) =
\lambda\bigl(\intcc01\cap\intcc{x-1}x\bigr)$: $0$ for $x
\notin \intcc02$, $x$ for $0 \leq x \leq 1$, $2 - x$ for $1
\leq x \leq 2$: the tent. Convolving again gives a $\mathcal
C^1$ piecewise-quadratic bump on $\intcc03$ (the quadratic B-spline): each convolution gains one degree of smoothness — the smoothing principle behind [Chapter 12](https://one-course.com/books/math/5/en/chapter/12-the-lp-spaces#ch-b3-lp)’s mollifiers.

(b) If $x \notin \overline{\operatorname{supp}f +
\operatorname{supp}g}$, there is a ball around $x$ disjoint from the sum set; for $y \in \operatorname{supp}g$, $x - y
\notin\operatorname{supp}f$, so the integrand vanishes identically: $f * g = 0$ near $x$.

(c) For $x_n \to x$: $(f*g)(x_n) = \int
f(y)g(x_n - y)\,\dd y$; the integrands converge pointwise ([continuity](https://one-course.com/books/math/5/en/chapter/6-general-topology#def-b3-topology-continuity) of $g$) and are dominated by $\norm
g_\infty\,\abs f \in L^1$: DCT gives $(f*g)(x_n) \to (f*g)(x)$.

**Exercise 11.6 ★★.**

(a) Show that the simplex $\Delta_d = \{x \in \intco0\infty^d
: x_1 + \dots + x_d \leq 1\}$ has volume $\frac1{d!}$ *(induction and Fubini)*. (b) Recover $v_2 = \pi$, $v_3 = \frac{4\pi}3$ from [Theorem 11.13](#thm-b3-product-ballvolume), and show $\lambda_d(\text{ellipsoid with semi-axes } a_i) =
v_d\prod a_i$.

**Solution of Exercise 11.6.**

(a) By Fubini and induction, slicing along the last coordinate:

$$
\lambda_d(\Delta_d) = \int_0^1
\lambda_{d-1}\bigl((1 - t)\,\Delta_{d-1}\bigr)\,\dd t
= \lambda_{d-1}(\Delta_{d-1})\int_0^1(1 - t)^{d-1}\dd t
= \frac{\lambda_{d-1}(\Delta_{d-1})}{d},
$$

using the dilation rule $\lambda_{d-1}(\rho A) =
\rho^{d-1}\lambda_{d-1}(A)$ ([Theorem 11.10](#thm-b3-product-linearchange)); with $\lambda_1(\Delta_1) = 1$: volume $\frac1{d!}$.

(b) $v_2 = \pi/\Gamma(2) = \pi$; $v_3 =
\pi^{3/2}/\Gamma(\frac52) = \pi^{3/2}/(\frac32\cdot\frac12
\sqrt\pi) = \frac{4\pi}3$. The ellipsoid is $T(B(0,1))$ with $T = \operatorname{diag}(a_1, \dots, a_d)$: [Theorem 11.10](#thm-b3-product-linearchange) gives volume $v_d\prod a_i$.

**Exercise 11.7 ★★.**

For which $s > 0$ are the following finite? Justify with [polar coordinates](#ex-b3-product-polar):

$$
\int_{B(0,1)\subseteq\R^2}\frac{\dd x\,\dd y}{(x^2 +
y^2)^{s}},
\qquad
\int_{\R^2\setminus B(0,1)}\frac{\dd x\,\dd y}{(x^2 +
y^2)^{s}} .
$$

Generalize to $\R^d$ (the thresholds $s < d/2$ and $s > d/2$).

**Solution of Exercise 11.7.**

In $\R^2$, [polar coordinates](#ex-b3-product-polar) ([Example 11.12](#ex-b3-product-polar)):

$$
\int_{B(0,1)}\frac{\dd x\dd y}{(x^2+y^2)^s}
= 2\pi\int_0^1 r^{1 - 2s}\,\dd r,
\qquad
\int_{\R^2\setminus B(0,1)} = 2\pi\int_1^\infty r^{1-2s}\dd r:
$$

finite iff $1 - 2s > -1$ ($s < 1$), resp. $1 - 2s < -1$ ($s >
1$). In $\R^d$, avoid spherical coordinates with the layer cake: $\lambda_d(\{\norm x^{-2s} > t\}\cap B(0,1)) =
\lambda_d(B(0, \min(1, t^{-1/2s}))) = v_d\min(1, t^{-d/2s})$, and $\int_0^\infty v_d\min(1, t^{-d/(2s)})\dd t < \infty$ iff $\frac d{2s} > 1$, i.e. $s < \frac d2$; the exterior integral converges iff $s > \frac d2$ (same computation on the complementary region).

**Exercise 11.8 ★★★.**

(Beta–Gamma) For $p, q > 0$, let $B(p, q) = \int_0^1t^{p-1}(1
- t)^{q-1}\dd t$. Starting from $\Gamma(p)\Gamma(q)$ as a double integral, substitute $(x, y) = (uv,\, u(1 - v))$ (a diffeomorphism of the open quadrant onto $\intoo0\infty\times\intoo01$; compute its Jacobian $= u$) and conclude

$$
B(p, q) = \frac{\Gamma(p)\,\Gamma(q)}{\Gamma(p + q)} .
$$

Deduce $\int_0^{\pi/2}\sin^{2p-1}\theta\cos^{2q-1}\theta\,
\dd\theta = \frac12B(p,q)$ and the value of the Wallis integrals $W_n = \int_0^{\pi/2}\sin^n$.

**Solution of Exercise 11.8.**

By Tonelli (positive integrands) and the change of variables $(x, y) = \Phi(u, v) = (uv,\ u(1-v))$, a $\mathcal C^1$ diffeomorphism of $\intoo0\infty\times\intoo01$ onto the open quadrant with

$$
\det D\Phi = \det\begin{pmatrix} v & u\\ 1 - v & -u
\end{pmatrix} = -uv - u(1 - v) = -u,
\qquad \abs{\det} = u :
$$

$$
\Gamma(p)\Gamma(q) =
\iint x^{p-1}y^{q-1}\eu^{-x-y}\dd x\,\dd y
= \iint (uv)^{p-1}\bigl(u(1{-}v)\bigr)^{q-1}\eu^{-u}\,u\,
\dd u\,\dd v
= \Gamma(p + q)\,B(p, q).
$$

Substituting $t = \sin^2\theta$ in $B(p,q)$ gives $2\int_0^{\pi/2}\sin^{2p-1}\theta\cos^{2q-1}\theta\,\dd\theta =
B(p, q)$. Wallis: $W_n =
\int_0^{\pi/2}\sin^n\theta\,\dd\theta = \frac12B\bigl(\frac{n +
1}2, \frac12\bigr) = \frac{\Gamma(\frac{n+1}2)\sqrt\pi}
{2\,\Gamma(\frac n2 + 1)}$ — e.g. $W_{2n} =
\frac\pi2\cdot\frac{(2n)!}{4^n(n!)^2}$ using $\Gamma(n + \frac12) = \frac{(2n)!}{4^nn!}\sqrt\pi$.

**Exercise 11.9 ★★.**

(Transfer formula) Let $T \colon (X, \mathcal A, \mu) \to (Y,
\mathcal B)$ be [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) and $T_*\mu(B) = \mu(T^{-1}(B))$ the *pushforward measure*. Show that for every [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) $g \geq 0$ on $Y$:

$$
\int_Y g\,\dd(T_*\mu) = \int_X g\circ T\,\dd\mu
$$

(standard machine). Then compare with [Theorem 11.10](#thm-b3-product-linearchange): what extra information does the change of variables formula carry that the abstract transfer formula does not? *(The transfer formula never identifies $T_*\mu$; the change of variables theorem computes $T_*\lambda_d$ explicitly as a [density](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#ex-b3-lebesgue-gamma) [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure).)*

**Solution of Exercise 11.9.**

Indicators: $\int\mathbf 1_B\,\dd(T_*\mu) = T_*\mu(B) =
\mu(T^{-1}B) = \int\mathbf 1_B\circ T\,\dd\mu$; linearity extends to simple $g$, MCT to $g \geq 0$ — the transfer formula. It is purely formal: it re-expresses integrals against $T_*\mu$ but says nothing about *what* $T_*\mu$ is. The content of [Theorem 11.10](#thm-b3-product-linearchange) and [Theorem 11.11](#thm-b3-product-changeofvar) is the identification

$$
\Phi_*\bigl(\lambda_d\restriction_U\bigr) =
\abs{\det D\Phi^{-1}}\,\lambda_d\restriction_V
\quad\text{(a density measure)},
$$

i.e. a computation of the pushforward of [Lebesgue measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-lebesgueouter) — the analytic input being the differential geometry of $\Phi$, not measure-theoretic formalism.

**Exercise 11.10 ★★★.**

(Gaussian moments) Using [polar coordinates](#ex-b3-product-polar) and Fubini, compute for the standard Gaussian weight on $\R^d$:

$$
\int_{\R^d}\norm x_2^2\;\eu^{-\norm x_2^2}\,\dd x
\qquad\text{and}\qquad
\int_{\R^d}x_1^2\,\eu^{-\norm x^2_2}\,\dd x,
$$

check the consistency ($\norm x^2 = \sum x_i^2$), and deduce the second moment of the [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $\pi^{-d/2}\eu^{-\norm x^2}\dd x$.

**Solution of Exercise 11.10.**

By Tonelli the Gaussian factorizes, so with $G_1 =
\int_\R\eu^{-s^2}\dd s = \sqrt\pi$ and $\int_\R
s^2\eu^{-s^2}\dd s = \frac{\sqrt\pi}2$ (integrate by parts):

$$
\int_{\R^d}x_1^2\,\eu^{-\norm x^2}\dd x =
\frac{\sqrt\pi}2\;\pi^{(d-1)/2} = \frac{\pi^{d/2}}2,
\qquad
\int_{\R^d}\norm x^2\eu^{-\norm x^2}\dd x =
d\cdot\frac{\pi^{d/2}}2
$$

(by symmetry, $\norm x^2 = \sum_ix_i^2$ contributes $d$ equal terms — the consistency check). For the normalized [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $\pi^{-d/2}\eu^{-\norm x^2}\dd x$, the second moment is $\frac d2$.

**Exercise 11.11 ★★.**

(Graph and hypograph) Let $f \colon \R^d \to \intco0\infty$ be [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable). (a) Show that the *hypograph* $H = \{(x, y) \in
\R^d\times\R : 0 < y < f(x)\}$ is [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) in $\R^{d+1}$ with

$$
\lambda_{d+1}(H) = \int_{\R^d}f\,\dd\lambda_d :
$$

“the integral is the area under the graph”, at last a theorem. *(Sections; Tonelli.)* (b) Show that the graph $\{(x, f(x)) : x \in \R^d\}$ is a null set of $\R^{d+1}$. (c) Deduce a two-line proof that the sphere $S^{d-1}$ is Lebesgue-null in $\R^d$.

**Solution of Exercise 11.11.**

(a) $H = \Phi^{-1}(\intoo0\infty)$ for $\Phi(x, y) = f(x) -
y$ intersected with $\{y > 0\}$: [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable), since $(x, y)
\mapsto f(x)$ and $(x,y)\mapsto y$ are [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable) on the product (compositions with the projections). The $x$-section of $H$ is $\intoo0{f(x)}$, of [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $f(x)$: Tonelli integrates the sections,

$$
\lambda_{d+1}(H) = \int_{\R^d}\lambda_1\bigl(\intoo0{f(x)}
\bigr)\,\dd x = \int_{\R^d}f\,\dd\lambda_d .
$$

(b) The graph is $\{(x,y) : y \geq f(x)\} \cap \{y \leq
f(x)\}$, [measurable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-measurable); its $x$-sections are singletons, of [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) $0$: Tonelli gives $\lambda_{d+1}(\text{graph}) =
\int 0 = 0$.

(c) $S^{d-1}$ is the union of the two graphs $y =
\pm\sqrt{1 - \abs{x'}^2}$ over the unit ball of $\R^{d-1}$ (splitting the last coordinate): a union of two null sets by (b), null.

**Exercise 11.12 ★★.**

(A famous double integral) Using the geometric series and Tonelli on $\intoo01^2$, prove

$$
\int_0^1\!\!\int_0^1\frac{\dd x\,\dd y}{1 - xy}
= \sum_{n\geq1}\frac1{n^2} = \zeta(2),
\qquad
\int_0^1\!\!\int_0^1\frac{\dd x\,\dd y}{1 + xy}
= \sum_{n\geq1}\frac{(-1)^{n-1}}{n^2} = \frac{\zeta(2)}2 .
$$

(The second series identity: split even and odd indices.) With $\zeta(2) = \frac{\pi^2}6$ ([Chapter 15](https://one-course.com/books/math/5/en/chapter/15-compact-operators-and-the-spectral-theorem#ch-b3-spectral)), two innocent-looking integrals evaluate to $\frac{\pi^2}6$ and $\frac{\pi^2}{12}$; where exactly does Tonelli’s positivity hypothesis do its work?

**Solution of Exercise 11.12.**

On $\intoo01^2$, $\frac1{1 - xy} = \sum_{n\geq0}(xy)^n$ with nonnegative terms: Tonelli permits term-by-term integration,

$$
\iint\frac{\dd x\,\dd y}{1 - xy}
= \sum_{n\geq0}\Bigl(\int_0^1x^n\dd x\Bigr)
\Bigl(\int_0^1y^n\dd y\Bigr)
= \sum_{n\geq0}\frac1{(n+1)^2} = \zeta(2) .
$$

For the alternating case, $\frac1{1 + xy} =
\sum_n(-1)^n(xy)^n$ is not a positive series; but the integral of the *absolute* series is $\zeta(2) <
\infty$, so Fubini ([integrability](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1) now established) applies: $\iint\frac{\dd x\dd y}{1 + xy} =
\sum_n\frac{(-1)^n}{(n+1)^2}$. The series identity:

$$
\sum_{n\geq1}\frac{(-1)^{n-1}}{n^2}
= \sum_{n\geq1}\frac1{n^2} - 2\sum_{k\geq1}\frac1{(2k)^2}
= \zeta(2) - \frac{\zeta(2)}2 = \frac{\zeta(2)}2 .
$$

With $\zeta(2) = \frac{\pi^2}6$ ([Problem 15.1](https://one-course.com/books/math/5/en/chapter/15-compact-operators-and-the-spectral-theorem#pb-b3-spectral-1)): the integrals are $\frac{\pi^2}6$ and $\frac{\pi^2}{12}$. Tonelli’s positivity was the whole ballgame in the first computation — no [integrability](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1) check needed before interchanging; in the second, positivity of the absolute series is what *certifies* [integrability](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1) so that Fubini may run on the signed one.

## 11.5 Problem: Stirling’s formula

**Problem 11.1.**

Weekend problem — $n! \sim
\sqrt{2\pi n}\,(n/\eu)^n$, by dominated convergence

Stirling’s formula governs every asymptotic count in this book — ball volumes, binomial coefficients, the central limit theorem’s local form. We prove it from the $\Gamma$ integral ([Example 10.16](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#ex-b3-lebesgue-gamma)) with the *Laplace method*, in its cleanest dominated-convergence form, then collect dividends.

**Part I — The formula.** For $t > 0$, $\Gamma(t + 1) = \int_0^\infty x^{t}\eu^{-x}\dd x$.

1. Substitute $x = t + \sqrt t\,u$ and show $$\frac{\Gamma(t+1)}{t^{t}\eu^{-t}\sqrt t}  = \int_{-\sqrt t}^{+\infty}  \exp\Bigl(t\ln\Bigl(1 + \frac u{\sqrt  t}\Bigr) - \sqrt t\,u\Bigr)\,\dd u  \;=\;\int_\R g_t(u)\,\dd u,$$ where $g_t(u) = \exp\bigl(t\ln(1 + u/\sqrt t) -  \sqrt t\,u\bigr)\mathbf 1_{u > -\sqrt t}$.
2. Show the pointwise limit: for every fixed $u$ , $g_t(u)  \to \eu^{-u^2/2}$ as $t \to +\infty$ *(expand $\ln(1 + h)$ to second order)* .
3. Domination. Let $\varphi(h) = \ln(1 + h) - h$, so that $g_t(u) = \exp\bigl(t\,\varphi(u/\sqrt t)\bigr)$ for $u > -\sqrt t$. Prove the two bounds $$\varphi(h) \leq -\frac{h^2}4 \quad (-1 < h \leq 1),  \qquad  \varphi(h) \leq -c\,h \quad (h \geq 1),\ \ c = 1 -  \ln 2 > 0$$ *(study $\varphi(h) + \frac{h^2}4$ and $\varphi(h)  + ch$: compute the derivatives and check the sign on each range)*. Deduce, for $t \geq 1$: $$g_t(u) \leq \eu^{-u^2/4}\ \ (\abs u \leq \sqrt t),  \qquad  g_t(u) \leq \eu^{-cu}\ \ (u \geq \sqrt t),$$ so that $g_t(u) \leq \eu^{-u^2/4} +  \eu^{-cu}\,\mathbf 1_{u > 0}$: an [integrable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1) dominator independent of $t \geq 1$.
4. Conclude with the dominated convergence theorem and the Gaussian integral ([Example 11.12](#ex-b3-product-polar)): $$\Gamma(t + 1) \;\sim\;  \sqrt{2\pi t}\;\Bigl(\frac t\eu\Bigr)^{t}  \qquad (t \to +\infty),$$ and in particular $n! \sim \sqrt{2\pi  n}\,(n/\eu)^n$.

**Part II — Dividends.**

5. (Wallis) From [Exercise 11.8](#exo-b3-product-8) , $W_{2n} =  \frac\pi2\binom{2n}n4^{-n}$ -type formulas: derive $\binom{2n}{n} \sim \frac{4^n}{\sqrt{\pi n}}$ from Stirling, and check it against the recursion $W_{n} =  \frac{n-1}nW_{n-2}$ .
6. (Ball volumes collapse) Show $$v_d = \frac{\pi^{d/2}}{\Gamma(\frac d2 + 1)}  \;\sim\; \frac{1}{\sqrt{\pi d}}  \Bigl(\frac{2\pi\eu}{d}\Bigr)^{d/2},$$ so $v_d \to 0$ faster than any geometric sequence; find the dimension maximizing $v_d$ (numerically: $d =  5$).
7. (Concentration of the binomial — a preview of [Chapter 23](https://one-course.com/books/math/5/en/chapter/23-characteristic-functions-and-the-central-limit-theorem#ch-b3-clt)) Using Stirling, show the local estimate, for $k = n/2 + s\sqrt n/2$ with $s$ fixed and $n$ even: $$2^{-n}\binom{n}{k} \;\sim\;  \sqrt{\frac{2}{\pi n}}\;\eu^{-s^2/2},$$ the discrete Gaussian profile: de Moivre–Laplace in embryo.
8. Where exactly did the proof of Part I use: (i) MCT or DCT; (ii) the Gaussian integral; (iii) the invariance properties of [Lebesgue measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-lebesgueouter) ? One sentence each.

**Part III — The error term: Stirling with bars.** Set $d_n = \ln n! - \bigl(n + \tfrac12\bigr)\ln n + n -
\ln\sqrt{2\pi}$, so that Part I says $d_n \to 0$.

9. Show $d_n - d_{n+1} = \bigl(n +  \tfrac12\bigr)\ln\bigl(1 + \tfrac1n\bigr) - 1$ .
10. With $t = \frac1{2n+1}$, verify $\frac{n+1}n =  \frac{1+t}{1-t}$ and expand: $$d_n - d_{n+1} = \frac{t^2}3 + \frac{t^4}5 +  \frac{t^6}7 + \cdots,$$ and deduce the two-sided bounds $$\frac1{3(2n+1)^2} \;<\; d_n - d_{n+1} \;<\;  \frac1{12n} - \frac1{12(n+1)} .$$
11. Telescope (using $d_m \to 0$) and check the pleasant [algebraic](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#def-b3-galois-algebraic) identity $\frac1{3(2m+1)^2} >  \frac1{12m+1} - \frac1{12(m+1)+1}$ for $m \geq 1$, to obtain the classical bracketing $$\sqrt{2\pi n}\Bigl(\frac n\eu\Bigr)^n  \eu^{1/(12n+1)} \;<\; n! \;<\;  \sqrt{2\pi n}\Bigl(\frac n\eu\Bigr)^n\eu^{1/(12n)} .$$
12. Two consequences: (a) the relative error of Stirling’s formula is $< 10^{-6}$ as soon as $n \geq 83\,334$ ; (b) estimate $100!$ to four significant digits by hand from the bracketing ( $100! \approx 9.3326\cdot  10^{157}$ ), and marvel briefly at the precision of an asymptotic formula at a very finite $n$ .

**Part IV — The Wallis route: Stirling without the Gaussian.** Historically the constant $\sqrt{2\pi}$ came from Wallis, not from Gauss; this part re-proves Stirling independently of Parts I–II, and thereby re-proves the Gaussian integral. Let $W_n = \int_0^{\pi/2}\sin^n\theta\,
\dd\theta$.

13. Establish $W_n = \frac{n-1}nW_{n-2}$ (integrate by parts), the closed forms $$W_{2n} = \frac\pi2\binom{2n}n4^{-n}, \qquad  W_{2n+1} = \frac{4^n}{(2n+1)\binom{2n}n},$$ and the identity $W_nW_{n-1} = \frac\pi{2n}$.
14. From the monotonicity of $(W_n)$ deduce $W_{2n}/W_{2n+1} \to 1$, then $$W_{2n} \sim \frac12\sqrt{\frac\pi n}  \qquad\text{and}\qquad  \binom{2n}n4^{-n}\sqrt n \longrightarrow  \frac1{\sqrt\pi} :$$ Wallis’ theorem, obtained without Stirling.
15. Show, by the telescoping of Part III alone (no value of the constant needed), that $e_n = \ln n! - (n +  \frac12)\ln n + n$ converges to some limit $\ell$ ; equivalently $n! \sim K\,n^{n+1/2}\eu^{-n}$ with $K =  \eu^\ell > 0$ not yet identified.
16. Insert this asymptotic into $\binom{2n}n4^{-n}\sqrt n$ and identify, using question 14, the only possible value: $K = \sqrt{2\pi}$ . Assemble the logic: Parts III–IV together give a [complete](https://one-course.com/books/math/5/en/chapter/7-complete-spaces-baire-ascoli-stoneweierstrass#def-b3-complete-complete) second proof of Stirling — and hence, running Part I’s substitution backwards, an independent evaluation of $\int_\R\eu^{-u^2/2}\dd u = \sqrt{2\pi}$ . Two pillars, either of which supports the other.

**Part V — Last dividends.**

17. (The full local profile) For integers $\abs j \leq  K\sqrt n$ ($K$ fixed), show $$\frac{\binom{2n}{n+j}}{\binom{2n}{n}} =  \prod_{i=1}^{\abs j}\frac{n - i + 1}{n + i}  = \exp\Bigl(-\frac{j^2}n +  O\Bigl(\frac1{\sqrt n}\Bigr)\Bigr),$$ uniformly in $j$ *(take logarithms and use $\ln  \frac{1-x}{1+y} = -(x + y) + O(x^2 + y^2)$)*. This is the two-sided version of question 7 and the exact estimate quoted in [Chapter 23](https://one-course.com/books/math/5/en/chapter/23-characteristic-functions-and-the-central-limit-theorem#ch-b3-clt)’s weekend problem.
18. (A Poisson preview) Show with Stirling that $\eu^{-n}\dfrac{n^n}{n!} \sim \dfrac1{\sqrt{2\pi n}}$ : the mode of a Poisson law of large mean $n$ carries mass $\approx (2\pi n)^{-1/2}$ , exactly as the central limit theorem will predict.
19. (Gamma ratios) For $a \in \intoo01$ , prove $\dfrac{\Gamma(n + a)}{\Gamma(n)\,n^a} \to 1$ using the log-convexity slope bounds of [Problem 10.1](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#pb-b3-lebesgue-1) (question 14 there), and extend to every real $a > 0$ by the functional equation. (This is what “ $\Gamma(t+1) \sim$ Stirling” means between the integers.)
20. (Balls, encore) From $v_d = \pi^{d/2}/\Gamma(\frac d2  + 1)$: tabulate $v_1, \dots, v_7$ exactly, verify unimodality via $\frac{v_d}{v_{d-2}} = \frac{2\pi}d$ (increasing while $d < 2\pi$, decreasing after), and prove the striking generating identity $$\sum_{k\geq0}v_{2k}\,x^{2k} = \eu^{\pi x^2} :$$ all even-dimensional unit-ball volumes packed into one exponential.
21. (Entropy asymptotics) For fixed $\alpha \in \intoo01$ with $\alpha n \in \N$, deduce from Stirling $$\binom{n}{\alpha n} \;\sim\;  \frac{\eu^{n\,H(\alpha)}}  {\sqrt{2\pi\,\alpha(1-\alpha)\,n}},  \qquad  H(\alpha) = -\alpha\ln\alpha -  (1-\alpha)\ln(1-\alpha) :$$ the exponential growth rate of binomial coefficients is the *entropy* $H$ — check that $\alpha =  \frac12$ recovers question 5, and that $H(\alpha) <  \ln2$ for $\alpha \neq \frac12$ (so [off-center](https://one-course.com/books/math/5/en/chapter/1-group-theory#ex-b3-groups-actions) binomials are exponentially negligible in $2^n$).
22. (Surface areas) The area of the unit sphere $S^{d-1}$ is $s_{d-1} = d\,v_d$ (proved as [Exercise 21.6](https://one-course.com/books/math/5/en/chapter/21-differential-forms-and-stokes-theorem#exo-b3-forms-6) in the differential-forms chapter; here, take it as the definition). Tabulate $s_0, \dots, s_6$ , locate the maximal one ( $d - 1 =  6$ , $s_6 = \frac{16\pi^3}{15} \approx 33.07$ ), and show $s_{d-1} \to 0$ super-geometrically as well — high-dimensional spheres are, by every Euclidean yardstick, vanishingly small.
23. (The first correction term) Deduce from the bracketing of question 11 that $d_n = \frac1{12n} +  O\bigl(\frac1{n^2}\bigr)$, hence $$n! = \sqrt{2\pi n}\,\Bigl(\frac  n\eu\Bigr)^{n}\Bigl(1 + \frac1{12n} +  O\Bigl(\frac1{n^2}\Bigr)\Bigr).$$ Verify at $n = 10$: the bare formula gives $3\,598\,696$ (relative error $8.3\cdot10^{-3}$), the corrected one $3\,628\,685$ against $10! =  3\,628\,800$ (relative error $3.2\cdot10^{-5}$) — one term of the series buys two and a half digits.
24. (The median of $\Gamma$) Show that $$\frac{1}{\Gamma(t+1)}  \int_0^{t} x^{t}\eu^{-x}\,\dd x  \;\longrightarrow\; \frac12  \qquad (t \to +\infty) :$$ asymptotically, exactly half of the mass of the $\Gamma$ integrand sits below its mode $x = t$. *(Run Part I’s substitution on the truncated integral; the dominator of question 3 is already in place.)*
25. (Entropy, non-asymptotically) For $\alpha \in  \intoc0{\frac12}$ prove the bound, valid for *every* $n \geq 1$: $$\sum_{k=0}^{\lfloor\alpha n\rfloor}\binom nk  \;\leq\; \eu^{n\,H(\alpha)} ,$$ by comparing the sum with $\sum_k\binom  nk\lambda^{k-\alpha n}$ for the tilt $\lambda =  \frac{\alpha}{1-\alpha} \leq 1$. Check that this choice of $\lambda$ is optimal, and reconcile with question 21: the exponential rate $H(\alpha)$ of the asymptotic statement is attained by a one-line inequality with no asymptotics at all.

**Solution of Problem 11.1.**

**1.** With $x = t + \sqrt t\,u$ ($\dd x = \sqrt
t\,\dd u$; $x$ ranges over $\intoo0\infty$ as $u$ ranges over $\intoo{-\sqrt t}\infty$):

$$
\Gamma(t{+}1) = \int_0^\infty x^t\eu^{-x}\dd x
= t^t\eu^{-t}\sqrt t\int_{-\sqrt t}^{\infty}
\exp\Bigl(t\ln\Bigl(1 + \frac u{\sqrt t}\Bigr) - \sqrt
t\,u\Bigr)\dd u,
$$

since $x^t = t^t\exp\bigl(t\ln(1 + u/\sqrt t)\bigr)$ and $\eu^{-x} = \eu^{-t}\eu^{-\sqrt tu}$.

**2.** For fixed $u$ and $t \to \infty$: $t\ln(1 +
u/\sqrt t) - \sqrt tu = t\bigl(\frac u{\sqrt t} -
\frac{u^2}{2t} + o(\frac1t)\bigr) - \sqrt tu = -\frac{u^2}2 +
o(1)$: $g_t(u) \to \eu^{-u^2/2}$.

**3.** Set $\psi_1(h) = \varphi(h) + \frac{h^2}4$ on $\intoc{-1}1$: $\psi_1(0) = 0$ and $\psi_1'(h) = \frac1{1+h} -
1 + \frac h2 = \frac{h(h-1)}{2(1+h)}$, which is $\geq 0$ on $\intoc{-1}0$ and $\leq 0$ on $\intcc01$: $\psi_1 \leq 0$, i.e. $\varphi(h) \leq -h^2/4$ there. Set $\psi_2(h) =
\varphi(h) + ch$ on $\intco1\infty$, $c = 1 - \ln2$: $\psi_2(1)
= \ln2 - 1 + c = 0$ and $\psi_2'(h) = c - \frac h{1+h} \leq c -
\frac12 < 0$: $\varphi(h) \leq -ch$ for $h \geq 1$. Now for $t
\geq 1$: if $\abs u \leq \sqrt t$, $g_t(u) =
\eu^{t\varphi(u/\sqrt t)} \leq \eu^{-t(u/\sqrt t)^2/4} =
\eu^{-u^2/4}$; if $u \geq \sqrt t$, then $t\,\varphi(u/\sqrt t) \leq
-ct\cdot\frac u{\sqrt t} = -c\sqrt t\,u \leq -cu$ (as $t \geq
1$), so $g_t(u) \leq \eu^{-cu}$. Hence $g_t \leq \eu^{-u^2/4} +
\eu^{-cu}\mathbf 1_{u>0}$, [integrable](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#def-b3-lebesgue-l1), independent of $t \geq
1$.

**4.** DCT: $\int_\R g_t(u)\dd u \to
\int_\R\eu^{-u^2/2}\dd u = \sqrt{2\pi}$ ([Example 11.12](#ex-b3-product-polar) plus the scaling $u\mapsto\sqrt2\,u$). With question 1:

$$
\Gamma(t + 1) \sim \sqrt{2\pi t}\;\Bigl(\frac
t\eu\Bigr)^t,\qquad
n! \sim \sqrt{2\pi n}\,\Bigl(\frac n\eu\Bigr)^n .
$$

**5.** From [Exercise 11.8](#exo-b3-product-8), $W_{2n} =
\frac\pi2\,\frac{(2n)!}{4^n(n!)^2} =
\frac\pi2\,4^{-n}\binom{2n}n$. Stirling:

$$
\binom{2n}{n} = \frac{(2n)!}{(n!)^2}
\sim \frac{\sqrt{4\pi n}\,(2n/\eu)^{2n}}
{2\pi n\,(n/\eu)^{2n}} = \frac{4^n}{\sqrt{\pi n}} .
$$

Then $W_{2n} \sim \frac12\sqrt{\pi/n}$, consistent with the recursion $W_n = \frac{n-1}nW_{n-2}$ (which forces $W_n \sim
W_{n-2}$, and with $W_nW_{n-1}\cdot n = \frac\pi2$ — the classical Wallis relation — gives $W_n \sim
\sqrt{\pi/(2n)}$; the two asymptotics agree).

**6.** $\Gamma(\frac d2 + 1) \sim \sqrt{2\pi\frac
d2}\,(\frac d{2\eu})^{d/2}$, so

$$
v_d = \frac{\pi^{d/2}}{\Gamma(\frac d2 + 1)}
\sim \frac{1}{\sqrt{\pi d}}\Bigl(\frac{2\pi\eu}
d\Bigr)^{d/2} \longrightarrow 0
$$

super-geometrically (for $d > 2\pi\eu \approx 17$, each factor $< 1$ and shrinking). Numerically $v_1 = 2$, $v_2 \approx
3.14$, $v_3 \approx 4.19$, $v_4 \approx 4.93$, $v_5 \approx
5.26$, $v_6 \approx 5.17$: the maximum is at $d = 5$.

**7.** With $k = \frac n2 + \frac{s\sqrt n}2$ (integer, $n$ even, $s$ fixed): take logarithms in $2^{-n}\binom nk =
2^{-n}\frac{n!}{k!(n-k)!}$ and apply Stirling to the three factorials. Writing $k = \frac n2(1 + \varepsilon)$, $n - k =
\frac n2(1 - \varepsilon)$ with $\varepsilon = s/\sqrt n$:

$$
\ln\Bigl(2^{-n}\binom nk\Bigr)
= -\frac n2\bigl[(1{+}\varepsilon)\ln(1{+}\varepsilon) +
(1{-}\varepsilon)\ln(1{-}\varepsilon)\bigr]
+ \frac12\ln\frac{2}{\pi n(1 - \varepsilon^2)} + o(1),
$$

and the bracket is $\varepsilon^2 + O(\varepsilon^4) =
\frac{s^2}n + O(n^{-2})$: the display tends to $-\frac{s^2}2 +
\frac12\ln\frac2{\pi n}$ up to $o(1)$, i.e.

$$
2^{-n}\binom nk \sim \sqrt{\frac{2}{\pi
n}}\;\eu^{-s^2/2} :
$$

the Gaussian profile of coin-tossing, quantified — de Moivre–Laplace’s local form, to be globalized in [Chapter 23](https://one-course.com/books/math/5/en/chapter/23-characteristic-functions-and-the-central-limit-theorem#ch-b3-clt).

**8.** (i) DCT converts the pointwise limit of question 2 into convergence of the integrals, using question 3’s dominator. (ii) The Gaussian integral evaluates the limit $\int\eu^{-u^2/2} = \sqrt{2\pi}$ — Stirling’s constant $\sqrt{2\pi}$ *is* the Gaussian integral. (iii) The substitution $x = t + \sqrt tu$ is an affine change of variables: translation invariance and the scaling rule of [Lebesgue measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-lebesgueouter) ([Theorem 11.10](#thm-b3-product-linearchange) in dimension $1$).

**9.** Expand both terms:

$$
d_n - d_{n+1} = \ln\frac{n!}{(n+1)!} + \Bigl(n +
\frac32\Bigr)\ln(n+1) - \Bigl(n + \frac12\Bigr)\ln n - 1
= \Bigl(n + \frac12\Bigr)\ln\frac{n+1}n - 1,
$$

the terms $-\ln(n+1)$ and $(n + \frac32)\ln(n+1)$ combining into $(n + \frac12)\ln(n+1)$.

**10.** For $t = \frac1{2n+1}$: $\frac{1+t}{1-t} =
\frac{2n+2}{2n} = \frac{n+1}n$, and $n + \frac12 =
\frac1{2t}$; the odd series $\ln\frac{1+t}{1-t} =
2\sum_{k\geq0}\frac{t^{2k+1}}{2k+1}$ gives

$$
\Bigl(n + \frac12\Bigr)\ln\frac{n+1}n
= \sum_{k\geq0}\frac{t^{2k}}{2k+1}
= 1 + \frac{t^2}3 + \frac{t^4}5 + \cdots
$$

Subtract $1$. Lower bound: the first term alone, $\frac{t^2}3 = \frac1{3(2n+1)^2}$. Upper bound: lower all denominators to $3$ and sum the geometric series: $\frac{t^2}{3(1 - t^2)} = \frac1{3((2n+1)^2 - 1)} =
\frac1{12n(n+1)} = \frac1{12n} - \frac1{12(n+1)}$.

**11.** Summing the upper bound from $n$ to $\infty$ (with $d_m \to 0$): $d_n < \frac1{12n}$. For the lower bound: $\frac1{12m+1} - \frac1{12(m+1)+1} =
\frac{12}{(12m+1)(12m+13)}$, and

$$
\begin{align*}
\frac1{3(2m+1)^2} > \frac{12}{(12m+1)(12m+13)}
&\iff (12m+1)(12m+13) > 36(2m+1)^2 \\
&\iff 168m + 13 > 144m + 36,
\end{align*}
$$

true for $m \geq 1$. Summing this telescoping minorant: $d_n > \frac1{12n+1}$. Exponentiating gives the classical bracketing of $n!$.

**12.** (a) Relative error $= \eu^{d_n} - 1 <
\eu^{1/(12n)} - 1 < \frac{1.1}{12n}$ for $n$ large; $<
10^{-6}$ as soon as $12n \geq 1.1\cdot10^6$, and the stated $n \geq 83\,334$ suffices ($\frac1{12n} \leq 10^{-6}$ already implies it). (b) $\log_{10}(100!) =
\frac12\log_{10}(200\pi) + 200 - 100\log_{10}\eu +
d_{100}\log_{10}\eu = 1.39906 + 200 - 43.42945 + 0.00036
\approx 157.96997$, so $100! \approx 10^{0.96997} \cdot
10^{157} = 9.333\cdot10^{157}$; the guaranteed window $(\eu^{1/1201}, \eu^{1/1200})$ has width under $10^{-6}$ in relative terms — an “asymptotic” formula that is, at $n =
100$, an instrument of precision.

**13.** Write $\sin^n = \sin^{n-2} - \sin^{n-2}\cos^2$, and integrate the second term by parts ($u = \cos\theta$, $\dd v = \sin^{n-2}\cos\theta\,\dd\theta$, $v =
\frac{\sin^{n-1}}{n-1}$):

$$
\int_0^{\pi/2}\sin^{n-2}\cos^2 =
\Bigl[\cos\theta\,\frac{\sin^{n-1}\theta}{n-1}\Bigr]_0^{\pi/2}
+ \frac1{n-1}\int_0^{\pi/2}\sin^n = \frac{W_n}{n-1} .
$$

Hence $W_n = W_{n-2} - \frac{W_n}{n-1}$, i.e. $W_n =
\frac{n-1}nW_{n-2}$. From $W_0 = \frac\pi2$, $W_1 = 1$:

$$
W_{2n} = \frac{(2n-1)!!}{(2n)!!}\cdot\frac\pi2
= \frac\pi2\binom{2n}n4^{-n},
\qquad
W_{2n+1} = \frac{(2n)!!}{(2n+1)!!}
= \frac{4^n}{(2n+1)\binom{2n}n},
$$

converting double factorials by $(2n)!! = 2^nn!$ and $(2n-1)!! = \frac{(2n)!}{2^nn!}$. Finally $nW_nW_{n-1} =
(n-1)W_{n-1}W_{n-2}$ by the recursion: constant, equal to $1\cdot W_1W_0 = \frac\pi2$.

**14.** $W_{2n+1} \leq W_{2n} \leq W_{2n-1}$ (pointwise monotonicity of $\sin^n$) and $\frac{W_{2n-1}}{W_{2n+1}} =
\frac{2n+1}{2n} \to 1$ squeeze $\frac{W_{2n}}{W_{2n+1}} \to
1$. Combined with $W_{2n}W_{2n+1} = \frac{\pi}{2(2n+1)}$ (question 13): $W_{2n}^2 \sim \frac\pi{4n}$, so $W_{2n} \sim
\frac12\sqrt{\frac\pi n}$ and $\binom{2n}n4^{-n} =
\frac2\pi W_{2n} \sim \frac1{\sqrt{\pi n}}$.

**15.** Questions 9–10 never used the value of the constant: with $e_n = \ln n! - (n+\frac12)\ln n + n$, the differences $e_n - e_{n+1}$ lie in $\bigl(0, \frac1{12n} -
\frac1{12(n+1)}\bigr)$, so $(e_n)$ decreases while $(e_n -
\frac1{12n})$ increases: adjacent sequences, converging to a common $\ell$. Hence $n! \sim K n^{n+1/2}\eu^{-n}$, $K =
\eu^\ell$.

**16.** Substituting the unknown-constant Stirling into the central binomial:

$$
\binom{2n}n4^{-n}\sqrt n \sim
\frac{K\,(2n)^{2n+1/2}\eu^{-2n}}{\bigl(K\,n^{n+1/2}
\eu^{-n}\bigr)^2}\,4^{-n}\sqrt n
= \frac{2^{2n}\sqrt{2}\,K\,n^{2n+1/2}}{K^2\,n^{2n+1}}
\,4^{-n}\sqrt n = \frac{\sqrt2}{K},
$$

and question 14 forces $\frac{\sqrt2}K = \frac1{\sqrt\pi}$: $K = \sqrt{2\pi}$. Parts III–IV thus reprove Stirling from scratch; feeding it into Part I’s identity evaluates $\int_\R\eu^{-u^2/2}\dd u = \sqrt{2\pi}$ without [polar coordinates](#ex-b3-product-polar): Wallis and Gauss prop each other up.

**17.** $\frac{\binom{2n}{n+j}}{\binom{2n}n} =
\frac{(n!)^2}{(n+j)!\,(n-j)!} =
\prod_{i=1}^{j}\frac{n-i+1}{n+i}$ for $j \geq 0$ (and by symmetry for $j < 0$). Taking logarithms, with $1 \leq i
\leq j \leq K\sqrt n$:

$$
\ln\frac{n-i+1}{n+i} = \ln\Bigl(1 - \frac{i-1}n\Bigr) -
\ln\Bigl(1 + \frac in\Bigr) = -\frac{2i-1}{n} +
O\Bigl(\frac{i^2}{n^2}\Bigr),
$$

and $\sum_{i\leq j}(2i - 1) = j^2$, while the error sums to $O(j^3/n^2) = O(n^{-1/2})$: uniformly, $\exp\bigl(-\frac{j^2}n + O(n^{-1/2})\bigr)$.

**18.** $\eu^{-n}\frac{n^n}{n!} \sim \eu^{-n}
\frac{n^n}{\sqrt{2\pi n}\,n^n\eu^{-n}} =
\frac1{\sqrt{2\pi n}}$. A Poisson variable of mean $n$ has standard deviation $\sqrt n$, and $\frac1{\sqrt{2\pi n}}$ is exactly the Gaussian peak height $\frac1{\sigma\sqrt{2\pi}}$: the local CLT, previewed at the mode.

**19.** For $a \in \intoo01$, the slope lemma of [Problem 10.1](https://one-course.com/books/math/5/en/chapter/10-the-lebesgue-integral#pb-b3-lebesgue-1) (question 14 there), applied to the convex $\log\Gamma$ around $n$, gives $(n-1)^a \leq
\frac{\Gamma(n+a)}{\Gamma(n)} \leq n^a$: the ratio to $n^a$ is squeezed by $(1 - \frac1n)^a \to 1$. For $a = m + a'$ ($m \in \N$, $a' \in \intco01$): $\Gamma(n+a) = (n + a - 1)
\cdots(n + a')\Gamma(n + a')$, and each of the $m$ factors is $n(1 + O(\frac1n))$: multiply the estimates.

**20.** The recursion $v_d = \frac{2\pi}dv_{d-2}$ (from $\Gamma(\frac d2 + 1) = \frac d2\Gamma(\frac d2)$) gives, from $v_1 = 2$, $v_2 = \pi$:

$$
v_3 = \frac{4\pi}3,\quad v_4 = \frac{\pi^2}2,\quad
v_5 = \frac{8\pi^2}{15},\quad v_6 = \frac{\pi^3}6,\quad
v_7 = \frac{16\pi^3}{105}.
$$

The ratio $\frac{2\pi}d$ exceeds $1$ exactly for $d \leq 6$, so each parity increases then decreases; numerically $v_4
\approx 4.93$, $v_5 \approx 5.26$, $v_6 \approx 5.17$: the overall maximum is $d = 5$. Generating function: $v_{2k} =
\frac{\pi^k}{k!}$, so $\sum_kv_{2k}x^{2k} =
\eu^{\pi x^2}$ — all even-dimensional ball volumes rolled into one exponential, and an instant super-geometric decay estimate for $v_d$.

**21.** Stirling in numerator and denominator, with $k =
\alpha n$:

$$
\binom n{\alpha n} \sim
\frac{\sqrt{2\pi n}\,n^n}
{\sqrt{2\pi\alpha n}\,(\alpha n)^{\alpha n}\,
\sqrt{2\pi(1-\alpha)n}\,((1-\alpha)n)^{(1-\alpha)n}}
= \frac{\eu^{nH(\alpha)}}{\sqrt{2\pi\alpha(1-\alpha)n}},
$$

since $n^n/(\alpha n)^{\alpha n}((1-\alpha)n)^{(1-\alpha)n} =
\alpha^{-\alpha n}(1-\alpha)^{-(1-\alpha)n} =
\eu^{nH(\alpha)}$ (the powers of $n$ cancel: $\alpha n +
(1-\alpha)n = n$), and the $\eu^{-n}$’s cancel likewise. At $\alpha = \frac12$: $H = \ln2$ and the prefactor is $\sqrt{2/(\pi n)}$ — question 5 again. Strict concavity of $H$ (its second derivative $-\frac1{\alpha(1-\alpha)} < 0$) puts its maximum $\ln 2$ at $\alpha = \frac12$ only: for $\alpha \neq \frac12$, $\binom n{\alpha n}2^{-n} \approx
\eu^{-n(\ln2 - H(\alpha))}$ decays exponentially — the combinatorial engine behind every concentration statement about coin flips.

**22.** From $s_{d-1} = dv_d$ and question 20:

$$
s_0 = 2,\ \ s_1 = 2\pi,\ \ s_2 = 4\pi,\ \ s_3 = 2\pi^2,\ \
s_4 = \frac{8\pi^2}3,\ \ s_5 = \pi^3,\ \ s_6 =
\frac{16\pi^3}{15},
$$

numerically $2,\ 6.28,\ 12.57,\ 19.74,\ 26.32,\ 31.01,\
33.07$; and $s_7 = \frac{\pi^4}3 \approx 32.47 < s_6$: the maximum is the $6$-sphere. The recursion $s_{d+1} =
(d+2)\,v_{d+2} = (d+2)\,\frac{2\pi}{d+2}\,v_d = 2\pi v_d =
\frac{2\pi}d\,s_{d-1}$ shows the same $\frac{2\pi}d$-driven rise and super-geometric fall as for volumes: past dimension seven, spheres shrink away faster than any geometric sequence.

**23.** Question 11 says exactly $\frac1{12n+1} < d_n <
\frac1{12n}$, and

$$
\frac1{12n} - \frac1{12n+1} = \frac1{12n(12n+1)} =
O\Bigl(\frac1{n^2}\Bigr),
$$

so $d_n = \frac1{12n} + O(\frac1{n^2})$ and $\eu^{d_n} = 1 +
\frac1{12n} + O(\frac1{n^2})$; multiplying by $\sqrt{2\pi n}(n/\eu)^n$ gives the corrected formula. At $n =
10$: $\sqrt{20\pi}\,(10/\eu)^{10} = 7.92665 \times 453999.3
\approx 3\,598\,696$, low by $30\,104$ (relative error $8.3\cdot10^{-3}$); multiplying by $1 + \frac1{120}$ gives $3\,628\,685$, low by $115$ (relative error $3.2\cdot10^{-5}$). The bracketing itself pins $10!$ between $3\,598\,696\,\eu^{1/121} \approx 3\,628\,559$ and $3\,598\,696\,\eu^{1/120} \approx 3\,628\,808$ — the upper bound is off by eight units in seven digits.

**24.** Part I’s substitution $x = t + \sqrt t\,u$, applied to the truncated integral, gives

$$
\int_0^{t} x^{t}\eu^{-x}\,\dd x
= t^{t}\eu^{-t}\sqrt t\int_{-\sqrt t}^{0} g_t(u)\,\dd u ,
$$

the range $0 \leq x \leq t$ becoming $-\sqrt t \leq u \leq
0$. The dominator of question 3 covers $g_t\mathbf 1_{u < 0}$ as well, so dominated convergence yields

$$
\int_{-\sqrt t}^{0}g_t(u)\,\dd u \longrightarrow
\int_{-\infty}^{0}\eu^{-u^2/2}\dd u = \frac{\sqrt{2\pi}}2 ,
$$

while question 4 gives $\Gamma(t+1) \sim
t^t\eu^{-t}\sqrt t\,\sqrt{2\pi}$. The ratio tends to $\frac12$. Probabilistically: a Gamma random variable of large shape puts asymptotically half its mass on each side of its mode — the central limit theorem’s symmetry, read off from one substitution.

**25.** Let $\lambda = \frac{\alpha}{1-\alpha} \in
\intoc01$. For $k \leq \lfloor\alpha n\rfloor \leq \alpha n$ we have $\lambda^{k - \alpha n} \geq 1$, hence

$$
\sum_{k=0}^{\lfloor\alpha n\rfloor}\binom nk
\leq \lambda^{-\alpha n}\sum_{k=0}^{n}\binom nk\lambda^{k}
= \Bigl(\lambda^{-\alpha}(1 + \lambda)\Bigr)^{n},
$$

and with $\lambda = \frac\alpha{1-\alpha}$:

$$
\lambda^{-\alpha}(1+\lambda)
= \alpha^{-\alpha}(1-\alpha)^{\alpha}\cdot\frac1{1-\alpha}
= \alpha^{-\alpha}(1-\alpha)^{-(1-\alpha)}
= \eu^{H(\alpha)} .
$$

Optimality: minimizing $f(\lambda) = -\alpha\ln\lambda +
\ln(1+\lambda)$ over $\lambda > 0$, the equation $f'(\lambda)
= -\frac\alpha\lambda + \frac1{1+\lambda} = 0$ has the unique solution $\lambda = \frac\alpha{1-\alpha}$, a minimum since $f'' > 0$ — the exponential-tilting (Chernoff) choice. Reconciliation: by question 21 the single term $k =
\lfloor\alpha n\rfloor$ is already of order $\eu^{nH(\alpha)}/\sqrt{2\pi\alpha(1-\alpha)n}$, so

$$
\frac{\eu^{nH(\alpha)}}{C\sqrt n} \leq
\sum_{k\leq\alpha n}\binom nk \leq \eu^{nH(\alpha)} :
$$

the rate $H(\alpha)$ is exact, the whole sum costing at most a factor $\sqrt n$ over its largest term. Divided by $2^n$, this is the fair-coin tail bound $\P(S_n \leq \alpha n) \leq
\eu^{-n(\ln2 - H(\alpha))}$ — concentration of [measure](https://one-course.com/books/math/5/en/chapter/9-measure-theory#def-b3-measure-measure) in one line.
