Unit 5, chapter 21

Change the order, reveal the missing factor

How reversing the order of integration over a triangular region, with new bounds read from a sketch and justified by Fubini's theorem, supplies the missing factor that a substitution needs.

  • Chapter 21
  • Double integrals and the order of integration

The iterated integral

I=∫01∫x1ey2 dy dxI = \int_0^1 \int_x^1 e^{y^2}\,dy\,dx

is the volume of a solid over a triangle, under a roof whose height ey2e^{y^2} stays between 11 and ee, so it is a perfectly finite number. Yet its inner integral stalls at once, because ey2e^{y^2} has no elementary antiderivative. This lesson reads the same triangle with horizontal strips instead of vertical ones, explains why Fubini’s theorem allows the switch, and shows how the new order supplies the factor yy that a substitution needs, which gives the exact value I=e−12I = \tfrac{e - 1}{2}.

Key terms

Triangular region

Definition A triangular region is a closed triangle in the plane, made of three noncollinear vertices, the three sides joining them and the points inside. A triangle is convex, so every vertical line that meets it does so in a single segment or point, and so does every horizontal line. It can therefore be described in either order, by a≤x≤ba \le x \le b and g1(x)≤y≤g2(x)g_1(x) \le y \le g_2(x), or by c≤y≤dc \le y \le d and h1(y)≤x≤h2(y)h_1(y) \le x \le h_2(y). The boundary functions are continuous, and each one follows a single side or two sides that meet at a vertex.

In plain words A triangle is the simplest region that is not a rectangle. The range of one variable depends on the other, and which sides bound a strip depends on the direction of the strip.

Example The inequalities 0≤x≤y≤10 \le x \le y \le 1 describe the triangle TT with vertices (0,0)(0, 0), (0,1)(0, 1) and (1,1)(1, 1), the half of the unit square on or above the diagonal y=xy = x. A vertical strip at a given xx runs from the diagonal y=xy = x up to the top side y=1y = 1. A horizontal strip at a given yy runs from the left side x=0x = 0 to the diagonal x=yx = y. A test point settles which half of the square is meant. The point (14,12)(\tfrac14, \tfrac12) satisfies 0≤14≤12≤10 \le \tfrac14 \le \tfrac12 \le 1 and lies in TT, while (12,14)(\tfrac12, \tfrac14) has y<xy < x and does not. Both readings give the area 12\tfrac12,

∫01(1−x) dx=12,∫01y dy=12.\begin{aligned} \int_0^1 (1 - x)\,dx &= \frac12, \\[0.4em] \int_0^1 y\,dy &= \frac12. \end{aligned}

Bounds read from a sketch

Definition To find the limits of an iterated integral over a region DD in the other order, work from a picture of DD rather than from the old limits alone.

  1. Write DD as inequalities. The outer limits are constants, and the inner limits are functions of the outer variable.
  2. Sketch the boundary curves, shade DD and confirm the shading with a test point.
  3. Draw a typical strip in the new inner direction. The curves where it enters and leaves DD, solved for the new inner variable, give the new inner limits.
  4. Take the smallest and largest values of the new outer variable on DD as the new outer limits.
  5. If the entering or leaving curve changes partway along, split the outer range at that value and add the pieces.

In plain words The limits are a description of the region, so a new order needs a new description of the same region. The picture is what guarantees that the region has not changed.

Example Take ∫01∫y2−yf(x,y) dx dy\int_0^1 \int_y^{2 - y} f(x, y)\,dx\,dy for a continuous ff. The limits say 0≤y≤10 \le y \le 1 and y≤x≤2−yy \le x \le 2 - y, so the region is the triangle with vertices (0,0)(0, 0), (2,0)(2, 0) and (1,1)(1, 1). A vertical strip always starts on the bottom side y=0y = 0, but it ends on the line y=xy = x when x≤1x \le 1 and on the line y=2−xy = 2 - x when x≥1x \ge 1. So the order dy dxdy\,dx splits at x=1x = 1 into

