Tutorials › Calculus III › Reversing Integration Order on a Rectangle

Double Integrals on Rectangles · Tutorial 512 of 999

Reversing Integration Order on a Rectangle

Rewrite a rectangular iterated integral in the opposite order without changing its region or value, and evaluate the result carefully.

Beginner 10 min read

What You'll Learn

  • Identify which coordinate each pair of limits describes.
  • Rewrite an iterated integral over a rectangle with the order reversed.
  • State the continuity condition that allows the two orders to agree.
  • Evaluate the original and reversed integrals step by step.
  • Detect a common error in transferring bounds between coordinates.

Why Reverse the Order?

In a double integral over a rectangle, one iterated integral accumulates in one coordinate first and the other coordinate second. Reversing the order changes that sequence of calculations. It does not change the rectangle, the function being integrated, or the value of the integral, provided the function satisfies the required conditions.

The practical task is to keep track of which limits belong to which coordinate. If \(x\) ranges from \(a\) to \(b\), and \(y\) ranges from \(c\) to \(d\), then reversing the order means that \(x\) is integrated first over \([a,b]\), while \(y\) is integrated afterward over \([c,d]\). The limits do not switch coordinates just because the differentials switch positions.

Key idea: For a continuous function on a rectangle, reversing the order of integration keeps each coordinate's original limits and leaves the value unchanged.

Rectangular Bounds and the Reversal Rule

Let \(a\le b\) and \(c\le d\). The rectangle is the set of points \((x,y)\) for which \(a\le x\le b\) and \(c\le y\le d\). In an iterated integral, the inner integral is evaluated first. Thus, in \(\int_a^b\int_c^d f(x,y)\,dy\,dx\), the inner limits \(c\) and \(d\) bound \(y\), and the outer limits \(a\) and \(b\) bound \(x\).

$$ R=[a,b]\times[c,d] =\{(x,y):a\le x\le b,\ c\le y\le d\}. $$

To reverse the order, integrate with respect to \(x\) first, using its original limits, and then with respect to \(y\), using its original limits. The integrand remains \(f(x,y)\).

Theorem: If \(f\) is continuous on the closed rectangle \(R=[a,b]\times[c,d]\), then
$$ \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. $$

Continuity on the rectangle is a sufficient condition for this equality. The theorem is the rectangular case of Fubini’s theorem, covered in the earlier material on iterated integrals. The important point here is how the bounds correspond: the \(x\)-limits remain \(a\) and \(b\), and the \(y\)-limits remain \(c\) and \(d\).

Why the Reversal Rule Works

Both iterated integrals describe accumulation over the same set of points. The first expression visits the rectangle using vertical slices: for each fixed \(x\), it integrates through all \(y\)-values from \(c\) to \(d\), then accumulates those results as \(x\) runs from \(a\) to \(b\). The reversed expression uses horizontal slices: for each fixed \(y\), it integrates through all \(x\)-values from \(a\) to \(b\), then accumulates as \(y\) runs from \(c\) to \(d\). Every point of the same rectangle is included in either description.

1
Identify the rectangle.
The bounds specify all points satisfying \(a\le x\le b\) and \(c\le y\le d\).
2
Choose the first coordinate.
For the original order, \(y\) is integrated first. For the reversed order, \(x\) is integrated first.
3
Apply Fubini’s theorem.
Since \(f\) is continuous on the rectangle, either order gives the same double integral.

This also justifies the rule fully: the rectangle is unchanged, and the continuity hypothesis allows Fubini’s theorem to equate the two iterated integrals over it. The reversal is valid because it changes only the order of accumulation, not the region of accumulation.

Worked Example: A Linear Function on a Rectangle

Worked Example: A Linear Function on a Rectangle

Reverse the order and evaluate \(\int_0^2\int_1^3 (x+2y)\,dy\,dx\).

The limits \(0\) and \(2\) belong to \(x\); the limits \(1\) and \(3\) belong to \(y\). Reversing the order gives

$$ \int_1^3\int_0^2 (x+2y)\,dx\,dy. $$

First evaluate the original order. Integrating with respect to \(y\), while treating \(x\) as constant, gives

$$ \int_1^3(x+2y)\,dy = \left[xy+y^2\right]_1^3 = (3x+9)-(x+1) = 2x+8. $$

Now integrate with respect to \(x\):

$$ \int_0^2(2x+8)\,dx = \left[x^2+8x\right]_0^2 = (4+16)-0 = 20. $$

Check by evaluating the reversed order. Integrating with respect to \(x\) first gives

$$ \int_0^2(x+2y)\,dx = \left[\frac{x^2}{2}+2yx\right]_0^2 = (2+4y)-0 = 2+4y. $$

Then

$$ \int_1^3(2+4y)\,dy = \left[2y+2y^2\right]_1^3 = (6+18)-(2+2) = 20. $$

Both orders give \(20\), as required.

Worked Example: A Function with a Negative Coordinate Range

Worked Example: A Function with a Negative Coordinate Range

Reverse the order and evaluate \(\int_{-1}^1\int_0^2 (x^2+y)\,dy\,dx\).

Here \(x\) ranges from \(-1\) to \(1\), and \(y\) ranges from \(0\) to \(2\). Therefore the reversed integral is

