Fubini–Tonelli Theorem

Iterated integrals agree in either order. Sum the rows first or the columns first, the total is the same.

For nonnegative functions this is always safe. For integrable functions it is safe too. Without integrability, the two orders can split apart.

For example, count 🍎 apples packed in a grid inside a πŸ“¦ box: counting by rows or by columns gives the same total.

∬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. The function f(x,y)=xyf(x,y) = xy is continuous on [0,1]2[0,1]^2, hence measurable, and fβ‰₯0f \ge 0, so all hypotheses of Tonelli's theorem are satisfied and 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. An antiderivative in yy for x>0x > 0: βˆ‚βˆ‚y[yx2+y2]=(x2+y2)βˆ’y(2y)(x2+y2)2=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) - y(2y)}{(x^2+y^2)^2} = \frac{x^2-y^2}{(x^2+y^2)^2} = f(x,y). Hence the inner integral ∫01f(x,y) dy=[yx2+y2]01=11+x2βˆ’0=11+x2\int_0^1 f(x,y)\,dy = \left[\frac{y}{x^2+y^2}\right]_0^1 = \frac{1}{1+x^2} - 0 = \frac{1}{1+x^2}.

    ∫01f(x,y) dy=[yx2+y2]01=11+x2(x>0)\int_0^1 f(x,y)\,dy = \left[\frac{y}{x^2+y^2}\right]_0^1 = \frac{1}{1+x^2} \qquad (x > 0)
  3. At x=0x = 0, f(0,y)=βˆ’y2y4=βˆ’1y2f(0,y) = \frac{-y^2}{y^4} = -\frac{1}{y^2}, so the inner integral is improper: ∫Ρ1βˆ’1y2 dy=[1y]Ξ΅1=1βˆ’1Ξ΅β†’βˆ’βˆž\int_\varepsilon^1 -\frac{1}{y^2}\,dy = \left[\frac{1}{y}\right]_\varepsilon^1 = 1 - \frac{1}{\varepsilon} \to -\infty (Ξ΅β†’0+\varepsilon \to 0^+). This happens only at the single point x=0x = 0; the singleton {0}\{0\} has Lebesgue measure zero, so when the outer integral is read as a Lebesgue integral the inner integral only needs to exist for almost every xx, and divergence at one point does not affect it: ∫01dx1+x2=[arctan⁑x]01=Ο€4\int_0^1 \frac{dx}{1+x^2} = [\arctan x]_0^1 = \frac{\pi}{4}, hence I1=Ο€4I_1 = \frac{\pi}{4}.

    ∫Ρ1βˆ’1y2 dy=1βˆ’1Ξ΅β†’βˆ’βˆž(Ξ΅β†’0+)\int_\varepsilon^1 -\frac{1}{y^2}\,dy = 1 - \frac{1}{\varepsilon} \to -\infty \qquad (\varepsilon \to 0^+)
  4. Reversing the order, an antiderivative in xx is βˆ‚βˆ‚x[βˆ’xx2+y2]=βˆ’(x2+y2)+x(2x)(x2+y2)2=x2βˆ’y2(x2+y2)2=f(x,y)\frac{\partial}{\partial x}\left[-\frac{x}{x^2+y^2}\right] = \frac{-(x^2+y^2) + x(2x)}{(x^2+y^2)^2} = \frac{x^2-y^2}{(x^2+y^2)^2} = f(x,y).

    For y>0y > 0, ∫01f(x,y) dx=[βˆ’xx2+y2]01=βˆ’11+y2\int_0^1 f(x,y)\,dx = \left[-\frac{x}{x^2+y^2}\right]_0^1 = -\frac{1}{1+y^2}; at y=0y = 0, f(x,0)=1x2f(x,0) = \frac{1}{x^2}, so ∫Ρ1dxx2=[βˆ’1x]Ξ΅1=βˆ’1+1Ξ΅β†’+∞\int_\varepsilon^1 \frac{dx}{x^2} = \left[-\frac{1}{x}\right]_\varepsilon^1 = -1 + \frac{1}{\varepsilon} \to +\infty β€” again a one-point singularity.

    The outer integral is ∫01βˆ’dy1+y2=βˆ’Ο€4\int_0^1 -\frac{dy}{1+y^2} = -\frac{\pi}{4}, so I2=βˆ’Ο€4I_2 = -\frac{\pi}{4}.

    ∫01f(x,y) dx=[βˆ’xx2+y2]01=βˆ’11+y2(y>0)\int_0^1 f(x,y)\,dx = \left[-\frac{x}{x^2+y^2}\right]_0^1 = -\frac{1}{1+y^2} \qquad (y > 0)
  5. Since Ο€4β‰ βˆ’Ο€4\frac{\pi}{4} \ne -\frac{\pi}{4}, Fubini's conclusion fails. Before invoking the contrapositive, verify measurability and almost-everywhere inner integrability: ff is continuous on (0,1]2(0,1]^2, hence measurable on [0,1]2[0,1]^2 (define ff arbitrarily at the single point (0,0)(0,0); a single point and the coordinate segments {x=0}\{x=0\}, {y=0}\{y=0\} have measure zero).

    As shown above, the inner integrals exist for every x>0x > 0 (resp. y>0y > 0), i.e. for almost every xx (resp. yy). Since ∣f∣|f| is measurable and β‰₯0\ge 0, Tonelli applied to ∣f∣|f| legitimately gives ∫∣f∣=∞\int |f| = \infty.

    Hence, 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 was proved with no computation, and the Ο€/4\pi/4 evaluation is fully justified via antiderivatives and improper integrals. Every step is complete.

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.

    Handle the degenerate case separately, with the measure-theoretic convention 0β‹…βˆž:=00 \cdot \infty := 0: if m(B)=0m(B) = 0 then AΓ—BA \times B is null regardless of AA, even if m(A)=∞m(A) = \infty, so both iterated integrals are 0=m(A) m(B)0 = m(A)\,m(B); the case m(A)=0m(A) = 0 is symmetric.

  2. For a simple function built from rectangles, s=βˆ‘p=1Pcp 1ApΓ—Bps = \sum_{p=1}^{P} c_p\,\mathbf{1}_{A_p \times B_p} (cpβ‰₯0c_p \ge 0, disjoint rectangles), sections are explicit and no lemma is needed: for fixed yy, ∫s(x,y) dx=βˆ‘pcp m(Ap) 1Bp(y)\int s(x,y)\,dx = \sum_p c_p\,m(A_p)\,\mathbf{1}_{B_p}(y) (previous step), a simple function of yy, so the outer integral is βˆ‘pcp m(Ap) m(Bp)\sum_p c_p\,m(A_p)\,m(B_p) β€” the same with the order reversed.

    βˆ«β€‰β£β€‰β£βˆ«βˆ‘pcp 1ApΓ—Bp=βˆ‘pcp m(Ap) m(Bp)(eitherΒ order)\int\!\!\int \sum_p c_p\,\mathbf{1}_{A_p \times B_p} = \sum_p c_p\,m(A_p)\,m(B_p) \quad \text{(either order)}
  3. Lemma (measurable sections): on a finite-measure product space (e.g. [0,1]2[0,1]^2), if EE is product-measurable then each section Ey={x:(x,y)∈E}E^y = \{x : (x,y) \in E\} is measurable, y↦m(Ey)y \mapsto m(E^y) is measurable, and ∫m(Ey) dy=m(E)\int m(E^y)\,dy = m(E) (same for xx-sections). Proof: first let A\mathcal{A} be the collection of finite disjoint unions of measurable rectangles; A\mathcal{A} is an algebra (closed under complements and finite unions) and generates the product Οƒ\sigma-algebra, Οƒ(A)\sigma(\mathcal{A}) being the product Οƒ\sigma-algebra.

    The family C\mathcal{C} of sets with this property contains every rectangle β€” for E=AΓ—BE = A \times B, Ey=AE^y = A (y∈By \in B) or βˆ…\varnothing, and m(Ey)=m(A) 1B(y)m(E^y) = m(A)\,\mathbf{1}_B(y) β€” and by finite additivity the section-measure identity holds on all of A\mathcal{A}, so AβŠ‚C\mathcal{A} \subset \mathcal{C}. Moreover C\mathcal{C} is a monotone class: if En↑EE_n \uparrow E then (En)y↑Ey(E_n)^y \uparrow E^y, so continuity of measure plus MCT gives ∫m((En)y) dy=m(En)↑m(E)=∫m(Ey) dy\int m((E_n)^y)\,dy = m(E_n) \uparrow m(E) = \int m(E^y)\,dy (decreasing sequences likewise, using finite measure).

    By the monotone class theorem, C\mathcal{C} contains Οƒ(A)\sigma(\mathcal{A}), so C\mathcal{C} is the whole product Οƒ\sigma-algebra.

  4. For a general 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 product-measurable): the section fy(x)=f(x,y)=βˆ‘kak 1(Ek)y(x)f^y(x) = f(x,y) = \sum_k a_k\,\mathbf{1}_{(E_k)^y}(x) is simple, so ∫fy dx=βˆ‘kak m((Ek)y)\int f^y\,dx = \sum_k a_k\,m((E_k)^y) β€” and by the lemma, yβ†¦βˆ«fy dxy \mapsto \int f^y\,dx is a sum of measurable functions, hence measurable.

    Integrating gives βˆ«β€‰β£β€‰β£βˆ«f dx dy=βˆ‘kak∫m((Ek)y) dy=βˆ‘k=1mak m(Ek)\int\!\!\int f\,dx\,dy = \sum_k a_k \int m((E_k)^y)\,dy = \sum_{k=1}^{m} a_k\,m(E_k) β€” a single double sum, independent of order.

    Every term is β‰₯0\ge 0, so nothing can cancel: no integrability hypothesis is needed.

  5. For general fβ‰₯0f \ge 0, take the standard simple sj↑fs_j \uparrow f (sj=βˆ‘kak(j) 1Ek(j)s_j = \sum_k a^{(j)}_k\,\mathbf{1}_{E^{(j)}_k}).

    For each fixed yy, MCT in xx gives ∫sjy dxβ†‘βˆ«fy dx\int s_j^y\,dx \uparrow \int f^y\,dx β€” and Ο†j(y)=∫sjy dx\varphi_j(y) = \int s_j^y\,dx is an increasing sequence of measurable functions by the previous step, so one more MCT in yy gives ∫yΟ†j dyβ†‘βˆ«y(∫xf dx)dy\int_y \varphi_j\,dy \uparrow \int_y(\int_x f\,dx)dy.

    But ∫yΟ†j dy=βˆ‘kak(j) m(Ek(j))=∬sjβ†‘βˆ¬f\int_y \varphi_j\,dy = \sum_k a^{(j)}_k\,m(E^{(j)}_k) = \iint s_j \uparrow \iint f (MCT for the product measure), so both iterated integrals equal ∬f\iint f. This is why Tonelli's theorem needs no integrability hypothesis for fβ‰₯0f \ge 0 β€” every step is complete.

11. Integration