2.11 Multiple integrals
In statistics, we also (quite often!) need to integrate functions involving multiple variables. Considering trying to integrate the following function:
Similar to partial derivatives, we could integrate with respect to (treating as a constant) or integrate with respect to (treating as constant). This should be relatively straightforward for you to get and in these two scenarios.
However, we often need to integrate with respect to both and . Thankfully, this can be done one variable at a time:
As we saw with second-order partial derivatives, it turns out that if is continuous, the order of integration doesn’t matter (this is known as Fubini’s theorem); more on this later.
Let’s say we’ve decided to integrate with respect to first, then (as we indicate when we write ):
Suppose now that we want to integrate across the rectangular region and (i.e., to take the definite integral). This would go as follows:
Conceptually, represents the volume encompassed within the function across the rectangular region and ; this volume and the rectangular region are depicted below:
Multiple integrals can taken over any number of input variables:
As practice, integrate across x, then y and then z (a triple integral). You should get .
Non-rectangular regions
A final complication to be aware of with multiple integrals is that the region over which we are integrating may not be rectangular. For example, let’s consider our same function as before, , but now our region of integration will be :
Note that all the points in the green triangle (and only the points in the green triangle) satisfy . At for instance, only points where is greater than or equal to 0.4 and less than 1 are shaded green. In comparison with the earlier rectangular region, note that the lower right half is no longer included.
The procedure to integrate is the same as before, but we need to pay closer attention to the bounds. Since we’re starting with respect to , let’s figure out the appropriate bounds. Visualizing the green region plotted above is immensely helpful in determining the upper and lower bounds for (you don’t necessarily need to use a computer, but you should always draw the region of integration if it is not rectangular). To determine the lower and upper bounds of the inner integral with respect to , we need to answer the question: at any given value of , what values of are within the green region? The answer is: . For instance, at , can range from 0 to 0.2.
Regarding the range of (the outer integral), we need to include the entire range of 0 to 1 in order to capture the entire triangular region. To visualize this, imagine drawing a line over the valid values, and repeating this process for every value in the range of 0 to 1. A depiction of what this would look like is provided below (hopefully it is clear that the collection of lines would yield the triangle):
Evaluating the integral, we therefore have:
Intuitively, this makes sense – our region is smaller, so the volume should be smaller (1/15 instead of 1/6).
As we mentioned earlier, the order of integration doesn’t matter. As practice, integrate over the region , but this time start by integrating over . Obviously, you should still get 1/15. Hint: to help visualize things, you should draw a figure that looks like this:
If you want even more practice, trying integrating over the region . You should get 1/10 (i.e., ).
Note that while either order gives the same answer, they do not necessarily involve the same amount of work. It is often the case that one route is much easier to calculate than the other, so keep this in mind if one of the integrals becomes difficult to calculate. And remember to draw those regions of integration (really can’t stress that enough)!