Paul's Online Notes
Paul's Online Notes
Home / Calculus III / Multiple Integrals / Iterated Integrals
Show Mobile Notice Show All Notes Hide All Notes
Mobile Notice
You appear to be on a device with a "narrow" screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best viewed in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (you should be able to scroll/swipe to see them) and some of the menu items will be cut off due to the narrow screen width.

Section 15.2 : Iterated Integrals

In the previous section we gave the definition of the double integral. However, just like with the definition of a single integral the definition is very difficult to use in practice and so we need to start looking into how we actually compute double integrals. We will continue to assume that we are integrating over the rectangle

\[R = \left[ {a,b} \right] \times \left[ {c,d} \right]\]

We will look at more general regions in the next section.

The following theorem tells us how to compute a double integral over a rectangle.

Fubini’s Theorem

If \(f\left( {x,y} \right)\) is continuous on \(R = \left[ {a,b} \right] \times \left[ {c,d} \right]\) then,

\[\iint\limits_{R}{{f\left( {x,y} \right)\,dA}} = \int_{{\,a}}^{{\,b}}{{\int_{{\,c}}^{{\,d}}{{f\left( {x,y} \right)\,dy}}\,dx}} = \int_{{\,c}}^{{\,d}}{{\int_{{\,a}}^{{\,b}}{{f\left( {x,y} \right)\,dx}}\,dy}}\]

These integrals are called iterated integrals.

Note that there are in fact two ways of computing a double integral over a rectangle and also notice that the inner differential matches up with the limits on the inner integral and similarly for the outer differential and limits. In other words, if the inner differential is \(dy\) then the limits on the inner integral must be \(y\) limits of integration and if the outer differential is \(dy\) then the limits on the outer integral must be \(y\) limits of integration.

Now, on some level this is just notation and doesn’t really tell us how to compute the double integral. Let’s just take the first possibility above and change the notation a little.

\[\iint\limits_{R}{{f\left( {x,y} \right)\,dA}} = \int_{{\,a}}^{{\,b}}{{\left[ {\int_{{\,c}}^{{\,d}}{{f\left( {x,y} \right)\,dy}}} \right]\,dx}}\]

We will compute the double integral by first computing

\[\int_{{\,c}}^{{\,d}}{{f\left( {x,y} \right)\,dy}}\]

and we compute this by holding \(x\) constant and integrating with respect to \(y\) as if this were a single integral. This will give a function involving only \(x\)’s which we can in turn integrate.

We’ve done a similar process with partial derivatives. To take the derivative of a function with respect to \(y\) we treated the \(x\)’s as constants and differentiated with respect to \(y\) as if it was a function of a single variable.

Double integrals work in the same manner. We think of all the \(x\)’s as constants and integrate with respect to \(y\) or we think of all \(y\)’s as constants and integrate with respect to \(x\).

Let’s take a look at some examples.

Example 1 Compute each of the following double integrals over the indicated rectangles.
  1. \( \displaystyle \iint\limits_{R}{{6x{y^2}\,dA}}\), \(R = \left[ {2,4} \right] \times \left[ {1,2} \right]\)
  2. \( \displaystyle \iint\limits_{R}{{2x - 4{y^3}\,dA}}\), \(R = \left[ { - 5,4} \right] \times \left[ {0,3} \right]\)
  3. \( \displaystyle \iint\limits_{R}{{{x^2}{y^2} + \cos \left( {\pi x} \right) + \sin \left( {\pi y} \right)\,dA}}\), \(R = \left[ { - 2, - 1} \right] \times \left[ {0,1} \right]\)
  4. \( \displaystyle \iint\limits_{R}{{\frac{1}{{{{\left( {2x + 3y} \right)}^2}}}\,dA}}\), \(R = \left[ {0,1} \right] \times \left[ {1,2} \right]\)
  5. \( \displaystyle \iint\limits_{R}{{x{{\bf{e}}^{xy}}\,dA}}\), \(R = \left[ { - 1,2} \right] \times \left[ {0,1} \right]\)
