Chapter 9. Iterated integrals
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
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
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:
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
Example 1[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
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 2[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.
Example 3[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=√R2-x2. Since the y integral's limit depends on x, the x integral has to be on the outside. The area is
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.