Fubini–Tonelli Theorem

Nonnegative (Tonelli) or integrable (Fubini) functions give the same iterated integrals in either order — rows-first or columns-first. Without integrability it breaks.

∬f=∫ ⁣ ⁣(∫f dx) ⁣dy=∫ ⁣ ⁣(∫f dy) ⁣dx\iint f = \int\!\!\left(\int f\,dx\right)\!dy = \int\!\!\left(\int f\,dy\right)\!dx

Examples & Exercises

For f(x,y)=xyf(x, y) = xy (on [0,1]2[0,1]^2), compute both iterated integrals ∫01 ⁣ ⁣∫01xy dx dy\int_0^1\!\!\int_0^1 xy\,dx\,dy and ∫01 ⁣ ⁣∫01xy dy dx\int_0^1\!\!\int_0^1 xy\,dy\,dx directly and show each equals 14\frac14.

∫01 ⁣ ⁣∫01xy dx dy=∫01y2 dy=14=∫01 ⁣ ⁣∫01xy dy dx\int_0^1\!\!\int_0^1 xy\,dx\,dy = \int_0^1 \frac{y}{2}\,dy = \frac{1}{4} = \int_0^1\!\!\int_0^1 xy\,dy\,dx
Separable f=xyf = xy, N=32N = 32: ∫R=∫C=14\int R = \int C = \frac14 (the midpoint rule is exact here).
Show proof
  1. Inner integral first: for fixed yy, ∫01xy dx=y∫01x dx=y⋅12\int_0^1 xy\,dx = y\int_0^1 x\,dx = y \cdot \frac12. The outer integral is ∫01y2 dy=12⋅12=14\int_0^1 \frac{y}{2}\,dy = \frac12 \cdot \frac12 = \frac14.
  2. Reversing the order: for fixed xx, ∫01xy dy=x⋅12\int_0^1 xy\,dy = x \cdot \frac12, and ∫01x2 dx=14\int_0^1 \frac{x}{2}\,dx = \frac14. Both orders give 14\frac14 — because the product splits: ∬xy=(∫01x dx)(∫01y dy)\iint xy = (\int_0^1 x\,dx)(\int_0^1 y\,dy).
  3. Since f≥0f \ge 0, Tonelli's theorem guarantees the value is order-independent — the direct computation above verifies the theorem on this concrete function. Every step is complete.

Consider f(x,y)=x2−y2(x2+y2)2f(x, y) = \dfrac{x^2-y^2}{(x^2+y^2)^2} (on (0,1)2(0,1)^2). Using that swapping xx and yy flips the sign of ff, prove rigorously that the two iterated integrals are negatives of each other, and show by direct computation that they are π4\frac{\pi}{4} and −π4-\frac{\pi}{4} — so Fubini's theorem fails.

