4.3 Iterated Integrals

4.3 Iterated Integrals

  1. The Iterated Integral Theorem
  2. Integrating Over Non-rectangles
  3. Examples
  4. Problems

\(\Leftarrow\)  \(\Uparrow\)  \(\Rightarrow\)

The Iterated Integral Theorem

The main theorem of this section tells us how to compute multi-variables integrals in practice. The point is that it reduces integration over \(2\)- and higher-dimensions regions to (repeated) \(1\)-d integrations, which we in principle know how to evaluate, at least some of the time.

Suppose that \(R = [a,b]\times [c,d]\) is a rectangle in \(\R^2\). Let \(f\) be a function on \(R\), and suppose that \(f\) is integrable on \(R\) and for every \(y\in [c,d]\), the function \(f_y:[a,b]\to \R\) defined by \(f_y(x) = f(x,y)\) is integrable on \([a,b]\).

Then the function \(g:[c,d]\to \R\) defined by \(g(y) = \int_a^b f(x,y)\,dx\) is integrable on \([c,d]\), and \[\begin{equation}\label{ft} \iint_R f\, dA %= \int_c^d g(y) dy = \int_c^d \left(\int_a^b f(x,y)\,dx\right)dy. \end{equation}\]

In the above equation, \(\int_a^b f(x,y)\,dx\) means that we consider \(y\) to be a constant, and we integrate \(f(x,y) = f_y(x)\). If this seems unclear, take a look at a few of the examples presented below.

Remark 1

There are three integrals in formula \(\eqref{ft}\): a \(2\)-dimensional integral \(\iint \cdots dA\) on the left, and two \(1\)-dimensional integrals on the right.

Remark 2

If the roles of \(x\) and \(y\) are switched in hypotheses, then the conclusion \(\eqref{ft}\) also holds with the roles of \(x\) and \(y\) switched. Note that this means we require \(f_x(y)\) to be integrable on \([c,d]\) for every \(x\in[a,b]\), and we can conclude that \(g(x) = \int_c^d f(x,y)\,dy\) is integrable. This can be useful if both \(f_x(y)\) and \(f_y(x)\) are integrable, we can choose which order we integrate. As a result, \[ \int_a^b \left(\int_c^d f(x,y)\,dy\right)dx \ = \ \iint_R f\, dA \ = \ \int_c^d \left(\int_a^b f(x,y)\,dx\right)dy \ \] whenever all the integrals appearing in the formula make sense (that is, all the integrands are integrable).

It follows from theory developed in Sections 4.2 that all the hypotheses of the above theorem will in practice be satisfied in almost every integral we encounter in this class (generally, integrals of continuous functions over compact sets whose boundaries have content zero). There is an example that things that can go wrong if the hypotheses are not all satisfied — see the advanced problem at the end of this section.

Remark 3

A generalization of Theorem 1 holds for integrals in \(n\) dimensions, for any \(n\ge 3\). The hypotheses have the same character but are more complicated to state, and in practice are satisfied by more or less every integral we will meet in this class.

Example 1.

Let \(R = [0,1]\times [0,1]\), and compute \[ \iint_R x\cos(xy)\, dA. \]
According to Theorem 1, \[ \iint_R x\cos(xy)\, dA \ = \ \int_0^1\left( \int_0^1 x\cos(xy)\, dx\right)dy \ = \ \int_0^1\left( \int_0^1 x\cos(xy)\, dy\right)dx. \] Which of these two iterated integrals is easier to evaluate? Let’s try both.
First, \[ \begin{aligned} \int_0^1\left( \int_0^1 x\cos(xy)\, dy\right)dx &= \int_0^1 \left( \sin(xy)\Big|_{y=0}^{y=1}\,\right) \ dx \\\ &= \int_0^1 \sin(x) \ dx \\\ &= 1-\cos(1) . \end{aligned} \] Note that after we carry out the first integral \(\int_0^1 x\cos(xy)\, dy\), the result, \(\sin(x)\), is a function only of \(x\); we have “integrated out” all the dependence on \(y\).
If we do the integrals in the other order, we get \[ \begin{aligned} \int_0^1\left( \int_0^1 x\cos(xy)\, dx\right)dy &= \int_0^1 \left( \frac xy \sin(xy) +\frac 1{y^2}\cos(xy) \right)_{x=0}^{x=1} \ dy \\\ &= \int_0^1 \frac 1 y \sin(y) + \frac 1{y^2}(\cos(y) -1) \ dy . \end{aligned} \] One can check that it is integrable and that its integral equals \(1-\cos(1)\), but neither of these claims is at all obvious. Since we have already found the answer by integrating in the other order, we are not obliged to worry about it.

