Tutorials › Calculus III › Reversing Order To Simplify An Unevaluated Inner Integral

Integrals over General Regions · Tutorial 546 of 999

Reversing Order To Simplify An Unevaluated Inner Integral

Use the geometry of a region to replace an impractical inner integral with an equivalent iterated integral that is easier to evaluate.

Intermediate 9 min read

What You'll Learn

  • Identify the planar region described by nested integral bounds.
  • Find new bounds by describing the same region with slices in the opposite direction.
  • Recognize when reversing order can avoid an impractical inner antiderivative.
  • Apply order reversal to triangular and curved regions.
  • Check reversed bounds against boundary curves and sample slices.
  • Evaluate and verify the resulting integrals.

Why Reverse the Order?

An iterated integral can be difficult to evaluate in one order and straightforward in the other. This happens when the inner integral has no practical antiderivative, even though the integrand is continuous and the double integral is well-defined.

For example, \(e^{y^2}\) has no elementary antiderivative with respect to \(y\). That makes an integral such as \(\int e^{y^2}\,dy\) impractical for an elementary calculation. But if the region allows us to integrate first with respect to \(x\), then \(e^{y^2}\) is constant during that inner integration. Reversing the order can turn the difficult integral into a simple one.

Key idea: Reversing order does not change the region or the value of the double integral. It changes which variable is integrated first. The new order is useful when its inner integral is easier to evaluate.

What Reversing Order Requires

An iterated integral describes a region in the plane together with an order of slicing. For instance, bounds of the form \(a\le x\le b\), \(g(x)\le y\le h(x)\) describe vertical slices: \(x\) ranges over an interval, and for each fixed \(x\), \(y\) ranges between two boundaries. Reversing order means describing the same points with horizontal slices instead.

The bounds must describe exactly the same region after the change. A reliable method is to sketch the boundaries, mark their intersections, and determine the range of the outer variable and the endpoints of each slice. If the endpoints change along the region, the reversed integral may need to be split into pieces.

Theorem: If \(f\) is continuous on a bounded planar region \(D\) whose boundary is piecewise smooth, then an iterated integral of \(f\) over \(D\) can be evaluated in either order, using bounds that describe \(D\). In particular, for the same region, reversing the order preserves the value of the integral. The theorem applies to the integrals below because their integrands are continuous and their regions are bounded.

This result justifies changing the order, but it does not find the new bounds for us. Those come from the geometry of \(D\). The following examples show the full process.

Worked Example: A Triangular Region Below a Diagonal

Worked Example: Reverse the Order to Integrate \(e^{y^2}\)

Evaluate

$$ I=\int_0^1\int_x^1 e^{y^2}\,dy\,dx. $$

The inner integral is with respect to \(y\), and \(e^{y^2}\) has no elementary antiderivative in \(y\). First describe the region:

$$ 0\le x\le 1,\qquad x\le y\le 1. $$

The boundaries are \(x=0\), \(y=x\), and \(y=1\). These inequalities can also be written \(0\le x\le y\le1\). Thus \(y\) ranges from \(0\) to \(1\); for each fixed \(y\), \(x\) ranges from \(0\) to \(y\). The correct reversal is

$$ I=\int_0^1\int_0^y e^{y^2}\,dx\,dy. $$

At \(y=\tfrac12\), for example, the horizontal slice is \(0\le x\le\tfrac12\), consistent with these bounds. Now integrate with respect to \(x\), treating \(e^{y^2}\) as constant:

$$ \begin{aligned} I &=\int_0^1 \left[xe^{y^2}\right]_{x=0}^{x=y}\,dy\\ &=\int_0^1 ye^{y^2}\,dy. \end{aligned} $$

Set \(u=y^2\), so \(du=2y\,dy\). When \(y=0\), \(u=0\); when \(y=1\), \(u=1\). Therefore

$$ I=\frac12\int_0^1 e^u\,du =\frac12\left[e^u\right]_0^1 =\frac{e-1}{2}. $$