f(y,x)=−f(x,y)  ⇒  ∫01 ⁣ ⁣∫01f dy dx=−∫01 ⁣ ⁣∫01f dx dyf(y,x) = -f(x,y) \;\Rightarrow\; \int_0^1\!\!\int_0^1 f\,dy\,dx = -\int_0^1\!\!\int_0^1 f\,dx\,dy
∫01 ⁣ ⁣∫01f dy dx=π4≠−π4=∫01 ⁣ ⁣∫01f dx dy\int_0^1\!\!\int_0^1 f\,dy\,dx = \frac{\pi}{4} \ne -\frac{\pi}{4} = \int_0^1\!\!\int_0^1 f\,dx\,dy
The scene only covers f≥0f \ge 0 (where the two orders always agree); this problem is the signed contrast case.
Show proof
  1. Symmetry (the rigorous part): f(y,x)=y2−x2(y2+x2)2=−x2−y2(x2+y2)2=−f(x,y)f(y, x) = \dfrac{y^2-x^2}{(y^2+x^2)^2} = -\dfrac{x^2-y^2}{(x^2+y^2)^2} = -f(x, y). Write the iterated integrals as I1=∫01 ⁣ ⁣∫01f(x,y) dy dxI_1 = \int_0^1\!\!\int_0^1 f(x,y)\,dy\,dx and I2=∫01 ⁣ ⁣∫01f(x,y) dx dyI_2 = \int_0^1\!\!\int_0^1 f(x,y)\,dx\,dy. Renaming the dummy variables x↔yx \leftrightarrow y in I2I_2 gives I2=∫01 ⁣ ⁣∫01f(y,x) dy dx=−∫01 ⁣ ⁣∫01f(x,y) dy dx=−I1I_2 = \int_0^1\!\!\int_0^1 f(y,x)\,dy\,dx = -\int_0^1\!\!\int_0^1 f(x,y)\,dy\,dx = -I_1. So the two iterated integrals are exact negatives of each other — proved with no computation.
  2. Computational step (recorded at idea level): for x>0x > 0, ∂∂y[yx2+y2]=x2−y2(x2+y2)2=f(x,y)\frac{\partial}{\partial y}\left[\frac{y}{x^2+y^2}\right] = \frac{x^2-y^2}{(x^2+y^2)^2} = f(x,y), so the inner integral is ∫01f(x,y) dy=[yx2+y2]01=11+x2\int_0^1 f(x,y)\,dy = \left[\frac{y}{x^2+y^2}\right]_0^1 = \frac{1}{1+x^2}. The outer integral is ∫01dx1+x2=arctan⁡1=π4\int_0^1 \frac{dx}{1+x^2} = \arctan 1 = \frac{\pi}{4} — hence I1=π4I_1 = \frac{\pi}{4} and I2=−π4I_2 = -\frac{\pi}{4}. (At x=0x = 0 the inner integral is improper since f(0,y)=−1/y2f(0,y) = -1/y^2; rather than justifying the singularity at the origin line by line, we record the whole evaluation as the computational step.)
  3. Since π4≠−π4\frac{\pi}{4} \ne -\frac{\pi}{4}, Fubini's conclusion fails. By contrapositive, ff is not integrable over (0,1)2(0,1)^2 (∫∣f∣=∞\int |f| = \infty) — without the integrability hypothesis, signed mass cancels differently depending on the order. The sign-flip symmetry is proved rigorously; the π/4\pi/4 evaluation is recorded as the computational step.

For a simple function f≥0f \ge 0, prove both iterated integrals equal the double sum ∑ak m(Ek)\sum a_k\,m(E_k) (with no integrability hypothesis), and extend to general f≥0f \ge 0 by monotone approximation.

∫ ⁣ ⁣∫∑kak1Ek=∑kak m(Ek)(either order)\int\!\!\int \sum_{k} a_k \mathbf{1}_{E_k} = \sum_{k} a_k\,m(E_k) \quad \text{(either order)}
Tent ff, N=32N = 32: ∫R≈∫C≈827≈0.2963\int R \approx \int C \approx \frac{8}{27} \approx 0.2963 — both orders converge to the exact value.
Show proof
  1. First, the indicator of a rectangle R=A×BR = A \times B (measurable sets, possibly of infinite measure): the inner integral ∫1R(x,y) dx=m(A) 1B(y)\int \mathbf{1}_R(x, y)\,dx = m(A)\,\mathbf{1}_B(y), and the outer gives ∫m(A) 1B(y) dy=m(A) m(B)\int m(A)\,\mathbf{1}_B(y)\,dy = m(A)\,m(B). Reversing the order, ∫1R(x,y) dy=m(B) 1A(x)\int \mathbf{1}_R(x, y)\,dy = m(B)\,\mathbf{1}_A(x) followed by m(B) m(A)m(B)\,m(A) — the same.
  2. For a simple function f=∑k=1mak 1Ekf = \sum_{k=1}^{m} a_k\,\mathbf{1}_{E_k} (ak≥0a_k \ge 0, the EkE_k disjoint measurable), linearity of the integral in each variable makes both iterated integrals equal ∑k=1mak m(Ek)\sum_{k=1}^{m} a_k\,m(E_k) — a single double sum, independent of order. No integrability hypothesis is needed: every term is ≥0\ge 0, so nothing can cancel.
  3. For general f≥0f \ge 0, take simple sj↑fs_j \uparrow f (the standard construction). For each fixed yy, MCT in xx gives ∫sj(x,y) dx↑∫f(x,y) dx\int s_j(x, y)\,dx \uparrow \int f(x, y)\,dx; these are an increasing sequence of simple functions of yy, so one more MCT in yy makes both iterated integrals equal lim⁡j∑ak(j)m(Ek(j))=∬f\lim_j \sum a^{(j)}_k m(E^{(j)}_k) = \iint f. This is why Tonelli's theorem needs no integrability hypothesis for f≥0f \ge 0 — every step is complete.

10. Integration