Changing order of integration is not always feasible

Suppose you need to calculate the double integral ∫∫Df(x,y)dA for some function f(x,y) and the region D shown below.

PIC

To calculate the double integral, you can write it as an iterated integral. For example, let’s say that in the region D, the lowest value of y is a and the highest value of y is b. In other words, the range of y in the region D is a y b.

For a given value of y, the range of x in D depends on the value of y. However, the region is nice enough so that the range of x for any y is just a simple interval. We could define two functions h1(y) and to h2(y) so that this interval in x is [h1(y),h2(y)] for each value of y. This description of the region D is shown in the following picture.

PIC

Since the region D is defined by

a y b,
h1(y) x h2(y),
we can represent double integral of f(x,y) over D as the following iterated integral,
∫∫Df(x,y)dA = ab( ∫  h2(y)         )
         f(x,y )dx
    h1(y)dy.

However, we would run into trouble if we tried to change the order of integration. The difficulty is that the range of y for some values of x is not a simple interval. For example, for the value of x given by the vertical dashed line below, the range of y is two different intervals.

PIC

Since we cannot always write the range of y as a single interval [g1(x),g2(x)], we cannot write the integral ∫∫Df(x,y)dA as a single iterated integral of the form

∫∫Df(x,y)dA = cd( ∫  g2(x)         )
         f(x,y)dy
    g1(x)dx.
If we really wanted to integrate with respect to y first, we’d have to break the region D into pieces and compute separate integrals for each piece. We’ll leave that procedure to your imagination.