To check the final evaluation, \(\frac{d}{dy}\bigl(\frac12e^{y^2}\bigr)=ye^{y^2}\), and its endpoint difference from \(0\) to \(1\) is \(\frac{e-1}{2}\). The reversed bounds describe the original region because both express \(0\le x\le y\le1\).

Why the Reversal Works: A Derivation

For the triangular region in the example, the equality of the two orders can also be derived directly. This makes clear why integrating across horizontal slices gives the same result.

Define \(G(x)=\int_x^1 e^{y^2}\,dy\). This integral exists for every \(x\in[0,1]\), even though it does not have an elementary antiderivative. By the Fundamental Theorem of Calculus, \(G'(x)=-e^{x^2}\). The original integral is \(\int_0^1G(x)\,dx\). Integration by parts gives

$$ \begin{aligned} \int_0^1 G(x)\,dx &=\left[xG(x)\right]_0^1-\int_0^1 xG'(x)\,dx\\ &=0+\int_0^1 xe^{x^2}\,dx\\ &=\int_0^1\int_0^y e^{y^2}\,dx\,dy. \end{aligned} $$

For the first equality, use \(u=G(x)\) and \(dv=dx\). For the boundary term, \(G(1)=0\), and the factor \(x\) is zero at \(x=0\). In the last equality, integrating the constant \(e^{y^2}\) over \(0\le x\le y\) produces \(ye^{y^2}\), which is exactly the integrand of the preceding single integral. This proves the order reversal for this example and identifies the geometric width \(y\) of each horizontal slice.

Worked Example: A Curved Boundary

Worked Example: Reverse Bounds Along a Parabola

Evaluate

$$ J=\int_0^1\int_{\sqrt{x}}^1 e^{y^3}\,dy\,dx. $$

The integrand has no elementary antiderivative with respect to \(y\). The original bounds say \(0\le x\le1\) and \(\sqrt{x}\le y\le1\). Since both sides are nonnegative, \(\sqrt{x}\le y\) is equivalent to \(x\le y^2\). Thus the region is

$$ 0\le x\le y^2,\qquad 0\le y\le1. $$

Equivalently, \(y\) ranges from \(0\) to \(1\), and at each fixed \(y\), \(x\) ranges from \(0\) to \(y^2\). Reversing order gives

$$ J=\int_0^1\int_0^{y^2}e^{y^3}\,dx\,dy. $$

Integrate first with respect to \(x\):

$$ \begin{aligned} J &=\int_0^1 \left[xe^{y^3}\right]_{x=0}^{x=y^2}\,dy\\ &=\int_0^1 y^2e^{y^3}\,dy. \end{aligned} $$

Let \(u=y^3\), so \(du=3y^2\,dy\). The limits become \(u=0\) and \(u=1\), and therefore

$$ J=\frac13\int_0^1e^u\,du =\frac13\left[e^u\right]_0^1 =\frac{e-1}{3}. $$

The derivative of \(\frac13e^{y^3}\) is \(y^2e^{y^3}\), so the final antiderivative and endpoint calculation check. The curved boundary also checks: \(x=y^2\) is the same curve as \(y=\sqrt{x}\) on this region, where \(x\) and \(y\) are nonnegative.

Worked Example: Integrating First with Respect to \(y\)

Worked Example: Reverse a Type II Integral

Evaluate

$$ K=\int_0^2\int_{y/2}^1 e^{x^2}\,dx\,dy. $$

The inner integral with respect to \(x\) is impractical because \(e^{x^2}\) has no elementary antiderivative in \(x\). The bounds describe \(0\le y\le2\) and \(y/2\le x\le1\), or equivalently \(y\le2x\), with \(x\le1\). The region is bounded by \(y=0\), \(y=2x\), and \(x=1\).

For horizontal slices, \(y\) ranges from \(0\) to \(2\). To describe vertical slices, \(x\) ranges from \(0\) to \(1\); for each fixed \(x\), \(y\) ranges from \(0\) to \(2x\). The bounds meet correctly at \(x=1\), where \(2x=2\). Thus

$$ K=\int_0^1\int_0^{2x}e^{x^2}\,dy\,dx. $$

Since \(e^{x^2}\) is constant with respect to \(y\), evaluating the inner integral gives

$$ \begin{aligned} K &=\int_0^1 \left[ye^{x^2}\right]_{y=0}^{y=2x}\,dx\\ &=\int_0^1 2xe^{x^2}\,dx. \end{aligned} $$

Set \(u=x^2\), so \(du=2x\,dx\), with limits \(u=0\) and \(u=1\). Hence

$$ K=\int_0^1e^u\,du =\left[e^u\right]_0^1 =e-1. $$

Differentiating \(e^{x^2}\) gives \(2xe^{x^2}\), so the antiderivative in the last integration is correct. The reversed slice \(0\le y\le2x\) follows directly from the original condition \(y\le2x\), with \(x\le1\) ensuring the top of the region is at most \(2\).

A Common Mistake: Reversing the Inequality

A frequent error is to preserve the names of the boundary curves but put them in the wrong order. In the first example, the original bounds describe \(0\le x\le y\le1\). A mistaken reversal might use \(0\le y\le1\) and \(y\le x\le1\). Those bounds describe points on or above the diagonal \(x=y\), rather than the original region below it.

For instance, \((x,y)=(\tfrac14,\tfrac12)\) satisfies the original bounds because \(0\le\tfrac14\le\tfrac12\le1\). It does not satisfy the mistaken bounds, which require \(x\ge y\). The correct reversal is \(0\le y\le1\), \(0\le x\le y\); it describes exactly the original region \(0\le x\le y\le1\). At \(y=\tfrac12\), its horizontal slice is \(0\le x\le\tfrac12\).

A check using one interior point can expose a wrong reversal, but it cannot establish that the bounds are correct for the whole region. Check the boundary curves and the endpoints of representative slices as well. If the geometry does not match for every slice, the bounds need revision.

A Practical Order-Reversal Checklist

1
Write the inequalities.
Translate the nested bounds into conditions that a point \((x,y)\) in the region must satisfy.
2
Sketch the boundaries.
Mark their intersections and identify which side of each boundary is included.
3
Choose the new outer variable.
Find its full range by looking at the extent of the region in that direction.
4
Find the slice endpoints.
For each fixed value of the outer variable, determine the lower and upper boundary of the slice. Split the integral if those boundaries change.
5
Check before integrating.
Verify that the new inequalities describe the same region, then confirm that the new inner integral is actually easier.

When This Method Matters

Reversing order is useful when the original inner antiderivative is unavailable in elementary functions or is otherwise cumbersome, but integrating in the other direction produces an elementary inner integral. It is the geometry of the region that makes this possible: the integrand may depend on the variable left outside the inner integral, so integrating first across the slice simply multiplies by its width.

Reversal is not a promise that every double integral becomes elementary. A different order may still leave a difficult integral, and complicated boundaries may require splitting the region. The theorem permits changing the order under its hypotheses; it does not guarantee that the new calculation is simpler. Choose the order by considering both the integrand and the slice geometry.

Check Your Understanding

For each question, use the inequalities of the region as well as the integration bounds to justify your answer.

  1. What feature of an integrand can make reversing the order useful?
  2. For \(0\le x\le1\), \(x\le y\le1\), what are the bounds when the region is described using horizontal slices?
  3. For \(0\le x\le1\), \(\sqrt{x}\le y\le1\), what inequality relating \(x\) and \(y\) describes the curved boundary?
  4. In the integral \(\int_0^2\int_{y/2}^1 e^{x^2}\,dx\,dy\), why does the reversed inner integral become straightforward?
  5. How can checking a point inside the original region help detect incorrect reversed bounds?