You are here

Integrals inside integrals

12 November, 2015 - 16:36

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, con- sider 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 in- side 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 chas 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 dxand height dy, and therefore the infinitesimal area dA= dxdy. 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*} area&=\int_{y=0}^{b}\int_{x=0}^{a}dA \\ &=\int_{y=0}^{b}\int_{x=0}^{a}dxdy \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 dxthat matches it on the right. Finally, on the inner-most 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*} area&=\int_{y=0}^{b}\int_{x=0}^{a}dA \\&=\int_{y=0}^{b}\int_{x=0}^{a}dxdy \\&=\int_{y=0}^{b}(\int_{x=0}^{a}dx)dy \\& =\int_{y=0}^{b}ady \\& = ab \end{align*}                                               

Area of a triangle Example 94

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 xonly run from 0 (on the yaxis) to y(on the hypotenuse). We then have

\begin{align*} area&=\int_{y=0}^{a}\int_{x=0}^{y}dA \\&=\int_{y=0}^{a}\int_{x=0}^{y}dxdy \\&=\int_{y=0}^{a}(\int_{x=0}^{y}dx)dy \\&=\int_{y=0}^{a}ydy \\&=\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.

Volume of a cube Example 95

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= dxdydz.
             \begin{align*} 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}dxdydz \\ &=\int_{z=0}^{a}\int_{y=0}^{a}adydz \\& =a\int_{z=0}^{a}\int_{y=0}^{a}dydz \\&=a\int_{z=0}^{a}adz \\&=a^{2}\int_{z=0}^{a}dz \\&=a^{3} \end{align*}

Area of a circle Example 96

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 xaxis. Then the curved edge is given by the equation  R^{2}=x^{2}+y^{2}, or y=\sqrt{R^{2}-x^{2}}dydx . Since the

y integral’s limit depends on x, the x integral has to be on the outside. The area is

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

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, \pi R^{2}/2  for the area of the semicircle. Doubling it, we find the expected result of \pi R^{2}  for a full circle.