Show All Solutions Hide All Solutions
a \( \displaystyle \iint\limits_{R}{{6x{y^2}\,dA}}\), \(R = \left[ {2,4} \right] \times \left[ {1,2} \right]\) Show Solution

It doesn’t matter which variable we integrate with respect to first, we will get the same answer regardless of the order of integration. To prove that let’s work this one with each order to make sure that we do get the same answer.

Solution 1
In this case we will integrate with respect to \(y\) first. So, the iterated integral that we need to compute is,

\[\iint\limits_{R}{{6x{y^2}\,dA}} = \int_{{\,2}}^{{\,4}}{{\int_{{\,1}}^{{\,2}}{{6x{y^2}\,dy}}\,dx}}\]

When setting these up make sure the limits match up to the differentials. Since the \(dy\) is the inner differential (i.e. we are integrating with respect to \(y\) first) the inner integral needs to have \(y\) limits.

To compute this we will do the inner integral first and we typically keep the outer integral around as follows,

\[\begin{align*}\iint\limits_{R}{{6x{y^2}\,dA}} & = \int_{{\,2}}^{{\,4}}{{\left. {\left( {2x{y^3}} \right)} \right|_1^2\,dx}}\\ & = \int_{{\,2}}^{{\,4}}{{16x - 2x\,dx}}\\ & = \int_{{\,2}}^{{\,4}}{{14x\,dx}}\end{align*}\]

Remember that we treat the \(x\) as a constant when doing the first integral and we don’t do any integration with it yet. Now, we have a normal single integral so let’s finish the integral by computing this.

\[\iint\limits_{R}{{6x{y^2}\,dA}} = \left. {7{x^2}} \right|_2^4 = 84\]

Solution 2In this case we’ll integrate with respect to \(x\) first and then \(y\). Here is the work for this solution.

\[\begin{align*}\iint\limits_{R}{{6x{y^2}\,dA}} & = \int_{{\,1}}^{{\,2}}{{\int_{{\,2}}^{{\,4}}{{6x{y^2}\,dx}}\,dy}}\\ & = \int_{{\,1}}^{{\,2}}{{\left. {\left( {3{x^2}{y^2}} \right)} \right|_2^4\,dy}}\\ & = \int_{{\,1}}^{{\,2}}{{36{y^2}\,dy}}\\ & = \left. {12{y^3}} \right|_1^2\\ & = 84\end{align*}\]

Sure enough the same answer as the first solution.

So, remember that we can do the integration in any order.


b \( \displaystyle \iint\limits_{R}{{2x - 4{y^3}\,dA}}\), \(R = \left[ { - 5,4} \right] \times \left[ {0,3} \right]\) Show Solution

For this integral we’ll integrate with respect to \(y\) first.

\[\begin{align*}\iint\limits_{R}{{2x - 4{y^3}\,dA}} & = \int_{{\, - 5}}^{{\,4}}{{\int_{{\,0}}^{{\,3}}{{2x - 4{y^3}\,dy}}\,dx}}\\ & = \int_{{\, - 5}}^{{\,4}}{{\left. {\left( {2xy - {y^4}} \right)} \right|_0^3\,dx}}\\ & = \int_{{\, - 5}}^{{\,4}}{{6x - 81\,dx}}\\ & = \left. {\left( {3{x^2} - 81x} \right)} \right|_{ - 5}^4\\ & = - 756\end{align*}\]

Remember that when integrating with respect to \(y\) all \(x\)’s are treated as constants and so as far as the inner integral is concerned the 2\(x\) is a constant and we know that when we integrate constants with respect to \(y\) we just tack on a \(y\) and so we get \(2xy\) from the first term.


c \( \displaystyle \iint\limits_{R}{{{x^2}{y^2} + \cos \left( {\pi x} \right) + \sin \left( {\pi y} \right)\,dA}}\), \(R = \left[ { - 2, - 1} \right] \times \left[ {0,1} \right]\) Show Solution

In this case we’ll integrate with respect to \(x\) first.

