Skip to main content
\(\newcommand{\del}[2]{\frac{\partial #1}{\partial #2}} \def\proj{\qopname\relax o{proj}} \def\grad{\qopname\relax o{grad}} \def\curl{\text{curl }\ } \def\div{\qopname\relax o{div}} \def\comp{\qopname\relax o{comp}} \newcommand{\R}{\mathbb{R}} \definecolor{purple}{rgb}{0.5,0,1.0} \definecolor{cyan}{rgb}{0, 1, 1} \definecolor{hotpink}{rgb}{1, 0, 0.5} \definecolor{skyblue}{rgb}{0, 0.5, 1} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section 4 Double Integrals

First, let's remember the definite integral from single-variable calculus.

Subsection 4.1 Review of the single-variable definite integral

In single-variable calculus, the definite integral is an operation involving two pieces of data, a single-variable function \(f\) and a closed interval \([a, b]\text{.}\) We're used to visualizing the definite integral \(\displaystyle \int_a^b f(x)\,dx\) as a signed area, but the definite integral is really defined to be a limit of Riemann sums. Here's a recap of that definition; \(\displaystyle \int_a^b f(x)\,dx\) is the result of the following process:

  1. Slice the interval \([a, b]\) into pieces of equal width \(\Delta x\text{.}\)

  2. For each slice, pick a point \(x\) in the slice 1 You can do this systematically, like always picking the right endpoint of the slice or the midpoint of the slice, but it's also fine to just take a random point in the slice. No matter what choice you make, the limit in Step 4 will be the same (assuming the function \(f\) is continuous on the interval \([a, b]\)). and calculate \(f(x) \Delta x\text{.}\)

  3. Sum all of these values. We can write this sum as \(\displaystyle \sum_{\text{one } x \text{ per slice}} f(x) \Delta x\text{.}\) (A sum of this form is called a single-variable Riemann sum.)

  4. Take the limit of such Riemann sums as \(\Delta x \to 0\text{.}\)

The resulting limit is the value of \(\displaystyle \int_a^b f(x)\,dx\text{.}\)

Of course, we never actually calculate definite integrals this way (we instead use the Fundamental Theorem of Calculus), but this definition of the definite integral is important because it enables us to recognize situations in which definite integrals may be useful.

Subsection 4.2 The double integral

For short, we often refer to a “single-variable definite integral” simply as a single integral. Analagously, the double integral is an operation involving two pieces of data, a 2-variable function \(f(x, y)\) and a 2-dimensional region \(\mathcal{R}\) in \(\R^2\text{.}\) We write the double integral of \(f(x, y)\) over \(\mathcal{R}\) using the symbol \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\text{.}\) Like the single integral, the double integral is defined to be a limit of Riemann sums. More specifically, the double integral is the result of the following process:

  1. Slice the region \(\mathcal{R}\) into small pieces. For example, we could slice \(\mathcal{R}\) into rectangles of width \(\Delta x\) and height \(\Delta y\text{.}\) (Of course, since \(\mathcal{R}\) need not have straight sides, not all of the pieces will be complete rectangles, as shown below.)

  2. For each slice, pick a point \((x, y)\) in the slice and calculate \(f(x, y) \Delta A\text{,}\) where \(\Delta A\) is the area of the slice. 2 It's also fine if \(\Delta A\) is only an approximation for the area of the slice.

  3. Sum all of these values. We write this sum as \(\displaystyle \mathop{\sum \sum}_{\text{one } (x, y) \text{ per slice}} f(x, y)\,\Delta A\text{.}\)

  4. Take the limit of this sum as the sizes of the pieces go to 0 (with rectangular pieces, this means we take the limit as \(\Delta x \to 0\) and \(\Delta y \to 0\)).

The resulting limit 3 As long as \(f\) is continuous on \(\mathcal{R}\) (which is the only situation we'll study in 21a), this limit exists. is the value of \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\text{.}\)

There are a few important questions we'll be working to answer in the next few classes:

  1. Why is this idea useful?

  2. Practically speaking, how do we calculate a double integral? (Although a single-variable definite integral is defined as a limit of Riemann sums, when we compute a definite integral, we never actually compute Riemann sums and take a limit; the same is true for double integrals.)

Subsection 4.3 Calculating double integrals

To understand how to calculate a double integral, we'll take a deep dive into an example. Let \(\mathcal{R}\) be the region in \(\R^2\) above \(y = 0\text{,}\) below \(y = \ln x\text{,}\) and to the left of \(x = e^2\text{;}\) here's a sketch of the region:

We'd like to understand how to evaluate \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\) for an arbitrary 2-variable function \(f\text{.}\) The key is that this double integral can be rewritten in terms of single integrals. To understand why this is, let's go back to the definition of double integrals, which says \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\) is the result of a process:

We first slice the region \(\mathcal{R}\) into small pieces; here, we'll use rectangles of width \(\Delta x\) and height \(\Delta y\text{:}\) 4 As we mentioned before, some of the pieces aren't perfect rectangles, and that's fine.

On each slice, we pick a point \((x, y)\) and calculate \(f(x, y) \Delta A\) where \(\Delta A\) is the area of the slice. Since most of the pieces are rectangles of width \(\Delta x\) and height \(\Delta y\text{,}\) they have \(\Delta A = \Delta x \Delta y\text{;}\) even for the pieces that are not complete rectangles, it's reasonable to approximate \(\Delta A\) by \(\Delta x \Delta y\text{,}\) as this approximation will become more accurate once we take the limit as \(\Delta x \to 0\) and \(\Delta y \to 0\text{.}\)

We sum these values of \(f(x, y) \Delta A\text{,}\) one value per slice, and \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\) is the limit of these sums as \(\Delta x \to 0\) and \(\Delta y \to 0\text{.}\) That is,

\begin{equation} \iint_{\mathcal{R}} f(x, y)\,dA = \lim_{\Delta x \to 0} \lim_{\Delta y \to 0} \mathop{\sum \sum}_{\text{one } (x, y) \text{ per slice}} f(x, y) \Delta x \Delta y\label{xml-eq-double-integral-handout-generic}\tag{4.1} \end{equation}

The key insight is that, in the double Riemann sum, we can add up the values \(f(x, y) \Delta x \Delta y\) in any order we want. So, for instance, we could add up the values in each column first, get one result per column, and add up those results. So, we can rewrite (4.1) as

\begin{equation} \iint_{\mathcal{R}} f(x, y)\,dA = \lim_{\Delta x \to 0} \lim_{\Delta y \to 0} \sum_{\text{one } x \text{ per column}} \left( \sum_{\text{one } y \text{ per slice in column of } x} f(x, y) \Delta y \right) \Delta x\label{xml-eq-double-integral-handout-one-column}\tag{4.2} \end{equation}

Let's think about the inner sum, where we've fixed a value of \(x\) and are summing \(f(x, y) \Delta y\) for one \(y\) per slice in the column. Here's a picture of one such column:

The sum \(\displaystyle \sum_{\text{one } y \text{ per slice in column of } x} f(x, y) \Delta y\) is a Riemann sum in \(y\text{,}\) so when we take the limit of this Riemann sum as \(\Delta y \to 0\text{,}\) we'll get a definite integral of the form \(\displaystyle \int_?^? f(x, y)\,dy\text{.}\) What are the bounds of the integral? From the picture, we see that we've sliced \(y\)-values from \(y = 0\) to \(y = \ln x\) (remember that we're looking at a fixed \(x\)), so these are the bounds. That is,

\begin{equation*} \lim_{\Delta y \to 0} \sum_{\text{one } y \text{ per slice in column of } x} f(x, y) \Delta y = \int_0^{\ln x} f(x, y)\,dy. \end{equation*}

Plugging this into (4.2),

\begin{equation} \iint_{\mathcal{R}} f(x, y)\,dA = \lim_{\Delta x \to 0} \sum_{\text{one } x \text{ per column}} \left( \int_0^{\ln x} f(x, y)\,dy \right) \Delta x\label{xml-eq-double-integral-handout-outer}\tag{4.3} \end{equation}

But notice that this is now the limit of a Riemann sum in \(x\text{,}\) so it can be rewritten as an integral in \(x\text{!}\) What are the bounds of \(x\text{?}\) We're summing over one \(x\) per column, and the columns go from \(x = 1\) to \(x = e^2\text{,}\) so (4.3) becomes

\begin{equation} \iint_{\mathcal{R}} f(x, y)\,dA = \int_1^{e^2} \left( \int_0^{\ln x} f(x, y)\,dy \right)\,dx \label{xml-eq-double-integral-handout-iterated1}\tag{4.4} \end{equation}

Thus, we've rewritten \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\) in terms of single integrals. Let's see an example of how to use this.

Example 4.1

Let's calculate \(\displaystyle \iint_{\mathcal{R}} (x^2 + e^y)\,dA\) for the region \(\mathcal{R}\) we've been looking at.

Solution

By (4.4),

\begin{align*} \iint_{\mathcal{R}} (x^2 + e^y)\,dA \amp = \int_1^{e^2} \left( \int_0^{\ln x} (x^2 + e^y)\,dy \right) dx \\ \end{align*}

As we said already, in the inner integral, \(x\) should be thought of as constant (because we're integrating over a column of the region, where \(x\) is constant) and \(y\) is the variable:

\begin{align*} \amp = \int_1^{e^2} \left( x^2 y + e^y \Big|_{y=0}^{y=\ln x} \right) dx \\ \amp = \int_1^{e^2} \left( x^2 \ln x + x - 1 \right)\,dx \\ \end{align*}

Using integration by parts to integrate \(x^2 \ln x\text{,}\) this evaluates to:

\begin{align*} \amp = \frac{5 e^6}{9}+\frac{e^4}{2}-e^2+\frac{11}{18} \end{align*}

The expression \(\displaystyle \int_1^{e^2} \left( \int_0^{\ln x} f(x, y)\,dy \right)\,dx\) is called an iterated integral, and we can also write it without parentheses as \(\displaystyle \int_1^{e^2} \int_0^{\ln x} f(x, y)\,dy \,dx\text{.}\)

If you look back at how we rewrote \(\displaystyle \iint_{\mathcal{R}} f(x, y)\,dA\) as an iterated integral, you'll remember that it came from adding up the values \(f(x, y) \Delta A\) in a particular order: columns first. Of course, we could have instead chosen to add rows first. Let's see what would happen if we had made that choice. Then, instead of (4.2), we could have written

\begin{equation} \iint_{\mathcal{R}} f(x, y)\,dA = \lim_{\Delta x \to 0} \lim_{\Delta y \to 0} \sum_{\text{one } y \text{ per row}} \left( \sum_{\text{one } x \text{ per slice in row of } y} f(x, y) \Delta x \right) \Delta y\label{xml-eq-double-integral-handout-one-row}\tag{4.5} \end{equation}

Here's a picture of one row (with a fixed \(y\)):

From the picture, we can see that this row involves \(x\)-values from \(e^y\) (because the left end of the row is on \(y = \ln x\text{,}\) which can be rewritten as \(x = e^y\)) to \(e^2\text{,}\) so when we take the limit as \(\Delta x \to 0\) of the inner Riemann sum, we get the definite integral \(\displaystyle \int_{e^y}^{e^2} f(x, y)\,dx\text{.}\) When we sum over all rows, \(y\) varies from \(0\) to \(2\text{,}\) so we end up rewriting

\begin{equation} \iint_{\mathcal{R}} f(x, y)\,dA = \int_0^2 \int_{e^y}^{e^2} f(x, y)\,dx\,dy\label{xml-eq-double-integral-handout-iterated2}\tag{4.6} \end{equation}
Example 4.2

Let's calculate \(\displaystyle \iint_{\mathcal{R}} (x^2 + e^y)\,dA\) again using (4.6).

Solution

(4.6) says

\begin{align*} \iint_{\mathcal{R}} (x^2 + e^y)\,dA \amp = \int_0^2 \int_{e^y}^{e^2} (x^2 + e^y)\,dx\,dy \\ \end{align*}

This time, in the inner integral, \(y\) is thought of as constant and \(x\) is the variable:

\begin{align*} \amp = \int_0^2 \left( \left. \frac{x^3}{3} + x e^y \right|_{x=e^y}^{x=e^2} \right) dy \\ \amp = \int_0^2 \left( \frac{e^6}{3} + e^2 e^y - \frac{e^{3y}}{3} - e^{2y} \right)\,dy \\ \amp = \left. \frac{e^6}{3} y + e^2 e^y - \frac{e^{3y}}{9} - \frac{e^{2y}}{2} \right|_{y=0}^{y=2} \\ \amp = \frac{5e^6}{9} + \frac{e^4}{2} - e^2 + \frac{11}{18} \end{align*}

This is of course the same answer that we got in Example 4.1, but notice that this time we didn't need integration by parts. This illustrates one reason it can be useful to have multiple ways to convert a double integral to an iterated integral; sometimes, one iterated integral is easier to evaluate than another.