Tutorials › Calculus III › Fubini’s Theorem for Continuous Functions

Double Integrals on Rectangles · Tutorial 510 of 999

Fubini’s Theorem for Continuous Functions

See why continuity on a rectangle guarantees that either order of iterated integration gives the double integral, and verify the result in worked examples.

Beginner 10 min read

What You'll Learn

  • State Fubini’s theorem for a continuous function on a closed rectangle
  • Interpret each order of iterated integration precisely
  • Understand how rectangular Riemann sums justify the theorem
  • Verify the theorem by computing both iterated integrals
  • Recognize why continuity and the rectangular domain matter

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.

$$ \int_a^b\left(\int_c^d f(x,y)\,dy\right)dx \qquad\text{and}\qquad \int_c^d\left(\int_a^b f(x,y)\,dx\right)dy $$
Theorem (Fubini for continuous functions on a rectangle): If \(f:R\to\mathbb{R}\) is continuous on the closed rectangle \(R=[a,b]\times[c,d]\), then both displayed iterated integrals exist and $$ \iint_R f(x,y)\,dA = \int_a^b\left(\int_c^d f(x,y)\,dy\right)dx = \int_c^d\left(\int_a^b f(x,y)\,dx\right)dy. $$

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

$$ S=\sum_i\sum_j f(x_i^*,y_j^*)\,\Delta x_i\,\Delta y_j. $$

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.

1
Partition the rectangle.
Subdivide each coordinate interval and select a tag in every small rectangle.
2
Use uniform continuity.
Make the partitions fine enough that function values within each small rectangle differ by less than a chosen \(\varepsilon\).
3
Compare with the common sum.
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:

$$ \begin{aligned} \int_0^1\left(\int_0^2(x+2y)\,dy\right)dx &=\int_0^1\left([xy+y^2]_0^2\right)dx\\ &=\int_0^1(2x+4)\,dx\\ &=[x^2+4x]_0^1\\ &=1+4=5. \end{aligned} $$

Now integrate with respect to \(x\) first:

$$ \begin{aligned} \int_0^2\left(\int_0^1(x+2y)\,dx\right)dy &=\int_0^2\left([x^2/2+2yx]_0^1\right)dy\\ &=\int_0^2(1/2+2y)\,dy\\ &=[y/2+y^2]_0^2\\ &=1+4=5. \end{aligned} $$

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

$$ \begin{aligned} \int_0^1\left(\int_1^2(x^2+y)\,dy\right)dx &=\int_0^1[x^2y+y^2/2]_1^2\,dx\\ &=\int_0^1\left(x^2+\frac{4-1}{2}\right)dx\\ &=\int_0^1(x^2+3/2)\,dx\\ &=[x^3/3+3x/2]_0^1\\ &=1/3+3/2=11/6. \end{aligned} $$

Integrating in \(x\) first gives

$$ \begin{aligned} \int_1^2\left(\int_0^1(x^2+y)\,dx\right)dy &=\int_1^2[x^3/3+yx]_0^1\,dy\\ &=\int_1^2(1/3+y)\,dy\\ &=[y/3+y^2/2]_1^2\\ &=(2/3+2)-(1/3+1/2)\\ &=8/3-5/6=11/6. \end{aligned} $$

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:

$$ \begin{aligned} \int_0^2\left(\int_0^1(x^2y+2x)\,dy\right)dx &=\int_0^2[x^2y^2/2+2xy]_0^1\,dx\\ &=\int_0^2(x^2/2+2x)\,dx\\ &=[x^3/6+x^2]_0^2\\ &=8/6+4=16/3. \end{aligned} $$

Now integrate with respect to \(x\) first:

$$ \begin{aligned} \int_0^1\left(\int_0^2(x^2y+2x)\,dx\right)dy &=\int_0^1[ x^3y/3+x^2]_0^2\,dy\\ &=\int_0^1(8y/3+4)\,dy\\ &=[4y^2/3+4y]_0^1\\ &=4/3+4=16/3. \end{aligned} $$

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

$$ \int_0^2(x+2y)\,dy \overset{\text{incorrect}}{=} \int_0^2 2y\,dy =4. $$

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

$$ \int_0^2(x+2y)\,dy =[xy+y^2]_0^2 =2x+4. $$

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.

  1. State the domain and continuity assumptions in Fubini’s theorem for continuous functions on a rectangle.
  2. In \(\int_a^b(\int_c^d f(x,y)\,dy)dx\), which variable is held fixed in the inner integral?
  3. Why do the two orders of iterated integration approach the same rectangular Riemann sum?
  4. 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\)?
  5. Does the theorem stated here guarantee equality for every discontinuous function on a rectangle? Explain briefly.