But see here for more, if you are interested.

The key points are

  • Using l’Hospital’s rule, for example, one can check that \(\lim_{y\to 0} \frac 1 y \sin(y) + \frac 1{y^2}(\cos(y) -1)\) exists. From this one can deduce that this function is integrable on \([0,1]\).
  • the antiderivative of $ 1 y (y) + 1{y^2}((y) -1)$ on \((0,\infty)\) is \(-\frac 1y(\cos y -1)\), and
  • One can laso check that \(\lim_{y\to 0}-\frac 1y(\cos y -1) = 0\). Using this one can finish evaluating the integral.
Note also that, again, after we integrate \(\int_0^1 x\cos(xy)\, dx\), the result is a function of \(y\) alone; we have integrated out all of the dependence on \(x\).

Integrating Over Non-rectangles

The main difficulty we will have arises when integrating over a set \(S\) that is not a rectangle. If \(S\) has the form \[\begin{equation}\label{S1} S = \left\{(x,y)\in \R^2 : a\le x \le b, \phi(x) \le y \le \psi(x)\right\} \end{equation}\] for some continuous functions \(\phi, \psi:[a,b]\to \R\) , then \[ \iint_S f\, dA = \int_a^b \left( \int_{\phi(x)}^{\psi(x)} f(x,y) dy\right)dx \] Similarly it is straightforward to write down a suitable interated integral when the set \(S\) is described as \(S = \left\{(x,y)\in \R^2 : c\le y \le d, \phi(y) \le x \le \psi(y)\right\}\).