\[\begin{align*}\iint\limits_{R}{{{x^2}{y^2} + \cos \left( {\pi x} \right) + \sin \left( {\pi y} \right)\,dA}} & = \int_{{\,0}}^{{\,1}}{{\int_{{\, - 2}}^{{\, - 1}}{{{x^2}{y^2} + \cos \left( {\pi x} \right) + \sin \left( {\pi y} \right)\,dx}}\,dy}}\\ & = \int_{{\,0}}^{{\,1}}{{\left. {\left( {\frac{1}{3}{x^3}{y^2} + \frac{1}{\pi }\sin \left( {\pi x} \right) + x\sin \left( {\pi y} \right)} \right)} \right|_{ - 2}^{ - 1}\,dy}}\\ & = \int_{{\,0}}^{{\,1}}{{\frac{7}{3}{y^2} + \sin \left( {\pi y} \right)\,dy}}\\ & = \left. {\frac{7}{9}{y^3} - \frac{1}{\pi }\cos \left( {\pi y} \right)} \right|_0^1\\ & = \frac{7}{9} + \frac{2}{\pi }\end{align*}\]

Don’t forget your basic Calculus I substitutions!


d \( \displaystyle \iint\limits_{R}{{\frac{1}{{{{\left( {2x + 3y} \right)}^2}}}\,dA}}\), \(R = \left[ {0,1} \right] \times \left[ {1,2} \right]\) Show Solution

In this case because the limits for \(x\) are kind of nice (i.e. they are zero and one which are often nice for evaluation) let’s integrate with respect to \(x\) first. We’ll also rewrite the integrand to help with the first integration.

\[\begin{align*}\iint\limits_{R}{{{{\left( {2x + 3y} \right)}^{ - 2}}\,dA}} & = \int_{{\,1}}^{{\,2}}{{\int_{{\,0}}^{{\,1}}{{{{\left( {2x + 3y} \right)}^{ - 2}}\,dx}}\,dy}}\\ & = \int_{{\,1}}^{{\,2}}{{\left. {\left( { - \frac{1}{2}{{\left( {2x + 3y} \right)}^{ - 1}}} \right)} \right|_0^1\,dy}}\\ & = - \frac{1}{2}\int_{{\,1}}^{{\,2}}{{\frac{1}{{2 + 3y}} - \frac{1}{{3y}}\,dy}}\\ & = - \left. {\frac{1}{2}\left( {\frac{1}{3}\ln \left| {2 + 3y} \right| - \frac{1}{3}\ln \left| y \right|} \right)} \right|_1^2\\ & = - \frac{1}{6}\left( {\ln 8 - \ln 2 - \ln 5} \right)\end{align*}\]

e \( \displaystyle \iint\limits_{R}{{x{{\bf{e}}^{xy}}\,dA}}\), \(R = \left[ { - 1,2} \right] \times \left[ {0,1} \right]\) Show Solution

Now, while we can technically integrate with respect to either variable first sometimes one way is significantly easier than the other way. In this case it will be significantly easier to integrate with respect to \(y\) first as we will see.

\[\iint\limits_{R}{{x{{\bf{e}}^{xy}}\,dA}} = \int_{{ - 1}}^{2}{{\int_{0}^{1}{{x{{\bf{e}}^{xy}}\,dy}}\,dx}}\]

The \(y\) integration can be done with the quick substitution,

\[u = xy\hspace{0.5in}du = x\,dy\]

which gives

\[\begin{align*}\iint\limits_{R}{{x{{\bf{e}}^{xy}}\,dA}} & = \int_{{ - 1}}^{2}{{\left. {{{\bf{e}}^{xy}}} \right|_0^1\,dx}}\\ & = \int_{{ - 1}}^{2}{{{{\bf{e}}^x} - 1\,dx}}\\ & = \left. {\left( {{{\bf{e}}^x} - x} \right)} \right|_{ - 1}^2\\ & = {{\bf{e}}^2} - 2 - \left( {{{\bf{e}}^{ - 1}} + 1} \right)\\ & = {{\bf{e}}^2} - {{\bf{e}}^{ - 1}} - 3\end{align*}\]