∫01∫0xf dy dx+∫12∫02−xf dy dx.\begin{aligned} &\int_0^1 \int_0^x f\,dy\,dx \\[0.4em] &\quad + \int_1^2 \int_0^{2 - x} f\,dy\,dx. \end{aligned}

With f=1f = 1 the single integral is ∫01(2−2y) dy=1\int_0^1 (2 - 2y)\,dy = 1 and the two pieces give 12+12=1\tfrac12 + \tfrac12 = 1, the area of the triangle. One region can need one integral in one order and two in the other.

Fubini’s theorem

Definition Let DD be the set of points with a≤x≤ba \le x \le b and g1(x)≤y≤g2(x)g_1(x) \le y \le g_2(x), where g1g_1 and g2g_2 are continuous on [a,b][a, b] and g1≤g2g_1 \le g_2, and let ff be continuous on DD. Then

∬Df dA=∫ab∫g1(x)g2(x)f(x,y) dy dx.\begin{aligned} &\iint_D f\,dA \\[0.4em] &= \int_a^b \int_{g_1(x)}^{g_2(x)} f(x, y)\,dy\,dx. \end{aligned}

The same holds with the roles of xx and yy exchanged, for a region given by c≤y≤dc \le y \le d and h1(y)≤x≤h2(y)h_1(y) \le x \le h_2(y) with continuous h1≤h2h_1 \le h_2, in the order dx dydx\,dy. So when ff is continuous on a region that can be described both ways, the two iterated integrals are equal. Here the double integral over DD means the double integral, over a rectangle containing DD, of the function equal to ff on DD and to 00 outside DD. For an improper integral, where ff or DD is unbounded, the condition is absolute integrability, a finite double integral of ∣f∣\lvert f \rvert. Without it the two orders can give different values.

In plain words For a continuous integrand on such a bounded region, adding the same columns in either order gives the same total, so you may choose whichever order is easier to compute. The theorem is about the same region described two ways, never about swapping symbols while keeping the limits.

Example On the triangle 0≤x≤y≤10 \le x \le y \le 1, the integrand ey2e^{y^2} is continuous and lies between 11 and ee. The triangle is described by g1(x)=xg_1(x) = x and g2(x)=1g_2(x) = 1 for 0≤x≤10 \le x \le 1, and by h1(y)=0h_1(y) = 0 and h2(y)=yh_2(y) = y for 0≤y≤10 \le y \le 1, all continuous. So the two iterated integrals of ey2e^{y^2} over it are equal. The condition matters for improper integrals. On the square of points with 0<x≤10 < x \le 1 and 0<y≤10 < y \le 1, take

f(x,y)=x−y(x+y)3.f(x, y) = \frac{x - y}{(x + y)^3}.

Since ff is the yy derivative of y(x+y)2\frac{y}{(x + y)^2}, the inner integral in yy is 1(1+x)2\frac{1}{(1 + x)^2}, and the order dy dxdy\,dx gives 12\tfrac12. Exchanging xx and yy changes the sign of ff, so the order dx dydx\,dy gives −12-\tfrac12. The theorem does not apply, because ff is unbounded near the origin and the double integral of ∣f∣\lvert f \rvert is infinite.

Reversing the order of integration

Definition Reversing the order of integration rewrites an iterated integral over a region DD as an iterated integral over the same DD in the other order,

∫ab∫g1(x)g2(x)f dy dx=∫cd∫h1(y)h2(y)f dx dy.\begin{aligned} &\int_a^b \int_{g_1(x)}^{g_2(x)} f\,dy\,dx \\[0.4em] &\quad = \int_c^d \int_{h_1(y)}^{h_2(y)} f\,dx\,dy. \end{aligned}

The integrand stays the same, while the differentials and all four limits change. The new limits come from a sketch of DD. The equality holds under the conditions of Fubini’s theorem, for example when ff is continuous on a bounded region DD described both ways by continuous boundary functions. If the new order needs a split, the right side becomes a sum of such integrals.

In plain words Same region, same integrand, different slicing. The reason to do it is that an inner integral that is hard in one direction can be easy in the other.

Example In the integral

I=∫01∫x1ey2 dy dx,I = \int_0^1 \int_x^1 e^{y^2}\,dy\,dx,