The difficulty is that \(S\) is usally not described in a convenient form such as \(\eqref{S1}\). So the challenge one often ecounters is, given a set \(S\), translate its description into a set of inequalities, such as \[ (x,y)\in S \qquad\qquad \iff \qquad \qquad \left\{ \begin{array}{c} a\le x\le b\\\ \phi(x)\le y \le \psi(x) \end{array} \right. \] or maybe \[ (x,y)\in S \qquad\qquad \iff \qquad \qquad \left\{ \begin{array}{c} c\le y\le d\\\ \phi(y)\le x \le \psi(y) . \end{array} \right. \] It may be necessary to split a set \(S\) into mutiple pieces, each one of which is expressed by inequalities of the above form.

The same issues arise in higher dimensions where they are even more difficult. For example, given a set \(S \subseteq \R^3\), to write iterated integrals over \(S\), it is necessary to translate description of \(S\) into inequalities \[ (x,y,z)\in S \qquad\qquad \iff \qquad \qquad \left\{ \begin{array}{c} a\le x\le b\\\ \phi(x)\le y \le \psi(x)\\\ \Phi(x,y)\le z \le \Psi(x,y) \end{array} \right. \] or similar inequalities with the roles of \(x,y,z\) permuted in some way.

The rest of this section consists of examples. Many of them will focus on how to set up integrals, rather than how to carry them out (which in some examples we will omit entirely), since setting them up is the new element here.

Examples

Example 2.

Let \(S\) be the subset of \(\R^2\) that is bounded by the curves \(y=\frac 12 x^2\) and \(y=x^2-2\), and let \(f:S\to \R\) be continuous. Express \(\iint_S f \, dA\) as an interated integral in two different ways.

It is often helpful to draw a picture:
Ex4.3.2\(\qquad\qquad\)

\(S\) is the region between the two parabolas. First, we have to determine the points where the curves intersect. Both equations \(y=x^2-2\) and \(y=\frac 12 x^2\) are satisfied at these points, so \(x^2-2 = y = \frac 12x^2\). We solve to find that \((x,y) =(\pm 2, 2)\). (We can see this in the picture, but had we drawn by hand, we would not know where to put the intersection points without reasoning as above.)

For \(-2\le x\le 2\), we can see that \(x^2-2 \le \frac 12 x^2\), so “between the two curves” means “above $ x^2-2$ and below \(\frac 12 x^2\)”. We conclude that \[ (x,y)\in S \quad \iff \quad \left\{ \begin{array}{c} -2\le x\le 2 \\\ x^2-2\le y \le \frac 12 x^2 \end{array} \right. \]

and thus \[ \iint_S f(\mathbf x)\, dA = \int_{-2}^{2} \int_{x^2-2}^{\frac 12 x^2} f(x,y)\, dy\,dx. \] Note that, if you start by drawing a careful sketch, you can probably figure this out from looking at your picture.

Switching the roles of \(x\) and \(y\) Writing the \(\iint_S\, dA\) as an interated integal in the opposite order is more complicated. So if you are just asked to evaluate the integral you should probably solve it as above, unless there is a very good reason for doing otherwise.

First, we have express the curves that comprise \(\partial S\) in the form \(x = f(y)\). This is straightforward:

\[ y = x^2 - 2 \quad \iff \quad x = \pm \sqrt{y+2} \qquad \qquad\text{(and }y\ge -2\text{),} \] \[ y = \frac 12 x^2 \quad \iff \quad x = \pm \sqrt{2y} \qquad \qquad\text{(and }y\ge 0\text{),} \]

Next, it is convenient to split \(S\) into 3 sub-regions — the part below the \(x\)-axis, and the parts in the first and the second quadrants — since in each of these regions, the range of \(x\) (as a function of \(y\)) has a different description.

Below the \(x\)-axis:

\[ (x,y)\in S\text{ and }y\le 0 \qquad \iff \qquad \quad \left\{ \begin{array}{c} -2\le y\le 0 \\\ -\sqrt{y+2} \le x \le\sqrt{y+2} \. \end{array} \right. \]

First quadrant:

\[ (x,y)\in S \cap \text{first quadrant} \qquad \iff \qquad \quad \left\{ \begin{array}{c} 0\le y \le 2 \\\ \sqrt{2y} \le x \le \sqrt{y+2}\ . \end{array} \right. \]

Second quadrant:

\[ (x,y)\in S \cap \text{second quadrant} \qquad \iff \qquad \quad \left\{ \begin{array}{c} 0\le y \le 2 \\\ -\sqrt{y+2} \le x \le -\sqrt{2y}\ . \end{array} \right. \]

Putting these together, we conclude that $ _S f(x), dA $ can be written as \[ \int_{-2}^0 \int_{-\sqrt{y+2}}^{\sqrt{y+2}} f(x,y)\, dx\,dy + \int_0^2 \int_{\sqrt{2y}}^{\sqrt{y+2}} f(x,y)\, dx\, dy + \int_0^2 \int_{-\sqrt{y+2}}^{-\sqrt{2y}} f(x,y)\, dx\, dy . \]

Example 3

Consider the integral \[ \int_1^4 \int_2^{8/y} f(x,y)\, dx\, dy. \]

Rewrite this in the forms \(\iint_S f\, dA\) (that is, determine the region \(S\)) and \(\int_a^b \int_{\phi(x)}^{\psi(x)} f(x,y) \, dy\, dx\).

From looking at the limits of integration, we can see that \[ (x,y)\in S \qquad \iff \qquad \quad \left\{ \begin{array}{c} 1\le y \le 4 \\\ 2 \le x \le 8/y \. \end{array} \right. \]

In other words, the integral can be written as \[ \iint_S f\ dA, \quad\text{ where } S =\left\{(x,y) : 1\le y \le 4, \ 2\le x \le 8/y\right\}. \] The easiest way to change the order of integration is to draw a picture. To understand the problem, you should do this. For this region, by rearranging the inequalities, it is also possible to figure out that \[ (x,y)\in S \qquad \iff \qquad \quad \left\{ \begin{array}{c} 2\le x \le 8 \\\ 1 \le y \le 8/x \. \end{array} \right. \] Thus we can also write the integral as \[ \int_2^8 \int_1^{8/x} f(x,y)\, dy\, dx. \]

An interesting class of examples involves iterated integrals that look impossible as written, but that become possible once one exchanges the order of integration.

Example 4

Consider \[ \int_0^1 \int_y^1 e^{x^2} dx \, dy. \]
The antiderivative of \(e^{x^2}\) is not an elementary function. However, from looking at the limits of integration, we can see that we are asked to integrate over a region — call it \(S\) — defined by the inequalities \[ (x,y)\in S \qquad \iff \qquad \left\{ \begin{array}{c} 0\le y \le 1\\\ y \le x \le 1 \end{array} \right. \] and this is the same as \[ (x,y)\in S \qquad \iff \qquad \left\{ \begin{array}{c} 0\le x \le 1\\\ 0 \le y \le x \ . \end{array} \right. \] This can be seen either by sketching \(S\) or else just by manipulating the inequalities, as in the previous example. It follows that \[ \int_0^1 \int_y^1 e^{x^2} dx \, dy = \int_0^1 \int_0^x e^{x^2}\, dy\, dx. \] Now the iterated integral on the right can be computed easily: \[ \int_0^1\int_0^x e^{x^2}\, dy\, dx = \int_0^1 x e^{x^2} dx = \frac 12 \int_0^1 e^u\, du = \frac 12 (e-1). \]

For more examples of this sort, see the exercises.

Example 5

Find the volume of a sphere in \(\R^3\). That is, compute the integral of \(f(x,y,z) = 1\) over the \(3\)-dimensional ball of radius \(r\), \[ S = \overline B({\bf 0}; r) = \left\{ (x,y,z)\in \R^3 : x^2+y^2+z^2 \le r^2\right\}. \] It does not matter whether we consider the open ball or the closed ball, since the boundary is a set of zero content.

First we have to set up the integral. Since \(x,y,z\) appear appear in a symmetrical way in both \(f\) and \(S\), the order of integration does not matter. So we can choose (arbitrarily) to write \[ (x,y,z)\in S \qquad\qquad \iff \qquad \qquad \left\{ \begin{array}{c} a\le z\le b\\\ \phi(z)\le y \le \psi(z)\\\ \Phi(y,z)\le x \le \Psi(y,z) \end{array} \right. \] First we consider the range of \(z\). The smallest and largest possible values of \(z\) in the set \(S\) are \(z = -r\) and \(z=r\) respectively. We can see this either from drawing a picture, or from noting that \(z^2 \le r^2 - x^2 - y^2 \le r^2\), and that points where \(x,y\) both equal \(0\) (hence \(z^2=r^2\)) belong to \(S\). Thus \[\begin{equation}\label{zrange1} -r\le z \le r \end{equation}\] About the range of \(y\), we know that \(y^2 \le r^2 - z^2 - x^2\). If we know the value of \(z\) but not that of \(x\), then the extreme case occurs when \(x=0\), leading to \(z^2 = r^2-y^2\), hence \[\begin{equation}\label{yrange1} -\sqrt{r^2-z^2}\le y \le \sqrt{r^2-z^2} \end{equation}\] Finally, we see that \[\begin{equation}\label{xrange1} -\sqrt{r^2-y^2-z^2}\le x \le \sqrt{r^2-y^2-z^2} \end{equation}\] Thus \[ \iiint_S 1\, dV = \int_{-r}^r \int_{-\sqrt{r^2-z^2}}^{\sqrt{r^2-z^2}} \int_{-\sqrt{r^2-z^2-y^2}}^{\sqrt{r^2-z^2-y^2}}1 \ dx\,dy\,dz. \] We now carry out the integration. The innermost intergral leads to \[ \iiint_S 1\, dV =2 \int_{-r}^r \int_{-\sqrt{r^2-z^2}}^{\sqrt{r^2-z^2}}\sqrt{r^2-z^2-y^2}\, dy\,dz. \] To evaluate this, we remember that in general $ _{-}^, dt $ can be evaluated by the substitution \(t = \alpha\sin \theta\), with \(-\pi/2\le \theta \le \pi/2\), leading to

\[ \int_{-\alpha}^\alpha \sqrt{\alpha^2- t^2}\, dt = \alpha^2 \int_{-\pi/2}^{\pi/2} \cos^2 \theta \, d\theta = \frac\pi 2 \alpha^2. \] Substituting this into our above computation of \(\iiint_S 1\, dV\) (with \(\alpha = \sqrt{r^2-z^2}\) we can compute the integral and find that \[ \iiint_S 1\, dV \ = \ \frac 43\pi r^3 . \]

Problems

Basic

  1. For the following sets \(S\), write down an iterated integral that corresponds to \(\iint_S f\, dA\). For some of these, it may be necessary to divide \(S\) into two or more pieces, as in Example 2.

  2. For the following iterated integrals, determine the set \(S\subset\R^2\) corresponding to the region of integration, and rewrite the integral after changing the order of integration. For some of these, it may be necessary to divide \(S\) into two or more pieces.

  3. Evaluate the following integrals. It may be necessary to change the order of integration in order to do so.

  4. Find the volume of a sphere in \(\R^4\).

Advanced

  1. For \(x,y\ge 0\), define \[ f(x,y) = \begin{cases}y^{-2}&\text{ if }y>x>0 \\\ -x^{-2} &\text{ if } x>y>0 \\\ 0 &\text{ if }x=y\text{ or }xy=0. \end{cases} \] Compute
    \[ \int_0^1 \int_0^1 f(x,y) \, dx\, dy \qquad\text{ and } \qquad \int_0^1 \int_0^1 f(x,y) \, dy\, dx. \] In the process of doing this, you will see that these iterated integrals are well-defined, in the sense that every function you have to integrate is in fact integrable. Are they equal?

  2. Prove Theorem 1. (You will do this in Problem Set 6, with the proof being divided into several smaller questions.)

\(\Leftarrow\)  \(\Uparrow\)  \(\Rightarrow\)

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Canada License.