Fubini's Theorem
Suppose you want to compute the volume under the surface over a rectangle. You have two natural strategies. First, slice the solid with planes perpendicular to the -axis. Integrate each slice's area, then add the slices up. Alternatively, do the same with planes perpendicular to the -axis. Do these two computations always agree? Do they always equal the "true" double integral, defined directly as a limit of Riemann sums over the rectangle? This question is not a formality. The answer requires proof. That proof is exactly what makes double integrals computable in practice. Fubini's Theorem, in the continuous setting treated here, applies to a continuous function on a rectangle. It says the double integral can be evaluated by iterating two single-variable integrals. Either order gives the same result. This single fact bridges two things. On one side is the abstract definition of a multiple integral, built from Riemann sums over a two-dimensional partition. On the other is the concrete machinery of one-variable calculus you already know: antiderivatives, the Fundamental Theorem of Calculus, substitution. Without this theorem, multivariable calculus would be a subject of existence proofs with no computational teeth. With it, every double or triple integral of a continuous function reduces to a chain of ordinary integrals. These can be computed symbolically or numerically, one variable at a time. This theorem also justifies swapping the order of integration. That move is used constantly to simplify a hard integral into an easy one. It also helps make sense of integrals over regions with complicated boundaries, once you generalize beyond rectangles. This article proves the continuous rectangular case in full. It builds the geometric picture of slicing, and works two asymmetric examples. It also shows exactly what breaks (and why) when continuity is dropped. It sets up the natural next steps: Integrals over General Regions and the Change of Variables and the Jacobian formula for transforming multiple integrals.
- Fubini's Theorem (continuous, rectangular case): for continuous on a rectangle , the double integral equals either iterated integral.
- It converts a 2-D limit-of-Riemann-sums object into two ordinary 1-D integrals done in sequence.
- The proof rests on uniform continuity of on the compact rectangle , which forces the "slice function" to be continuous in .
- Order of integration can be swapped freely for continuous — this is the practical payoff used in every computation.
- Continuity is not just convenient — the counterexample shows a bounded, discontinuous for which the two iterated integrals disagree.
- Generalizes to triple integrals over boxes, and (with more care) to integrals over general bounded regions.
- Key idea: slicing a solid one way or the other and integrating the slice-areas gives the same volume, because continuity lets you interchange a limit with an integral.
Where this lives today
Fubini's Theorem is the computational backbone of every multivariable calculus computation of area, volume, mass, center of mass, and moment of inertia via double or triple integrals — anywhere a physical quantity is built from an integrand over a two- or three-dimensional region. In probability and statistics, the Lebesgue version of Fubini's Theorem justifies computing expectations of functions of independent random variables by iterated integration, and underlies the derivation of convolution formulas for sums of independent random variables. In Fourier analysis and PDE theory, swapping the order of integration (justified by Fubini/Tonelli) is a routine step in deriving convolution theorems, Green's function representations, and solving heat and wave equations via integral transforms. In numerical analysis and computer graphics, Fubini's Theorem underlies "separable" numerical quadrature schemes that approximate a double integral by nested one-dimensional quadrature rules, and it justifies rendering algorithms (ray marching, volumetric integration) that accumulate light contributions slice by slice. In cryptography and computational geometry, volume and probability computations over high-dimensional boxes routinely reduce dimension-by-dimension using the same iterated-integral principle, now packaged in the more general measure-theoretic Fubini–Tonelli framework that extends this rectangle case to the far broader settings needed there.
:::quiz[The counterexample on shows that:]
- Fubini's Theorem is false even for continuous functions
- The iterated integrals can disagree ( vs ) when continuity fails at a point due to unboundedness ✓
- Iterated integrals are always independent of order regardless of continuity
- The double integral always exists whenever both iterated integrals do
:::quiz[Which step of the proof crucially uses compactness of ?]
- Deriving uniform continuity of from (pointwise) continuity, via the Heine–Borel theorem ✓
- Defining the iterated integral notation
- Choosing which variable to integrate first
- Concluding that is a polynomial
:::quiz[Example 2 in the article computed over . Integrating first gave a clean closed form because:]
- was treated as the variable of integration throughout
- Fixing turns into a simple exponential in whose antiderivative w.r.t. is directly ✓
- The integrand was independent of
- Integration by parts was unavoidable in both orders
:::faq[Can Fubini's Theorem be applied to an unbounded rectangle, like ?] Not directly — the proof given here relies essentially on compactness of (to get uniform continuity and existence of the double integral via Darboux sums), which fails for an unbounded region. Improper double integrals over unbounded regions require a separate justification, typically via the Lebesgue-theoretic Fubini–Tonelli Theorem, which handles -finite measure spaces and unbounded domains, provided an absolute-integrability condition holds. Naively swapping integration order on an unbounded domain without checking this condition is a common source of paradoxical "proofs" that using divergent integrals.
Ask the tutor: How does the argument change if is continuous on an open rectangle but only bounded (not continuous) on its boundary?
Let be a closed rectangle and let be a bounded function. Recall from Multiple Integrals over Rectangles that the double integral is defined as the limit of Riemann sums over partitions of into subrectangles, when this limit exists (equivalently, when upper and lower Darboux sums converge to the same value); in that case is called (Riemann) integrable on . For each fixed , suppose the single-variable function is integrable on , and define
The iterated integral of over , integrating first, is
written more compactly as . The iterated integral in the other order, , is defined symmetrically.
Fubini's Theorem asserts that when is continuous on , all three quantities — the double integral and both iterated integrals — exist and are equal.
Intuition
Picture the graph of over as a solid roof sitting above the rectangular floor , and imagine computing the volume trapped between the floor and the roof. One way to find this volume is to slice the solid with a plane for each fixed . Each slice is a two-dimensional region in the plane , bounded above by the curve ; its area is exactly . Stacking up these slice-areas as ranges over — literally integrating — should recover the total volume, by the same "area of cross-section, integrated" principle used to compute volumes of revolution in single-variable calculus. The subtlety is that this is a claim, not a definition: the double integral was already defined directly, as a two-dimensional limit of Riemann sums, with no reference to slicing at all. Fubini's Theorem is the statement that this direct definition secretly agrees with the slicing computation, and moreover that it does not matter which axis you slice along first. The engine that makes this true is uniform continuity: on the compact rectangle , a continuous cannot oscillate wildly on very fine subrectangles, so refining a 2-D partition and computing 1-D slice integrals lead to the same limiting number.
:::svg[Slicing the solid two ways over ]
Central theorem
Let with , , and let be continuous on . Then: 1. is (Riemann) integrable on , so exists. 2. For every , the function is continuous on , hence integrable, so
is well-defined for all ; moreover is continuous on , hence exists. 4. Symmetrically, is well-defined and continuous on . 5. All three integrals coincide:
We use the following proof technique: establish integrability of on from uniform continuity (a compactness argument), then show the iterated integral matches the double integral by squeezing both between the same upper and lower Darboux sums.
Step 1: is integrable on . Since is closed and bounded in , it is compact (Heine–Borel). A continuous function on a compact set is uniformly continuous (this is the standard uniform continuity theorem, proved independently of Fubini's Theorem and not relying on it). So given , there is such that for all ,
Take any partition of into subrectangles (, ) with mesh (the maximum diagonal length of any ) less than . On each , compactness of and continuity of give a maximum and minimum of on (extreme value theorem), attained at some points . Since (both lie in , whose diagonal is ),
Hence the upper and lower Darboux sums satisfy
Since was arbitrary and is a fixed constant, the Riemann criterion for integrability is satisfied: for every we can choose and find a partition with . Therefore is integrable on , and exists, equal to the common value .
Step 2: is well-defined and continuous on . Fix . The map is continuous on (restriction of a continuous function of two variables to a fixed value of one variable is continuous — composing , itself continuous, with ). A continuous function on the compact interval is Riemann integrable, so is well defined for every . For continuity of : fix . By uniform continuity of on , choose so that implies . In particular if then for every , , so . Then
So is (uniformly) continuous on , hence Riemann integrable there, and exists. The argument for is identical with the roles of exchanged.
Step 3: The iterated integral equals the double integral. Let . By Step 1's uniform continuity argument, choose a partition of (with subintervals of and of ) fine enough that
On each subrectangle , let
Fix . For any and any , we have . Integrating this inequality over (with fixed) gives
Summing over and using additivity of the integral over adjacent intervals,
This holds for every in , so in particular
Multiply by and sum over :
The left and right ends are exactly and . The middle terms are and , the lower and upper Darboux sums of the single-variable function with respect to the partition of . So we have shown
Since is integrable on (Step 2), lies between and as well:
Also lies between and by definition of the double integral. Therefore both and lie in the interval , whose length is . Hence
As was arbitrary, the two quantities are equal:
The identical argument with the roles of and interchanged (partitioning first, bounding between analogous Darboux sums) gives
Combining the two displayed equalities proves all three quantities in the theorem are equal.
∎Worked examples
Example 1 — a genuinely asymmetric integrand. Compute where , using both orders of integration and checking they agree. The integrand is a polynomial-plus-cosine, hence continuous on , so continuous on the compact rectangle . Fubini's Theorem applies. Order 1: integrate first, then .
(Using , .) Now integrate over :
Order 2: integrate first, then .
Now integrate over :
Both orders give , confirming Fubini's Theorem and, incidentally, illustrating that neither order was obviously "easier" here — both required exactly one polynomial and one trigonometric antiderivative.
Example 2 — using order-swap to simplify a hard integral. Compute where . Here is continuous (product and composition of continuous functions), so Fubini applies and both orders must agree — but they are not equally easy to execute, which is the real lesson. Attempt order 1: integrate first. We'd need for fixed . This requires integration by parts (treating as a constant): with , so , (for ):
This is correct but messy, and we'd still need to integrate this expression over (with a removable singularity to handle carefully at ) — doable, but painful. Order 2: integrate first. For fixed , treat as constant:
If , substitute , :
(Check via direct antidifferentiation in : , so — no division by ever needed, and the formula manifestly also gives the correct value at since .) So
Numerically, . This is dramatically cleaner than order 1. Fubini's Theorem is what licenses choosing the easier order 2 — without it, there would be no guarantee that computing " first" answers the same question as the double integral originally posed. (One can verify the messier order-1 computation gives the same numeric answer after integrating from to , but this is exactly the computation Fubini lets us avoid.)
Consider and the bounded function
This is continuous at every point of except the origin, where it is discontinuous (indeed unbounded near the origin along most paths, though we can still ask about the iterated integrals as improper/pointwise limits — the point of this example is the classical asymmetric-kernel phenomenon). To keep things elementary and fully rigorous with an actually bounded function, we use the standard sharper example built from a difference of bumps. Let for be a continuous "tent" function on supported on , with , , and (a triangular spike of height at the midpoint, base , so that its area is ). Define on :
More concretely and standardly, define on the square by: partition into intervals for . On the square , let alternating in sign so that while for each , and set off the union of these squares (and at the origin). Such is bounded (each block is bounded, and blocks shrink to so no single value blows up), but is discontinuous at the origin: along the sequence of block-centers takes values bouncing between roughly and that do not converge to , so does not exist. For this , direct computation block-by-block gives
The clean, standard instance of this phenomenon (found in Rudin's Principles of Mathematical Analysis and many other texts) uses instead the simple rational function on :
extended by . One computes directly, for fixed ,
using the antiderivative identity (verify by the quotient rule: , confirmed). Then
By the antisymmetry (visible directly from the formula: swapping negates the numerator, leaves the denominator fixed), the same computation with roles swapped gives
So the two iterated integrals are and — they disagree, and in fact the double integral does not even exist in this case (the double limit fails to converge, since is unbounded near the origin — every neighborhood of contains points where is arbitrarily large, e.g. along , ). This is precisely the failure of hypothesis (continuity, which here fails at the single point due to unboundedness) that Fubini's Theorem requires: drop continuity, and not only can the iterated integrals fail to match each other, the very double integral they were supposed to compute may cease to exist at all.
Scope, edge cases & common traps
| Situation | What happens |
|---|---|
| continuous on closed rectangle | Fubini applies exactly as stated: double integral = either iterated integral. |
| bounded, integrable, but discontinuous on a "small" (measure-zero) set | A more general Fubini–Tonelli-type theorem (Lebesgue framework) still guarantees agreement of the iterated integrals with the double integral, for almost every slice; this is a genuinely stronger theorem beyond the Riemann/continuous setting treated here. |
| bounded but discontinuous on a "large" set, or unbounded near a point | Iterated integrals may exist separately yet disagree (see counterexample), or the double integral may fail to exist altogether. |
| Region is not a rectangle (e.g. a disk, triangle) | Iterated integrals still work but the limits of integration become functions of the other variable; this is the subject of Integrals over General Regions. |
| Triple (or higher) integrals over a box | The same theorem holds verbatim for continuous , with any of the orders of iterated single integrals agreeing; proof is a direct induction on the two-variable case. |
The mathematician behind it
Origins · 1 minGuido Fubini and how this was discovered
Guido Fubini was an Italian mathematician working chiefly at the University of Turin, contributing broadly to real analysis, differential geometry (including the "Fubini–Study metric" used in complex projective geometry and later in quantum information theory), and mathematical physics. His 1907 theorem on interchange of order of integration, proved in the more general Lebesgue-measure setting, became one of the most quoted results in all of analysis because of its sheer everyday utility. Fubini was forced from his position in Italy in 1938 by the Fascist racial laws targeting Jewish academics, and he emigrated to the United States, joining the Institute for Advanced Study and later teaching at New York University until his death in 1943.
Does Fubini's Theorem require the function to be positive?
No. The version proved here requires only that be continuous (hence bounded, since is compact) on the rectangle ; it may take negative values freely. Positivity becomes relevant in the more general Lebesgue-theoretic setting, where Tonelli's Theorem handles non-negative measurable functions (allowing infinite integrals) without requiring absolute integrability, while the full Fubini's Theorem for signed or complex measurable functions requires . In the continuous-function-on-a-compact-rectangle setting of this article, boundedness and hence absolute integrability come for free from continuity plus compactness, so no extra positivity or integrability hypothesis is needed.
Why does the proof bound the iterated integral between and instead of directly comparing Riemann sums?
Working with the Darboux upper and lower sums (built from suprema and infima of on each subrectangle) avoids having to track the behavior of arbitrary sample points inside each subrectangle, which is exactly the extra freedom that ordinary Riemann sums allow and that would complicate the argument. By sandwiching both the iterated integral's value and the double integral's value inside the same shrinking interval , the proof shows their difference is smaller than any , forcing equality. This squeeze technique is standard whenever one needs to show two limiting quantities coincide without directly manipulating limits.
Is it true that if the two iterated integrals of some function agree, the function is automatically well-behaved enough for Fubini to apply?
No — this converse is false and is exactly the trap discussed in the warning box. It is possible to construct bounded, badly discontinuous functions where both iterated integrals exist and even happen to be numerically equal, yet the underlying double integral fails to exist because the two-dimensional Riemann sums do not converge. Agreement of iterated integrals is a necessary consequence of continuity (or suitable integrability), not a sufficient replacement for it. Always verify a genuine hypothesis on over the whole rectangle — continuity, or an appropriate integrability/measurability condition — before invoking any interchange-of-order argument.
Does Fubini's Theorem extend to triple integrals and higher dimensions?
Yes, and the extension is essentially by induction on dimension using the two-variable case proved here as the base step. For continuous on a box , one first treats the box as where , applies the two-variable theorem to peel off the -integral, and then applies it again inside to separate and ; continuity of the relevant "slice" functions at each stage follows from the same uniform continuity argument used above. The conclusion is that any of the possible orders of iterating three single-variable integrals over a continuous integrand on a box give the same value, matching the triple integral. This is exactly the tool needed once you study volumes, mass, and moments over three-dimensional regions.
How does Fubini's Theorem relate to swapping order of integration when the region is not a rectangle, like a triangle or disk?
On a non-rectangular region, the limits of the inner integral become functions of the outer variable rather than fixed constants — for instance integrating over a triangle gives , and swapping order requires rewriting the same region as to get . The underlying justification is still a Fubini-type theorem, now stated for general bounded regions with continuous or piecewise-continuous boundary functions; this is developed fully under Integrals over General Regions, building directly on the rectangular case proved here.
Why is uniform continuity, rather than plain pointwise continuity, the key ingredient in the proof?
Plain continuity at each point only guarantees that doesn't jump near that specific point, with a that may depend on which point you're at. The proof needs a single that works uniformly across the entire rectangle , so that a partition fine enough (mesh ) controls the oscillation of on every subrectangle simultaneously — this is what makes small in one shot. The Heine–Borel compactness of is precisely what upgrades pointwise continuity to uniform continuity, which is why the hypothesis " continuous on the closed, bounded rectangle " (not an open or unbounded region) is essential to the argument.