So, not too bad of an integral there provided you get the substitution. Now let’s see what would happen if we had integrated with respect to \(x\) first.

\[\iint\limits_{R}{{x{{\bf{e}}^{xy}}\,dA}} = \int_{0}^{1}{{\int_{{ - 1}}^{2}{{x{{\bf{e}}^{xy}}\,dx}}\,dy}}\]

In order to do this we would have to use integration by parts as follows,

\[\begin{align*}u & = x & \hspace{0.25in} dv & = {{\bf{e}}^{xy}}\,dx\\ du & = dx & \hspace{0.25in} v &= \frac{1}{y}{{\bf{e}}^{xy}}\end{align*}\]

The integral is then,

\[\begin{align*}\iint\limits_{R}{{x{{\bf{e}}^{xy}}\,dA}} & = \int_{0}^{1}{{\left. {\left( {\frac{x}{y}{{\bf{e}}^{xy}} - \int_{{}}^{{}}{{\frac{1}{y}{{\bf{e}}^{xy}}\,dx}}} \right)} \right|_{ - 1}^2\,dy}}\\ & = \int_{0}^{1}{{\left. {\left( {\frac{x}{y}{{\bf{e}}^{xy}} - \frac{1}{{{y^2}}}{{\bf{e}}^{xy}}} \right)} \right|_{ - 1}^2\,dy}}\\ & = \int_{0}^{1}{{\left( {\frac{2}{y}{{\bf{e}}^{2y}} - \frac{1}{{{y^2}}}{{\bf{e}}^{2y}}} \right) - \left( { - \frac{1}{y}{{\bf{e}}^{ - y}} - \frac{1}{{{y^2}}}{{\bf{e}}^{ - y}}} \right)\,dy}}\end{align*}\]

We’re not even going to continue here as these are very difficult, if not impossible, integrals to do.

As we saw in the previous set of examples we can do the integral in either direction. However, sometimes one direction of integration is significantly easier than the other so make sure that you think about which one you should do first before actually doing the integral.

The next topic of this section is a quick fact that can be used to make some iterated integrals somewhat easier to compute on occasion.

There is a nice special case of this kind of integral. First, let’s assume that \(f\left( {x,y} \right) = g\left( x \right)h\left( y \right)\) and let’s also assume we are integrating over a rectangle given by \(R = \left[ {a,b} \right] \times \left[ {c,d} \right]\). Then, the integral becomes,

\[\iint\limits_{R}{{f\left( {x,y} \right)\,dA}} = \iint\limits_{R}{{g\left( x \right)h\left( y \right)\,dA}} = \int_{c}^{d}{{\int_{a}^{b}{{g\left( x \right)h\left( y \right)\,dx}}\,dy}}\]

Note that it doesn’t matter in this case which variable we integrate first as either order will arrive at the same result with the same work.

Next, notice that because the inner integral is with respect to \(x\) and \(h\left( y \right)\) is a function only of \(y\) it can be considered a “constant” as far as the \(x\) integration is concerned (changing \(x\) will not affect the value of \(y\)!) and because it is also times \(g\left( x \right)\) we can factor the \(h\left( y \right)\) out of the inner integral. Doing this gives,

\[\iint\limits_{R}{{f\left( {x,y} \right)\,dA}} = \iint\limits_{R}{{g\left( x \right)h\left( y \right)\,dA}} = \int_{c}^{d}{{h\left( y \right)\int_{a}^{b}{{g\left( x \right)\,dx}}\,dy}}\]

Now, \(\int_{a}^{b}{{g\left( x \right)\,dx}}\) is a standard Calculus I definite integral and we know that its value is just a constant. Therefore, it can be factored out of the \(y\) integration to get,

\[\iint\limits_{R}{{f\left( {x,y} \right)\,dA}} = \iint\limits_{R}{{g\left( x \right)h\left( y \right)\,dA}} = \int_{a}^{b}{{g\left( x \right)\,dx}}\int_{c}^{d}{{h\left( y \right)\,dy}}\]

In other words, if we can break up the function into a function only of \(x\) times a function of only \(y\) then we can do the two integrals individually and multiply them together.

