Why the Order of Integration Matters
A double integral accumulates the values of a function over a region. On a rectangle, that accumulation can be organized in two natural ways: first integrate along one coordinate direction, then integrate along the other, or do those steps in the opposite order.
Fubini’s theorem for continuous functions says these two procedures agree with the double integral. The continuity assumption is important: it provides the regularity that lets rectangular sums approximate the function reliably in both directions.
The Rectangle and the Iterated Integrals
Let \(a<b\) and \(c<d\), and let \(R=[a,b]\times[c,d]\). A function \(f:R\to\mathbb{R}\) assigns a real number \(f(x,y)\) to each point \((x,y)\) in the rectangle. If \(f\) is continuous on \(R\), then its double integral over \(R\) exists.
For each fixed \(x\), the expression \(\int_c^d f(x,y)\,dy\) integrates with respect to \(y\), treating \(x\) as a constant. The result depends on \(x\), so it can then be integrated from \(a\) to \(b\). This gives one iterated integral. The other first integrates with respect to \(x\), treating \(y\) as fixed.
The theorem applies to every continuous real-valued function on a closed rectangle. It does not say that every function, regardless of its behavior, can be integrated in either order. Here continuity supplies the needed guarantee.
Why the Theorem Works
The double integral is defined through rectangular Riemann sums. Divide \([a,b]\) into intervals of widths \(\Delta x_i\) and \([c,d]\) into intervals of widths \(\Delta y_j\). Choose a sample point \((x_i^*,y_j^*)\) in each resulting small rectangle. The associated sum is
As the largest side lengths of the small rectangles tend to zero, these sums approach \(\iint_R f(x,y)\,dA\). The key fact behind Fubini’s theorem is that the same sums can be grouped in either direction: summing first over the \(y\)-intervals or first over the \(x\)-intervals does not change their value.
Here is a precise approximation argument. A continuous function on a closed, bounded rectangle is uniformly continuous. Consequently, given \(\varepsilon>0\), the partition can be made fine enough that the values of \(f\) at any two points in the same small rectangle differ by less than \(\varepsilon\).
For each fixed \(x\), the inner integral in \(y\) is approximated by the tagged sum \(\sum_j f(x,y_j^*)\Delta y_j\). Its error is at most \(\varepsilon(d-c)\): on each \(y\)-interval, the integrand differs from its tagged value by less than \(\varepsilon\), and the interval lengths add to \(d-c\). Integrating this error bound over \(x\in[a,b]\) gives an error at most \(\varepsilon(b-a)(d-c)\).
Next, integrate the tagged expression over \(x\). On each \(x\)-interval, uniform continuity ensures that replacing each \(f(x,y_j^*)\) by its value at the chosen tag \(x_i^*\) creates an error whose total is at most \(\varepsilon(b-a)(d-c)\). The resulting expression is exactly \(S\). Thus the first iterated integral differs from \(S\) by at most \(2\varepsilon(b-a)(d-c)\). The same argument, starting with the \(x\)-integrals instead, gives the same bound for the other order.
Because \(\varepsilon\) can be made arbitrarily small, both iterated integrals approach the limit of the rectangular sums defining the double integral. This proves the asserted equality.
Subdivide each coordinate interval and select a tag in every small rectangle.
Make the partitions fine enough that function values within each small rectangle differ by less than a chosen \(\varepsilon\).
Approximating either iterated integral gives the same rectangular sum, with an error that tends to zero as \(\varepsilon\) tends to zero.
Worked Examples
Worked Example: A Linear Function
Evaluate both iterated integrals for \(f(x,y)=x+2y\) on \(R=[0,1]\times[0,2]\). The function is continuous, so Fubini’s theorem applies.
First integrate with respect to \(y\), holding \(x\) fixed:
Now integrate with respect to \(x\) first:
Both orders give \(5\), as the theorem predicts. The antiderivatives also check directly: differentiating \(xy+y^2\) with respect to \(y\) gives \(x+2y\), and differentiating \(x^2/2+2yx\) with respect to \(x\) gives \(x+2y\).
Worked Example: A Polynomial on a Shifted Rectangle
Let \(f(x,y)=x^2+y\) on \(R=[0,1]\times[1,2]\). This polynomial is continuous throughout the rectangle.
Integrating in \(y\) first gives
Integrating in \(x\) first gives
The values agree. For a direct check, differentiating \(x^2y+y^2/2\) with respect to \(y\) gives \(x^2+y\); differentiating \(x^3/3+yx\) with respect to \(x\) gives \(x^2+y\).
Worked Example: A Mixed Polynomial
Consider \(f(x,y)=x^2y+2x\) on \(R=[0,2]\times[0,1]\). Again, continuity ensures the theorem applies.
Integrate with respect to \(y\) first:
Now integrate with respect to \(x\) first:
Both computations produce \(16/3\). The antiderivatives check because their derivatives with respect to the integration variables recover \(x^2y+2x\).
A Common Pitfall: Treating a Fixed Variable as Zero
In an inner integral, the variable not being integrated is held fixed; it is not set equal to zero. For example, in the first worked example, \(x\) is fixed while integrating \(x+2y\) with respect to \(y\). A mistaken calculation might discard the \(x\)-term and write
This loses the contribution of \(x\). The correct antiderivative with respect to \(y\) is \(xy+y^2\), because \(x\) is a constant in that integration. Therefore
The subsequent \(x\)-integration then gives \(\int_0^1(2x+4)\,dx=5\), not \(4\). Keeping track of which variable is active is essential when using either iterated integral.
What the Theorem Provides
Fubini’s theorem connects the double integral defined by rectangular sums to ordinary one-variable integration performed twice. Its equality is more than a computational convenience: it says that either direction of accumulation represents the same total over the rectangle, provided the function is continuous there.
The hypotheses should remain visible. The domain here is a closed rectangle, and the function is continuous on it. The theorem just proved makes no general claim about discontinuous functions or regions that are not rectangles. Those situations require additional conditions or results.
Check Your Understanding
Use the theorem and its assumptions to answer these questions.
- State the domain and continuity assumptions in Fubini’s theorem for continuous functions on a rectangle.
- In \(\int_a^b(\int_c^d f(x,y)\,dy)dx\), which variable is held fixed in the inner integral?
- Why do the two orders of iterated integration approach the same rectangular Riemann sum?
- For \(f(x,y)=x+2y\) on \([0,1]\times[0,2]\), what is the inner integral with respect to \(y\), as a function of \(x\)?
- Does the theorem stated here guarantee equality for every discontinuous function on a rectangle? Explain briefly.