Chapter 22. Double integrals
One common theme from 18.02 that you might have noticed in part Foxtrot is that, unlike in 18.01 where you were hyper-focused on the function you were optimizing, in 18.02 the region you’re working with deserves a lot of attention. This will be true for the material in this chapter too — you ought to pay most attention to the region before you even look at the function that’s being integrated.
§22.1 [RECIPE] Integrating over rectangles
If you want to integrate over a rectangle, this is super easy. It’s basically like partial derivatives, where you pretend some variables are constant and only one variable is going to vary at once. It’s easier to see an example before the recipe.
Rather than writing just , I will usually prefer to write , to make it easier to see which variable is integrated over. Not all sources will be nice enough to do this and will actually make you read the and backwards; e.g. if you see
then this actually means
so and . For me reading backwards like this is annoying as hell, so I think it’s just much easier to write
and I recommend you use that notation instead. The advantage is that then you pretty much don’t have to look at the at the far right anymore; the information you need is all in one place at the far left.
Solution.
The first step is to compute the inner integral with respect to , treating as a constant.
The inner integral is:
Since is treated as a constant with respect to , we can factor it out of the integral:
Now, compute :
Thus, the result of the inner integral is:
Now, substitute the result of the inner integral into the outer integral:
Easy, right? The general recipe is the same.
To integrate something of the form :
- Evaluate the inner integral as in 18.01, treating as constant. This should give you some expression in with no ’s left.
- Replace the inner integral with the result from the previous step to get an 18.01 integral with only in it. Integrate that.
Here’s another example.
Evaluate the double integral:
Solution.
The first step is to compute the inner integral with respect to , treating as a constant. The inner integral is:
Since is treated as a constant with respect to , we can factor out of the integral:
Now, we compute .
Thus, the result of the inner integral is:
Now, substitute the result of the inner integral into the outer integral:
We know that . Therefore:
Using and , we get:
§22.2 [RECIPE] Doing -integration without a rectangle
In general, a lot of 2D regions can still be done with integration, even when they aren’t rectangles. In that case, the integral is notated
for whatever function you’re integrating. If the region is given by a few inequalities you can also write the region directly in, i.e. would mean the integral of over the unit disk.
Here’s how you do it.
A lot of other sources might write this as instead, which is shorter; it’s understood that the area element is shorthand for .
However, when you’re starting off I will still explicitly write , because I don’t want to hide the integration variables — training wheels, I guess. That said, if you know what you’re doing and want to write to save time, go for it!
We’ll talk more about the weirder symbols later.
- Draw a picture of the region as best you can.
- Write the region as a list of inequalities.20
- Pick one of and , and use your picture to describe all the values it could take.
- Solve for the other variable in all the inequalities.
You can do this recipe even with a rectangle. If you do, what the recipe tells you that for a rectangle you can integrate in either order: given the rectangle of points with and , we have
Sometimes this will be easier. One shape of exam question will to be choose such that the left-hand side is annoying to calculate directly but the right-hand side is easy to calculate, and ask for the left-hand side. So this is meant to test your ability to recognize when the other order is better.
For example, let’s take the region in Poonen’s example 13.1:
Solution. See Figure 42. There are two intersection points that it’s pretty clear we’ll want to know, so we can solve for those intersection points by solving the system and add them to our picture:
I’ll also mark , the bottom of the parabola.
So we want the part of the plane that lies above the parabola but below the line . So I think you’ll find things easier to think about if you consider the region as the system of inequalities
Now there are two ways to do the slicing, depending on which of and you want outside.
- If is outer
First, let’s imagine we let be the outer integral. Then from the picture, you can see . If we solve for , we find its region is
See Figure 43.
Figure 43: Dissecting Figure 42 vertically, which is pretty nice. There’s a single top lid (blue) and a bottom lip (purple) so that for each given the slice of (drawn in green) is easy to describe.Hence, we get the double integral as
- If is outer
On the other hand, let’s imagine we used first. From the picture, we see that ranges from all the way up to . (So in what follows I’ll write to make notation better.)
But is gnarly. The issue is that when you solve for you get three inequalities:
- solves to
- solves to .
See Figure 44.
Figure 44: Dissecting Figure 42 horizontally, which is less nice: there are cases. Above the line , you have a blue wall to the left and a curved purple arc to the right. But below , you instead have a red arc of the parabola to the left, and a purple arc of the parabola to the right.If you know how the max function works, you could even write this as
The main issue is that the lower endpoint for behaves differently with cases. For , the bound of triumphs over the bound of . But for , the bound of is the more informative inequality. So if we wanted to write this as a double integral, we would actually have to split into two:
§22.3 [TEXT] Example with a concrete function
In the previous example we showed how one would integrate a random function over the region between the line and the parabola . Again, this process is only based on the region — it doesn’t depend on .
To flesh things out, let’s pick an example function
as Poonen did, and show how we would find the integral.
Solution. As we saw, there are two different ways to set it up. We’ll do the one that’s nice (and show the worse one afterwards for comparison), where we have on the outside.
We are given the integral
The first step is to compute the inner integral with respect to , treating as a constant.
The inner integral is:
We can split this integral into two parts:
The first term is:
The second term is:
Thus, the inner integral is:
Now, we compute the outer integral:
This is a lot of arithmetic, sorry. One way is to work term by term:
Add these to get the answer:
§22.4 [SIDENOTE] What it looks like if you integrate the hard way
In the previous sample question, we picked to be the outer integral so that we didn’t have to do cases or deal with square roots. This was pretty clearly a good choice.
For contrast, I’ll show you what happens if you have in the outer integral instead — just to make a point that things can get ugly. (You can read it if you want the practice with iterated integrals, or skip it if you believe me.) To reiterate, we will directly calculate
We calculate the first hunk
The first step is to compute the inner integral with respect to , treating as a constant. The inner integral is:
We can split this into two integrals:
- The first term is:
- The second term is:
Thus, the inner integral is:
Now, we compute the outer integral:
We use the power rule for integration:
Thus, the outer integral becomes:
Hence the first hunk is
We calculate the second hunk
The first step is to compute the inner integral with respect to , treating as a constant. The inner integral is:
We can split this into two integrals:
The first term is:
Simplifying:
The second term is:
Thus, the inner integral is:
Simplifying we get the inner integral to be
Now, we compute the outer integral:
To keep things organized, we integrate each term individually:
Now, add up the integrals:
The final answer is as expected.
So we got the same answer, no surprise, but it took a lot more work to get it.
§22.5 [TEXT] A few physical interpretations of integrals
Depending on what function is chosen, the integral may have some physical meaning. We give a few examples here:
§22.5.1 Area
If you choose you get area.
To find the area of a region , use
Solution. We’ll write this as
The inner integral is easy . So the answer is
Solution. Write
Actually this is just a rephrasing of the “area under the curve” you learned in 18.01, when you would write and were told “this is the area under the curve ”, as in Figure 45. But the 18.02 definition is more versatile, because it lets us give a definition of area for any integrable region in the -plane, not just those under a curve of the form .
§22.5.2 Mass and center of mass
If you imagine your region as a blob of some substance (concrete, wood, water, etc.), then you could also imagine it has a density at each point in the region (say, in kilograms per square meter). In 18.02 we usually denote the density by , which is a function taking each point in the region and outputting its density.
In that case, the total mass of is the integral of the densities:
Given a region you can also consider the center of mass. The idea/definition is that the -coordinate of the center of mass should be the weighted average of the -coordinates of the points in the region, and is usually denoted :
And the same for the others. Let’s repeat this in recipe form.21
Suppose is a region and is a density function for the region.
- The total mass is given by
- The center of mass is the point defined by
If is a region in ,
- Then a density function should take on nonnegative values. (For physicists: in SI units, you might imagine it as kilograms per square meter.)
- The mass is a nonnegative real number (kilograms).
- The center of mass is also a point inside . (Draw this as a dot, not an arrow.)
Solution. Of course, by symmetry we expect the answer to be . Let’s see this in full. The mass of is given by
The -coordinate of the center of mass is
The calculation for is exactly the same, and we get as we hoped.
Solution. First compute the mass:
Then the -coordinate of the center of mass is
And in exactly the same way. Hence the answer .
(This passes a sanity check: our new square is a bit denser near than . So we expect the center of mass to move in that direction slightly. We still have symmetry across the line .)
§22.6 [SIDENOTE] What’s the analogy to “area under the curve” from 18.01?
In 18.01, you were told that the integral denotes the area under the curve from to .
In 18.02, if you have , and you want to interpret it analogously, what you would do is look at the surface in an -plane, where you imagine the -plane and the region at the bottom, and being a height. Then the double integral analogously calculates the volume underneath the surface.
However, we won’t actually use this interpretation much in 18.02. As I said before, in 18.02 we usually prefer to draw pictures where all the axis variables are treated with equal respect. (Whereas the 18.01 picture I just mentioned uses as input and as output; the two axes don’t play the same role.) So picturing the double integral with things like mass or center of mass is more in line with the 18.02 spirit, even though there is no 18.01 analog.
§22.7 [RECIPE] Swapping the order of integration
If you’re an instructor teaching multivariable calculus, one trope for generating exam questions is to take some region that can be sliced both horizontally and vertically, but for which one way is much easier to integrate than the other. For the problem statement, you give the student the integral written in the “bad” order. The solution is to convert back into a region , and then use this to recover the “good” order. Put in recipe form:
If you are given and you wish to switch the order of integration the other way:
- Convert the limits of integration back into inequality/region format, getting some region .
- Re-apply the recipe from Section 22.2 using the other variable as the outer one now.
Evaluate the double integral:
Solution. To evaluate this integral, note that integrating directly with respect to is not feasible using standard methods from 18.01. Thus, we need to swap the order of integration.
First convert this back into region format:
We see that goes in the range . The region being integrated is drawn in Figure 46.
Solving for in terms of gives three conditions: in addition to we need . Since , we can ignore the condition , and the region can be rewritten to
Turning this back into a double integral gives
The inner integral is with respect to , but the integrand is independent of . Therefore, the inner integral becomes:
Thus, it remains to calculate
And now things are different: does have a valid anti-derivative. If you use the 18.01 method or even just are good at guessing, you can find the indefinite 18.01 integral
So the final answer to the problem is
Let
Evaluate the double integral:
Solution. Integrating is not reasonable, so we swap the order of integration and pray. The region being integrated is
The values of range all the way from to . We draw the region in Figure 47.
Solving for , we see that we have three constraints, , and . But since , the condition is redundant. The region can be rewritten as simply
Convert back into a double integral:
We now compute the inner integral with respect to :
Since is independent of , we can factor it out of the integral:
Substituting the limits of integration:
Now substitute this result into the outer integral:
Let’s perform the 18.01 -substitution , so , or . The limits of integration change as follows:
- When , .
- When , .
Thus, knowing that , the integral becomes:
Using and , we get:
§22.8 [EXER] Exercises
Exercise 22.3. Evaluate the double integral:
Exercise 22.4 (*). Prove that
is a rational number.