Home TOC Font Previous Next

9.1 Integrals Inside Integrals

In various applications, you need to do integrals stuck inside other integrals. These are known as iterated integrals, or double integrals, triple integrals, etc. Similar concepts crop up all the time even when you're not doing calculus, so let's start by imagining such an example. Suppose you want to count how many squares there are on a chess board, and you don't know how to multiply eight times eight. You could start from the upper left, count eight squares across, then continue with the second row, and so on, until you how counted every square, giving the result of 64. In slightly more formal mathematical language, we could write the following recipe: for each row, r, from 1 to 8, consider the columns, c, from 1 to 8, and add one to the count for each one of them. Using the sigma notation, this becomes

\[\sum_{r=1}^8 \sum_{c=1}^8 1 .\]

If you're familiar with computer programming, then you can think of this as a sum that could be calculated using a loop nested inside another loop. To evaluate the result (again, assuming we don't know how to multiply, so we have to use brute force), we can first evaluate the inside sum, which equals 8, giving

\[\sum_{r=1}^8 8 .\]

Notice how the “dummy” variable c has disappeared. Finally we do the outside sum, over r, and find the result of 64.

Now imagine doing the same thing with the pixels on a TV screen. The electron beam sweeps across the screen, painting the pixels in each row, one at a time. This is really no different than the example of the chess board, but because the pixels are so small, you normally think of the image on a TV screen as continuous rather than discrete. This is the idea of an integral in calculus. Suppose we want to find the area of a rectangle of width a and height b, and we don't know that we can just multiply to get the area ab. The brute force way to do this is to break up the rectangle into a grid of infinitesimally small squares, each having width dx and height dy, and therefore the infinitesimal area dA = dx dy. For convenience, we'll imagine that the rectangle's lower left corner is at the origin. Then the area is given by this integral:

\begin{align} \text{area} &= \int_{y=0}^b \int_{x=0}^a dA \\ &= \int_{y=0}^b \int_{x=0}^a dx dy \end{align}

Notice how the leftmost integral sign, over y, and the rightmost differential, dy, act like bookends, or the pieces of bread on a sandwich. Inside them, we have the integral sign that runs over x, and the differential dx that matches it on the right. Finally, on the innermost layer, we'd normally have the thing we're integrating, but here's it's 1, so I've omitted it. Writing the lower limits of the integrals with x= and y= helps to keep it straight which integral goes with with differential. The result is

\begin{align} \text{area} &= \int_{y=0}^b \int_{x=0}^a dA \\ &= \int_{y=0}^b \int_{x=0}^a dx dy \\ &= \int_{y=0}^b \left(\int_{x=0}^a dx\right) dy \\ &= \int_{y=0}^b a dy \\ &= a \int_{y=0}^b dy = ab . \end{align}

Example 94: Area of a Triangle

◊ Find the area of a 45-45-90 right triangle having legs a.

◊ Let the triangle's hypotenuse run from the origin to the point (a, a), and let its legs run from the origin to (0, a), and then to (a, a). In other words, the triangle sits on top of its hypotenuse. Then the integral can be set up the same way as the one before, but for a particular value of y, values of x only run from 0 (on the y axis) to y (on the hypotenuse). We then have

\begin{align} \text{area} &= \int_{y=0}^a \int_{x=0}^y dA \\ &= \int_{y=0}^a \int_{x=0}^y dx dy \\ &= \int_{y=0}^a \left(\int_{x=0}^y dx\right) dy \\ &= \int_{y=0}^a y dy \\ &= \frac{1}{2}a^2 \end{align}

Note that in this example, because the upper end of the x values depends on the value of y, it makes a difference which order we do the integrals in. The x integral has to be on the inside, and we have to do it first.

Example 95: Volume of a Cube

◊ Find the volume of a cube with sides of length a.

◊ This is a three-dimensional example, so we'll have integrals nested three deep, and the thing we're integrating is the volume dV = dx dy dz.

\begin{align} \text{volume} &= \int_{z=0}^a \int_{y=0}^a \int_{x=0}^a dV \\ &= \int_{z=0}^a \int_{y=0}^a \int_{x=0}^a dx dy dz \\ &= \int_{z=0}^a \int_{y=0}^a a dy dz \\ &= a \int_{z=0}^a \int_{y=0}^a dy dz \\ &= a \int_{z=0}^a a dz = a^2 \int_{z=0}^a dz = a^3 \end{align}

Example 96: Area of a Circle

◊ Find the area of a circle.

◊ To make it easy, let's find the area of a semicircle and then double it. Let the circle's radius be r, and let it be centered on the origin and bounded below by the x axis. Then the curved edge is given by the equation R2 = x2 + y2, or \(y=\sqrt{R^2-x^2}\). Since the y integral's limit depends on x, the x integral has to be on the outside. The area is

\begin{align} \text{area} &= \int_{x=-R}^r \int_{y=0}^{ \sqrt{R^2-x^2}} dy dx \\ &= \int_{x=-R}^r \sqrt{R^2-x^2} dx \\ &= r \int_{x=-R}^r \sqrt{1-(x/R)^2} dx . \end{align}

Substituting \(u=x/R,\) area = \(R^2 \int_{u=-1}^1 \sqrt{1-u^2} du . \)

The definite integral equals π, as you can find using a trig substitution or simply by looking it up in a table, and the result is, as expected, π R2/2 for the area of the semicircle. Doubling it, we find the expected result of π R2 for a full circle.