Here is a quick summary of this idea.

Fact

If \(f\left( {x,y} \right) = g\left( x \right)h\left( y \right)\) and we are integrating over the rectangle \(R = \left[ {a,b} \right] \times \left[ {c,d} \right]\) then,

\[\iint\limits_{R}{{f\left( {x,y} \right)\,dA}} = \iint\limits_{R}{{g\left( x \right)h\left( y \right)\,dA}} = \left( {\int_{{\,a}}^{{\,b}}{{g\left( x \right)\,dx}}} \right)\left( {\int_{{\,c}}^{{\,d}}{{h\left( y \right)\,dy}}} \right)\]

Let’s do a quick example using this integral.

Example 2 Evaluate \( \displaystyle \iint\limits_{R}{{x{{\cos }^2}\left( y \right)\,dA}}\), \(R = \left[ { - 2,3} \right] \times \left[ {0,\frac{\pi }{2}} \right]\).
Show Solution

Since the integrand is a function of \(x\) times a function of \(y\) we can use the fact.

\[\begin{align*}\iint\limits_{R}{{x{{\cos }^2}\left( y \right)\,dA}} & = \left( {\int_{{\, - 2}}^{{\,3}}{{x\,dx}}} \right)\left( {\int_{{\,0}}^{{\,\frac{\pi }{2}}}{{{{\cos }^2}\left( y \right)\,dy}}} \right)\\ & = \left. {\left( {\frac{1}{2}{x^2}} \right)} \right|_{ - 2}^3\left( {\frac{1}{2}\int_{{\,0}}^{{\,\frac{\pi }{2}}}{{1 + \cos \left( {2y} \right)\,dy}}} \right)\\ & = \left( {\frac{5}{2}} \right)\left( {\frac{1}{2}\left. {\left( {y + \frac{1}{2}\sin \left( {2y} \right)} \right)} \right|_0^{\frac{\pi }{2}}} \right)\\ & = \frac{{5\pi }}{8}\end{align*}\]

We have one more topic to discuss in this section. This topic really doesn’t have anything to do with iterated integrals, but this is as good a place as any to put it and there are liable to be some questions about it at this point as well so this is as good a place as any.

What we want to do is discuss single indefinite integrals of a function of two variables. In other words, we want to look at integrals like the following.

\[\begin{align*}& \int{{x{{\sec }^2}\left( {2y} \right) + 4xy\,dy}}\\ & \int{{{x^3} - {{\bf{e}}^{ - \frac{x}{y}}}\,dx}}\end{align*}\]

From Calculus I we know that these integrals are asking what function that we differentiated to get the integrand. However, in this case we need to pay attention to the differential (\(dy\) or \(dx\)) in the integral, because that will change things a little.

In the case of the first integral we are asking what function we differentiated with respect to \(y\) to get the integrand while in the second integral we’re asking what function differentiated with respect to \(x\) to get the integrand. For the most part answering these questions isn’t that difficult. The important issue is how we deal with the constant of integration.

Here are the integrals.

\[\begin{align*}\int{{x{{\sec }^2}\left( {2y} \right) + 4xy\,dy}} & = \frac{x}{2}\tan \left( {2y} \right) + 2x{y^2} + g\left( x \right)\\ \int{{{x^3} - {{\bf{e}}^{ - \frac{x}{y}}}\,dx}} & = \frac{1}{4}{x^4} + y\,{{\bf{e}}^{ - \frac{x}{y}}} + h\left( y \right)\end{align*}\]

Notice that the “constants” of integration are now functions of the opposite variable. In the first integral we are differentiating with respect to \(y\) and we know that any function involving only \(x\)’s will differentiate to zero and so when integrating with respect to \(y\) we need to acknowledge that there may have been a function of only \(x\)’s in the function and so the “constant” of integration is a function of \(x\).

Likewise, in the second integral, the “constant” of integration must be a function of \(y\) since we are integrating with respect to \(x\). Again, remember if we differentiate the answer with respect to \(x\) then any function of only \(y\)’s will differentiate to zero.