Tutorials › Calculus III › Reversing Order When Horizontal Slices Split

Integrals over General Regions · Tutorial 535 of 999

Reversing Order When Horizontal Slices Split

Rewrite integrals by describing each horizontal slice as two separate intervals, then verify the new bounds and compare the resulting integrals.

Intermediate 9 min read

What You'll Learn

  • Identify when a horizontal slice meets a region in two separate intervals
  • Translate the original inequalities into two sets of reversed bounds
  • Write the reversed iterated integral as a sum of two integrals
  • Evaluate and check examples in both orders of integration
  • Avoid filling the gap between disconnected pieces of a horizontal slice

Why a Horizontal Slice May Split

A region can be easy to describe using vertical slices even when its horizontal slices have a gap. In that case, reversing the order of integration does not produce one continuous interval for the inner integral. Each horizontal slice must be written as two separate intervals, and the integral must include both pieces.

The key is to translate the region’s inequalities at a fixed height. For each value of \(y\), ask which \(x\)-values belong to the region. If they form a left interval and a right interval with a gap between them, integrate over each interval and add the results.

Definition: A horizontal slice of a planar region \(D\) at height \(y\) is the set of \(x\)-values for which \((x,y)\in D\). The slice is split into two intervals when this set consists of a left interval and a right interval separated by values of \(x\) that are not in \(D\).

From Vertical Bounds to Two Horizontal Intervals

Suppose a region is initially described by vertical slices: \(a\le x\le b\), with \(g(x)\le y\le h(x)\). To reverse the order, fix \(y\) and solve those inequalities for \(x\). If the resulting \(x\)-values form two intervals, denote their endpoints by \(L_1(y),R_1(y)\) and \(L_2(y),R_2(y)\), ordered from left to right. The reversed integral is then the sum of the integrals over those intervals.

$$ \iint_D f(x,y)\,dA = \int_c^d\int_{L_1(y)}^{R_1(y)}f(x,y)\,dx\,dy + \int_c^d\int_{L_2(y)}^{R_2(y)}f(x,y)\,dx\,dy. $$

Here \([c,d]\) is the range of heights attained in the region. The formula applies when the bounds describe \(D\) as stated and \(f\) is integrable there; in particular, it applies to a continuous \(f\) on a bounded region with these piecewise-smooth boundaries. The inner integrals use \(dx\) because \(x\) varies along a horizontal slice. The outer integrals use \(dy\) because the slices are then accumulated from bottom to top.

Worked Example: Reversing the Order for a Split Slice

Worked Example: Finding the Two Intervals

Describe the region \(D\) by \( -1\le x\le 1\) and \(0\le y\le x^2\). Reverse the order of integration for its area.

To find the heights in \(D\), note that \(y\ge 0\) and \(y\le x^2\le 1\). Thus \(0\le y\le 1\). Now fix one such \(y\). The condition \(y\le x^2\) is equivalent to \(x^2\ge y\), so \(|x|\ge\sqrt y\). Together with \(-1\le x\le1\), this gives two intervals:

$$ -1\le x\le-\sqrt y \qquad\text{or}\qquad \sqrt y\le x\le1. $$

Therefore, the reversed area integral is

$$ \int_0^1\int_{-1}^{-\sqrt y}1\,dx\,dy + \int_0^1\int_{\sqrt y}^{1}1\,dx\,dy. $$

The lengths of the two intervals are both \(1-\sqrt y\). Hence the area is

$$ \int_0^1\bigl((1-\sqrt y)+(1-\sqrt y)\bigr)\,dy = \int_0^1(2-2\sqrt y)\,dy = \left[2y-\frac{4}{3}y^{3/2}\right]_0^1 = 2-\frac43 = \frac23. $$

Check using the original vertical slices. The area is \(\int_{-1}^{1}\int_0^{x^2}1\,dy\,dx=\int_{-1}^{1}x^2\,dx=[x^3/3]_{-1}^{1}=1/3-(-1/3)=2/3\), agreeing with the reversed integral.

Why the Two Integrals Must Be Added

At a fixed height, the slice in the example is the union of a left interval and a right interval. These intervals do not overlap, so the one-dimensional integral over their union is the sum of the integrals over the two pieces. Applying this fact at each height gives the sum of the two iterated integrals.

Justification: If a horizontal slice at height \(y\) is \([L_1(y),R_1(y)]\cup[L_2(y),R_2(y)]\), with \(R_1(y)\le L_2(y)\), then additivity of the one-dimensional integral gives $$ \int_{\text{slice}} f(x,y)\,dx = \int_{L_1(y)}^{R_1(y)}f(x,y)\,dx + \int_{L_2(y)}^{R_2(y)}f(x,y)\,dx. $$ Integrating this equality over the full range of heights gives the two-term reversed integral. This is the slicing principle for iterated integrals: each slice contributes its integral, and the outer integral accumulates those contributions.

If the two intervals touch at an endpoint, that shared endpoint has no effect on the integral. A single point contributes zero to a one-dimensional integral, so adding the two interval integrals still counts the slice correctly.

Worked Example: Reversing and Evaluating a Double Integral

Worked Example: Integrating \(x^2+y\) Over the Region