$$ \int_0^2\int_{-1}^1(x^2+y)\,dx\,dy. $$

In the original order, integrate with respect to \(y\):

$$ \int_0^2(x^2+y)\,dy = \left[x^2y+\frac{y^2}{2}\right]_0^2 = (2x^2+2)-0 = 2x^2+2. $$

Then integrate with respect to \(x\):

$$ \int_{-1}^1(2x^2+2)\,dx = \left[\frac{2x^3}{3}+2x\right]_{-1}^1 = \left(\frac{2}{3}+2\right) - \left(-\frac{2}{3}-2\right) = \frac{16}{3}. $$

For the reversed order, integrate with respect to \(x\) first:

$$ \int_{-1}^1(x^2+y)\,dx = \left[\frac{x^3}{3}+yx\right]_{-1}^1 = \left(\frac{1}{3}+y\right) - \left(-\frac{1}{3}-y\right) = \frac{2}{3}+2y. $$

Now integrate with respect to \(y\):

$$ \int_0^2\left(\frac{2}{3}+2y\right)dy = \left[\frac{2y}{3}+y^2\right]_0^2 = \frac{4}{3}+4 = \frac{16}{3}. $$

The reversed calculation agrees with the original value.

Worked Example: A Mixed Term

Worked Example: A Mixed Term

Reverse the order and evaluate \(\int_1^3\int_{-1}^2 (xy+1)\,dy\,dx\).

The \(x\)-limits are \(1\) and \(3\), and the \(y\)-limits are \(-1\) and \(2\). Reversing the order gives

$$ \int_{-1}^2\int_1^3 (xy+1)\,dx\,dy. $$

In the original order, integrate with respect to \(y\), holding \(x\) fixed:

$$ \int_{-1}^2(xy+1)\,dy = \left[\frac{xy^2}{2}+y\right]_{-1}^2 = (2x+2)-\left(\frac{x}{2}-1\right) = \frac{3x}{2}+3. $$

Then integrate with respect to \(x\):

$$ \int_1^3\left(\frac{3x}{2}+3\right)dx = \left[\frac{3x^2}{4}+3x\right]_1^3 = \left(\frac{27}{4}+9\right) - \left(\frac{3}{4}+3\right) = \frac{63}{4}-\frac{15}{4} = 12. $$

For the reversed order, integrate with respect to \(x\) first:

$$ \int_1^3(xy+1)\,dx = \left[\frac{x^2y}{2}+x\right]_1^3 = \left(\frac{9y}{2}+3\right) - \left(\frac{y}{2}+1\right) = 4y+2. $$

Finally, integrate with respect to \(y\):

$$ \int_{-1}^2(4y+2)\,dy = \left[2y^2+2y\right]_{-1}^2 = (8+4)-(2-2) = 12. $$

The two evaluations match, confirming the reversed integral’s value.

A Common Mistake: Assigning Bounds to the Wrong Coordinate

When reversing the order, it is tempting to move the limits along with their positions in the written expression. That is incorrect: each pair of limits belongs to a coordinate, not merely to an inner or outer position.

For example, the integral \(\int_0^2\int_1^3(x+2y)\,dy\,dx\) has \(x\) between \(0\) and \(2\), and \(y\) between \(1\) and \(3\). A mistaken reversal might be written as \(\int_0^2\int_1^3(x+2y)\,dx\,dy\). In this expression, the inner limits \(1\) to \(3\) now apply to \(x\), and the outer limits \(0\) to \(2\) now apply to \(y\). That describes a different rectangle.

The incorrect integral evaluates to

$$ \int_0^2\left(\int_1^3(x+2y)\,dx\right)dy = \int_0^2(4+4y)\,dy = \left[4y+2y^2\right]_0^2 = 16, $$

rather than the correct value \(20\). The correct reversed form keeps the \(x\)-range \(0\) to \(2\) and the \(y\)-range \(1\) to \(3\): \(\int_1^3\int_0^2(x+2y)\,dx\,dy\).

Practical check: Before evaluating a reversed integral, write down the \(x\)-range and the \(y\)-range separately. Then place the \(x\)-range on the integral with \(dx\), and the \(y\)-range on the integral with \(dy\).

When This Rule Applies

The rectangular reversal rule applies as stated when the same fixed bounds describe a rectangle and the integrand is continuous there. It is not a rule for changing the region. In particular, it does not mean that arbitrary bounds can be swapped while leaving the limits untouched: the limits must still describe the same coordinate ranges.

Reversing order can be useful when one order produces simpler antiderivatives than the other. On a rectangle, however, the bounds remain constant in either order. The main decisions are which variable to integrate first and whether the resulting inner integral is easier to compute.

Check Your Understanding

For each question, identify the coordinate ranges before doing any integration.

  1. Write the order-reversed form of \(\int_2^5\int_{-1}^1 f(x,y)\,dy\,dx\).
  2. What condition in the rectangular reversal theorem ensures that the two iterated integrals agree?
  3. In \(\int_{-2}^0\int_3^4 f(x,y)\,dy\,dx\), which coordinate has range \([3,4]\)?
  4. Explain why changing only the differentials without tracking which limits belong to each coordinate can describe a different rectangle.
  5. If both orders are evaluated correctly for a continuous function on the same rectangle, what relationship must hold between their values?