the limits 0≤x≤10 \le x \le 1 and x≤y≤1x \le y \le 1 describe the triangle 0≤x≤y≤10 \le x \le y \le 1. A horizontal strip at height yy runs from x=0x = 0 to x=yx = y, and yy runs from 00 to 11. The integrand is continuous on the closed triangle, so Fubini’s theorem gives

I=∫01∫0yey2 dx dy=∫01yey2 dy.\begin{aligned} I &= \int_0^1 \int_0^y e^{y^2}\,dx\,dy \\[0.4em] &= \int_0^1 y e^{y^2}\,dy. \end{aligned}

The new inner integral is easy because ey2e^{y^2} does not change as xx moves along the strip, so it equals ey2e^{y^2} times the strip length yy. The substitution u=y2u = y^2, with du=2y dydu = 2y\,dy and new limits u=0u = 0 and u=1u = 1, finishes the work,

I=12∫01eu du=e−12≈0.859.\begin{aligned} I &= \frac12 \int_0^1 e^u\,du \\[0.4em] &= \frac{e - 1}{2} \approx 0.859. \end{aligned}

The size is sensible. The triangle has area 12\tfrac12 and the height lies between 11 and ee, so II must lie between 12\tfrac12 and e2≈1.359\tfrac{e}{2} \approx 1.359.

Missing factor for substitution

Definition The substitution rule says that if gg is continuously differentiable on [a,b][a, b] and hh is continuous on the interval of values that gg takes there, then

∫abh(g(y)) g′(y) dy=∫g(a)g(b)h(u) du.\begin{aligned} &\int_a^b h(g(y))\,g'(y)\,dy \\[0.4em] &\quad = \int_{g(a)}^{g(b)} h(u)\,du. \end{aligned}

The factor g′(y)g'(y) beside the composite h(g(y))h(g(y)) is what the rule needs. A factor that differs from g′(y)g'(y) by a nonzero constant can be adjusted by multiplying and dividing by that constant, but a missing factor that depends on yy cannot be supplied by algebra. In a double integral, an inner integral in xx of a function φ(y)\varphi(y) over h1(y)≤x≤h2(y)h_1(y) \le x \le h_2(y) equals (h2(y)−h1(y))φ(y)\bigl(h_2(y) - h_1(y)\bigr)\varphi(y), the strip length times φ(y)\varphi(y). When that strip length is a constant multiple of g′(y)g'(y), the outer integral is ready for a substitution.

In plain words Substitution needs the derivative of the inside function as a factor, so ey2e^{y^2} needs a yy next to it. A missing constant is easy to repair, but a missing yy cannot be created by rearranging. In the triangle, the horizontal strip at height yy has length yy, and reversing the order puts exactly that factor into the integrand.

Example In ∫01yey2 dy\int_0^1 y e^{y^2}\,dy the inside function is y2y^2, whose derivative 2y2y is twice the factor present. With u=y2u = y^2 and du=2y dydu = 2y\,dy, the factor becomes y dy=12 duy\,dy = \tfrac12\,du, the limits y=0y = 0 and y=1y = 1 become u=0u = 0 and u=1u = 1, and the integral is 12∫01eu du=e−12\tfrac12 \int_0^1 e^u\,du = \tfrac{e - 1}{2}. The limits happen to keep their values, but they are still the new limits for uu. Without the factor, the same substitution in ∫01ey2 dy\int_0^1 e^{y^2}\,dy needs dy=du2udy = \frac{du}{2\sqrt{u}} and leads to

∫01eu2u du,\int_0^1 \frac{e^u}{2\sqrt{u}}\,du,

an improper integral that has no elementary antiderivative either. Its value, about 1.46271.4627, comes from numerical methods or a power series, not from an antiderivative formula.

Check yourself

  1. Reverse the order of integration in
∫02∫x/21f(x,y) dy dx\int_0^2 \int_{x/2}^1 f(x, y)\,dy\,dx

for a continuous ff, and check the new limits by computing the area of the region in both orders.

Show the answer