Evaluate \(\int_{-1}^{1}\int_0^{x^2}(x^2+y)\,dy\,dx\) by reversing the order. The region is the same as in the previous example, so its horizontal slices are \([-1,-\sqrt y]\) and \([\sqrt y,1]\), for \(0\le y\le1\).

Write the integral as the sum over the two intervals:

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

An antiderivative with respect to \(x\) is \(x^3/3+yx\). On the right interval, its endpoint difference is

$$ \left(\frac13+y\right) - \left(\frac{y^{3/2}}{3}+y^{3/2}\right) = \frac13+y-\frac43y^{3/2}. $$

The integrand is even in \(x\), so the left interval gives the same value. The total is therefore

$$ 2\int_0^1\left(\frac13+y-\frac43y^{3/2}\right)\,dy = 2\left[\frac{y}{3}+\frac{y^2}{2}-\frac{8}{15}y^{5/2}\right]_0^1 = 2\left(\frac13+\frac12-\frac{8}{15}\right) = 2\left(\frac{9}{30}\right) = \frac35. $$

Check in the original order. First integrate with respect to \(y\):

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

Then integrate with respect to \(x\):

$$ \int_{-1}^{1}\frac32x^4\,dx = \frac32\left[\frac{x^5}{5}\right]_{-1}^{1} = \frac32\left(\frac15+\frac15\right) = \frac35. $$

Both orders give \(3/5\).

Worked Example: A Split Slice Around a Different Center

Worked Example: A Shifted Parabolic Boundary

Let \(D\) be described by \(0\le x\le2\) and \(0\le y\le(x-1)^2\). Reverse the order and evaluate the integral of \(f(x,y)=x\) over \(D\).

Because \(0\le x\le2\), the largest value of \((x-1)^2\) is \(1\), so \(0\le y\le1\). At fixed \(y\), the inequality \(y\le(x-1)^2\) implies \(|x-1|\ge\sqrt y\). With \(x\) restricted to \([0,2]\), this gives

$$ 0\le x\le1-\sqrt y \qquad\text{or}\qquad 1+\sqrt y\le x\le2. $$

Thus the reversed integral is

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

Integrating \(x\) over the first interval gives \(\frac12(1-\sqrt y)^2\). Over the second interval it gives \(2-\frac12(1+\sqrt y)^2\). Adding these expressions and simplifying,

$$ \frac12(1-2\sqrt y+y)+2-\frac12(1+2\sqrt y+y) = 2-2\sqrt y. $$

Therefore,

$$ \int_0^1(2-2\sqrt y)\,dy = \left[2y-\frac43y^{3/2}\right]_0^1 = 2-\frac43 = \frac23. $$

Check in the original order:

$$ \int_0^2\int_0^{(x-1)^2}x\,dy\,dx = \int_0^2x(x-1)^2\,dx = \int_0^2(x^3-2x^2+x)\,dx = \left[\frac{x^4}{4}-\frac{2x^3}{3}+\frac{x^2}{2}\right]_0^2 = 4-\frac{16}{3}+2 = \frac23. $$

The reversed and original integrals agree.

Common Mistake: Filling the Gap

A frequent error is to replace two intervals with one interval running from the leftmost endpoint to the rightmost endpoint. That includes points in the gap, which are not part of the region.

For the first region, at \(y=1/4\), the correct slice is \([-1,-1/2]\cup[1/2,1]\). The values between \(-1/2\) and \(1/2\) are excluded. The following calculation is wrong because it fills that gap:

$$ \int_0^1\int_{-1}^{1}1\,dx\,dy=2. $$

The correct area, using the two intervals, is \(2/3\), as computed above. The correction is to preserve the union of separate pieces in the reversed integral:

$$ \int_0^1\left(\int_{-1}^{-\sqrt y}1\,dx+\int_{\sqrt y}^{1}1\,dx\right)dy. $$

Before integrating, check a representative height: if there is a gap in the region at that height, the bounds must not include it.

A Practical Check Before Integrating

When reversing the order for a region with split horizontal slices, first determine the complete range of \(y\). Then solve the region’s inequalities for \(x\) while treating \(y\) as fixed. Write each resulting interval separately, from left to right, and make sure the intervals omit the gap. Finally, verify that the inner differential is \(dx\) and that the outer differential is \(dy\).

The essential point is not merely to exchange the symbols \(dx\) and \(dy\). Reversing order changes the geometric description of the region. When a horizontal slice has two pieces, its contribution is the sum over both pieces. Leaving either out loses part of the region; combining them into one interval may add points that were never in it.

Check Your Understanding

For each question, focus on the horizontal slices and keep any separated intervals distinct.

  1. For \( -2\le x\le2\) and \(0\le y\le x^2\), what are the two horizontal intervals at a fixed height \(y\)?
  2. Why does a split horizontal slice lead to a sum of two inner integrals?
  3. For \(0\le x\le2\) and \(0\le y\le(x-1)^2\), what is the range of \(y\) and what are the two \(x\)-intervals?
  4. What incorrect region is described by using just the interval from the leftmost to the rightmost endpoint of a split slice?
  5. In a reversed integral over horizontal slices, which variable is integrated first?