The limits say 0≤x≤20 \le x \le 2 and x2≤y≤1\tfrac{x}{2} \le y \le 1. The region is the triangle with vertices (0,0)(0, 0), (0,1)(0, 1) and (2,1)(2, 1), above the line y=x2y = \tfrac{x}{2} and below the line y=1y = 1. The test point (12,12)(\tfrac12, \tfrac12) satisfies 14≤12≤1\tfrac14 \le \tfrac12 \le 1, so it lies inside. A horizontal strip at height yy runs from the yy axis to the line x=2yx = 2y, and yy runs from 00 to 11, so the reversed integral is

∫01∫02yf(x,y) dx dy.\int_0^1 \int_0^{2y} f(x, y)\,dx\,dy.

With f=1f = 1 the two orders give ∫02(1−x2) dx=1\int_0^2 (1 - \tfrac{x}{2})\,dx = 1 and ∫012y dy=1\int_0^1 2y\,dy = 1. Swapping only the differentials, as in ∫01∫x/21f dx dy\int_0^1 \int_{x/2}^1 f\,dx\,dy, would not even make sense, because the inner limits would contain xx, the very variable being integrated.

  1. Evaluate
∫01∫x1ey3 dy dx.\int_0^1 \int_{\sqrt{x}}^1 e^{y^3}\,dy\,dx.
Show the answer

The function ey3e^{y^3} has no elementary antiderivative, so reverse the order. The limits say 0≤x≤10 \le x \le 1 and x≤y≤1\sqrt{x} \le y \le 1. For nonnegative xx and yy the condition x≤y\sqrt{x} \le y is the same as x≤y2x \le y^2, so the region is bounded by the yy axis, the line y=1y = 1 and the curve x=y2x = y^2, and it is also described by 0≤y≤10 \le y \le 1 and 0≤x≤y20 \le x \le y^2. The integrand is continuous on this closed bounded region, so Fubini’s theorem allows the switch,

∫01∫0y2ey3 dx dy=∫01y2ey3 dy.\begin{aligned} &\int_0^1 \int_0^{y^2} e^{y^3}\,dx\,dy \\[0.4em] &\quad = \int_0^1 y^2 e^{y^3}\,dy. \end{aligned}

The strip length y2y^2 is one third of the derivative 3y23y^2 of the exponent. With u=y3u = y^3, du=3y2 dydu = 3y^2\,dy and new limits u=0u = 0 and u=1u = 1, the value is

13∫01eu du=e−13≈0.573.\begin{aligned} \frac13 \int_0^1 e^u\,du &= \frac{e - 1}{3} \\[0.4em] &\approx 0.573. \end{aligned}

As a check, the region has area ∫01y2 dy=13\int_0^1 y^2\,dy = \tfrac13 and the height lies between 11 and ee, so the value must lie between 13\tfrac13 and e3\tfrac{e}{3}, and it does.

  1. Evaluate the integral below. The formula sin⁡yy\frac{\sin y}{y} is undefined at y=0y = 0, so explain why reversing the order is still allowed.
∫0π∫xπsin⁡yy dy dx\int_0^\pi \int_x^\pi \frac{\sin y}{y}\,dy\,dx
Show the answer

The region is the triangle 0≤x≤y≤π0 \le x \le y \le \pi, and its only point with y=0y = 0 is the origin. Since sin⁡yy→1\frac{\sin y}{y} \to 1 as y→0y \to 0, giving the integrand the value 11 at y=0y = 0 makes it continuous on the closed triangle, and a value at a single point does not change any of the integrals involved. So Fubini’s theorem applies. A horizontal strip at height yy runs from x=0x = 0 to x=yx = y, and

∫0π∫0ysin⁡yy dx dy=∫0πsin⁡y dy=2.\begin{aligned} &\int_0^\pi \int_0^y \frac{\sin y}{y}\,dx\,dy \\[0.4em] &\quad = \int_0^\pi \sin y\,dy = 2. \end{aligned}

The strip length yy cancels the denominator. In the original order the inner integral would need an antiderivative of sin⁡yy\frac{\sin y}{y}, and there is no elementary one.

How this lesson connects