# Double Integrals

Double Integral Calculator"

This unit covers the following ideas. In preparation for the quiz and exam, make sure you have a lesson plan containing examples that explain and illustrate the following concepts.

1. Explain how to setup and compute a double integral. Show how to interchange the bounds of integration.
2. For planar regions, find area, mass, centroids, center of mass, moments of inertia, and radii of gyration.
3. Explain how to change coordinate systems in integration, in particular to polar coordinates. Explain what the Jacobian is, and show how to use it.
4. Explain how to use Green's theorem to compute flow along and flux across a curve.
You'll have a chance to teach your examples to your peers prior to the exam. The following homework problems line up with the topics in class.
{|l|c|l|l|l|l|}\hline Topic (11th ed) &Sec &Basic Practice &Good Problems &Thy/App &Comp \\\hline Double Integrals & 15.1&1-16, 21-50 &17-20, 51-54, 57-66 &55-56 &67-76\\\hline Double Integral Applications & 15.2&1-12, 15-18, 19-40 &13, 14, 41-48, 53-56 &49-52 & \\\hline Polar Coordinates & 15.3&1-22,23-32 &33-42 (do 37 and 40 for sure) & &43-46 \\\hline Jacobian & 15.7&1-8, 15-17 &9-10,12-14, 19-22 &18, 24 & \\\hline Green's Theorem & 16.4&1-20 &21-34, 39-40 &35-38 &41-44 \\\hline
} {\noindent \footnotesize
{|l|c|l|l|l|l|}\hline Topic {12th ed} &Sec &Basic Practice &Good Problems &Thy/App &Comp \\\hline Double Integrals (rect.) & 15.1&1-28&&&\\\hline Double Integrals & 15.2&1-24,33-46&19-32, 47-56,57-68&69-84&85-94\\\hline Area, Average Value & 15.3 & 1-22 & 23-25 & 26 & \\\hline Polar Integrals & 15.4 & 1-16 & 17-26, 27-36,41 &37-40, 42-46 & 47-50\\\hline Double Integral Applications & 15.6 & 1-20 & & & \\\hline Jacobian & 15.8&1-8, 17-19 &9-10,12-16, 21-24 &20, 26 & \\\hline Green's Theorem & 16.4&1-24 &25-38, 42 &39-41 &43-46 \\\hline
}

# Applications

I still am not happy with this. I think I want to have them draw more regions from inequalities, before I have them give inequalities. They struggled with 1. I need more like #1. With the inclass practice I'm giving them now, they are doing great, but I still think this could be improved. I might just give them a double integral, and tell them that the bounds describe a region. Draw the region. This might help them put a disconnect between the integrand and the bounds. I'll examine this again next time.

Before we introduce integration, let's practice using inequalities to describe regions in the plane. In first semester calculus, we often use the inequalities $a\leq x\leq b$ and $g(x)\leq y\leq f(x)$ to describe the region above $g$ below $f$ for $x$ between $a$ and $b$. We trapped $x$ between two constants, and $y$ between two functions. Sometimes we wrote $c\leq y\leq d$ where $g(y)\leq x\leq f(y)$ to describe the region to the right of $g$ and left of $f$ for $y$ between $c$ and $d$. We need to practice writing inequalities in this form, as these inequalities provide us the bounds of integration for double integrals.

Consider the region $R$ in the $xy$-plane that is below the line $y=x+2$, above the line $y=2$, and left of the line $x=5$. We can describe this region by saying for each $x$ with $0\leq x\leq 5$, we want $y$ to satisfy $2\leq y\leq x+2$. In set builder notation, we would write $$R=\{(x,y)\mid 0\leq x\leq 5, 2\leq y\leq x+2\}.$$ The symbols $\{$ and $\}$ are used to enclose sets, and the symbol $\mid$ stands for “such that”. We read the above line as “$R$ equals the set of $(x,y)$ such that zero is less than $x$ which is less than 5, and 2 is less than $y$ which is less than $x+2$.”
1. Describe the region $R$ by saying for each $y$ with $c\leq y\leq d$, we want $x$ to satisfy $a(y)\leq x\leq b(y)$. In other words, find constants $c$ and $d$, and functions $a(y)$ and $b(y)$, so that for each $y$ between $c$ and $d$, the $x$ values must be between the functions $a(y)$ and $b(y)$.
2. Write your last answer in the set builder notation $$R=\{(x,y)\mid c\leq y\leq d, a(y)\leq x\leq b(y)\}.$$
%
• Set up two different iterated integrals that would find the volume under some function $f(x,y)$, above the region $R$.
[Hint: If you're struggling, then draw the 4 curves given by $0=x$, $x= 5$, $2=y$ and $y= x+2$. Then shade either above, below, left, or right of the line (as appropriate).]
For each region $R$ below, draw the region and give a set of inequalities of the form $a\leq x\leq b, c(x)\leq y\leq d(x)$ or in the form $c<y<d, a(y)\leq x\leq b(y)$. In class, we'll give whichever one you did not.
I like to let 3 people present this.
1. The region $R$ is above the line $x+y=1$ and inside the circle $x^2+y^2=1$.
2. The region $R$ is below the line $y=8$, above the curve $y=x^2$, and to the right of the $y$-axis.
3. The region $R$ is bounded by $2x+y=3$, $y=x$, and $x=0$.

We're now ready to discuss double integrals. Just as single integrals gave us the area under a function over an interval, double integrals will give us the volume under a function, above a region in the plane. We'll introduce double integrals by looking at cross sections of a solid. You did this in first semester calculus, but you always used geometric shapes, for which we know the area, to create the cross sections. Let's start with a review of this idea, and then jump into double integrals.

Consider the parabola $z=9-x^2$ for $0\leq x\leq 3$. Revolve this parabola half way around the $z$-axis, and compute the volume of the solid that is inside the paraboloid and above the $xy$-plane. Do so by considering horizontal semicircular cross sections.
The area of each cross section is the area of a semicircle, which is $A=\frac{1}{2}\pi r^2 = \frac12 \pi x^2$ as the radius is $x$. We thicken each cross section up by multiplying by $dz$, the height of each circular disc. Since the height has a $dz$, we replace $x$ with $x=\sqrt{9-z}$ in the area formula to get a little bit of volume as $dV = \frac{1}{2}\pi (\sqrt{9-z})^2 dz$. The $z$ values range from $0$ to $9$, which means the volume of the solid is the integral $$V =\int_0^9 \frac{1}{2}\pi (\sqrt{9-z})^2 dz =\frac{\pi}{2}\int_0^9 9-z dz =\frac{\pi}{2} \left(9z-\frac{z^2}{2}\right)\bigg|_0^9 =\frac{81\pi}{4}$$

Let's now consider the exact same solid, but instead of cutting horizontally, let's cut the object vertically. The first problem has you cut the solid up using slices that are parallel to the $x$-axis (so keeping $y$ constant). The next has you repeat the problem, but this time using vertical slices that are parallel to the $y$-axis (so keeping $x$ constant). The idea is exactly the same. Just find the area of a slice, thicken it up (using $dx$ or $dy$), and then integrate.

See Sage.
Consider the solid domain $D$ in space that is beneath the surface $f(x,y)=9-x^2-y^2$ and above the $xy$-plane, where the $x$ values satisfy $x\geq 0$. The region is half of a parabolic solid. Our goal in this problem is to find the volume of the solid $D$.
1. Please click on this sage link. In this picture, you'll see the solid $D$ drawn. You'll also see several cross sections of the surface (half parabolas), each one obtained by letting $y$ equal a constant ($y=-2, -1,0,1,2$).
2. When $y_i=0$, the half parabola has area $\int_0^3 9-x^2dx$. When $y_i=2$, the half parabola has area $\int_0^? 5-x^2dx$. When $y=y_i$, explain why the area of each of the cross sections from the first part is $$A_{y=y_i}=\ds \int_0^{\sqrt{9-y_i^2}} (9-x^2-y_i^2) dx.$$
3. In the first Sage picture above, we cut the solid into 6 pieces. We could cut the solid into more pieces. Click on this Sage link to see what happens if we cut the solid into 12 pieces, and then fatten up each cross section by $dy=1/2$ units, obtaining 12 tiny bits of volume $dV$. Explain why the total volume of the solid $D$ equals $$\ds\int_{-3}^{3} \left(\int_0^{\sqrt{9-y^2}}(9-x^2-y^2) dx\right) dy.$$
%
• Use a computer to first compute the inside integral (you should have $y$ values left after you integrate the inside), and then compute the outside integral (which should leave you with a single number). This number is the volume of $D$.

The integral above is called an iterated integral because you first compute the inside integral and then you compute the outside integral (you iteratively integrate). Often the parenthesis are not written because we know that the inside integral should be performed first without writing the parenthesis. We could also explicitly emphasize which variables go with each bound by writing $$\ds\int_{y=-3}^{y=3} \left(\int_{x=0}^{x=\sqrt{9-y^2}}9-x^2-y^2 dx\right) dy.$$ This latter approach is not commonly used, but can save a beginner from making simple errors.

Click on this Sage link to see a picture of how you could obtain this answer by considering cross sections.
The bounds of the integral $$\ds\int_{-3}^{3} \left(\int_0^{\sqrt{9-y^2}}(9-x^2-y^2) dx\right) dy$$ describe a region $R$ in the plane, namely $$-3\leq y\leq 3 \quad\text{and}\quad 0\leq x\leq \sqrt{9-y^2}.$$ Draw this region $R$ in the $xy$-plane. Then give bounds to describe the region alternately by first stating constants which trap $x$ (so $a\leq x\leq b$) and then functions which trap $y$ (so $c(x)\leq y \leq d(x)$). Use these new bounds to write an iterated integral $$\ds\int_{x=a}^{x=b} \left(\int_{y=c(x)}^{y=d(x)}9-x^2-y^2 dy\right) dx$$ that gives the exact same volume of the solid $D$ from the previous problem.
%Ask me in class to show you how the answer to the previous problem could have been obtained by considering cross sections of the original solid
%
See Sage.
% %Consider the solid domain $D$ in space that is beneath the surface $f(x,y)=9-x^2-y^2$ and above the $xy$-plane, where the $x$ values satisfy $x\geq 0$. The region is half of a parabolic solid. Our goal in this problem is to find the volume of the solid $D$. This is the same solid referred to in the previous two problems. %
1. %
2. Draw the solid $D$. %
3. The plane $x=0$ intersects the solid in a parabola $z=9-y^2$. Sketch this parabola in your 3D drawing. The area under this parabola is $A_{x=0} = \int_{-3}^3 9-(0)^2-(y)^2 \ dy$. % Similarly, the plane $x=1$ intersects the solid in half a parabola $z=9-1^2-y^2$. Sketch this parabola in your 3D drawing. Find a values $c$ and $d$ so that the area under this parabola is given by the formula $A_x(1)=\int_c^{d} 9-(1)^2-(y)^2 \ dy$. %
4. The plane $x=2$ intersects the solid in half a parabola (draw this parabola). Find the values $c$ and $d$ so that the area under this parabola is $A_x(2)=\int_c^d 9-(2)^2-(y)^2 \ dx$. %
5. You should obtain an inequality $a\leq x\leq b$ where $a$ and $b$ are constants. For $c\leq y\leq d$, you should have functions of $x$ for both $c$ and $d$. If both involve square roots, you're on the right track.
%For which $x$-values $x_0$ does the plane $x=x_0$ intersect the paraboloid. For each of these values, what should $c$ and $d$ equal so that $A_x(x_0) = \int_c^d 9-x_0^2-y^2 dy$ gives the area under the half parabola obtained when the plane $x=x_0$ intersects the surface. %
6. Imagine now that you cut the surface into 6 pieces, using the plane $x=x_0$ for each $x_0$ in $\{0,0.5,1,1.5,2, 2.5,3\}$. Let $x_0=0$, $x_1=0.5$, $\ldots$, $x_{6}=3$. The change in $x$ between each point is $dx=0.5$. % In the plane $x=x_i$, we know the area under the surface is $A_x(x_i) = \int_{c_i}^{d_i} 9-(x_i)^2-y^2 dy$ (where you found $c_i$ and $d_i$ in the last part). If we multiply this area by the thickness $dx=0.5$, we obtain the volume of a solid (think $dV=(A_x)dx$). Draw this solid in your picture for $x_i = 1$. %
7. Explain why the volume of $D$ equals $\ds\int_{0}^{3} \left(\int_{-\sqrt{9-x^2}}^{\sqrt{9-x^2}}9-x^2-y^2 dy\right) dx$. %
8. Use a computer to first compute the inside integral (you should have $x$ values left after you integrate the inside), and then compute the outside integral (which should leave you with a single number). This number is the volume of $D$. %
%
%The first two problems show that the volume of $D$ can be given by %$$V=\ds\int_{-3}^{3} \left(\int_0^{\sqrt{9-y^2}}9-x^2-y^2 dx\right) dy = \ds\int_{0}^{3} \left(\int_{-\sqrt{9-x^2}}^{\sqrt{9-x^2}}9-x^2-y^2 dy\right) dx.$$ %We have two completely different iterated integrals that result in the exact same volume. In both integrals, the bounds on $x$ and $y$ describe a semicircular region $R$ in the $xy$ plane. The region $R$ is fully described by using the inequalities $-3\leq y\leq 3$ and $0\leq x\leq \sqrt{9-y^2}$ from the first integral, or using the inequalities $0\leq x\leq 3$ and $-\sqrt{9-x^2}\leq y\leq \sqrt{9-x^2}$ from the second integral.
I have not formally defined a definite integral. I will probably do that next semester, when I have more time. Right now, I'll lecture that bit in class. It will get added at some point, provided it is needed. I'm not really sure I want to formally define it in the problem set. It's never formally USED in textbooks (though formally define). Perhaps the best spot for the formal definition is in an analysis course.
In the two problems above, we computed the volume of solid by considering cross sections of the solid. We could also cut the solid up in both the $x$ and $y$ dimensions. This would result in tiny rectangles in the $xy$ plane with area $dA=dxdy=dydx$, and the solid would have height $f(x,y)$ above these rectangles. This means we would have a little bit of volume written as $$dV=fdA=fdxdy=fdydx.$$ Adding up these little bits of volume gives us the double integral $$V = \iint_R fdA=\iint_R fdydx=\iint_R fdxdy.$$ We can either set up the bounds with $x$ on the inside, or $y$ on the inside. We'll get the same answer. When we set up the integral with bounds, we call it an iterated integral, and write. $$\ds \int_a^b \int_{c(x)}^{d(x)}f(x,y)dydx \quad \text{or} \quad \ds \int_c^d \int_{a(y)}^{b(y)}f(x,y)dxdxy.$$
A double integral is written $\ds \iint_R f(x,y)dA$. We just have to state what the region $R$ is to talk about a double integral. The formal definition of a double integrals involves slicing the region $R$ up into tiny rectangles of area $dxdy$, multiplying each rectangle by a height $f$, and then summing over all rectangles. This process is repeated as the length and width of the rectangles shrinks to zero at similar rates, with the double integral being the limit of this process. An iterated integral is a double integral where we have actually set up the bounds as either $$\ds \int_a^b \int_{c(x)}^{d(x)}f(x,y)dydx \quad \text{or} \quad \ds \int_c^d \int_{a(y)}^{b(y)}f(x,y)dxdxy.$$ We'll focus mostly on setting up iterated integrals in this course.
Consider the region $R$ in the plane that is bounded by the line $y=x+2$ and the parabola $y=x^2-4$. Distances are measured in $cm$.
1. Draw the region $R$, and give bounds of the form $a\leq x\leq b$, $c(x)\leq y\leq d(x)$ to describe the region.
2. A metal plate occupies the region $R$. The metal plate was constructed to have a density of $\delta (x,y)=(y+4)$ g/$cm^2$. Explain why the mass of the plate is the double integral $\ds\iint_R \delta dA$.
3. Check your work with this Double Integral Checker written in Sage.
Compute the double integral $\ds\iint_R (y+4) dA$ by setting up an iterated integral (use the bounds from part 1) and then performing each integral. Start with the inside integral, and then compute the outside integral. Check your work with the link in the margin. You can use this Sage link to check any double integral. If you think you have the bounds right, use this Sage link to draw the region your bounds describe. If it doesn't the draw the region you thought, then your bounds are off. Trial and error is a powerful tool here. You've got to try, and fail, and then make adjustments. This is the key to mastering double integrals.
Consider the iterated integral $\ds \int_0^3\int_x^3 e^{y^2}dydx$.
1. Write the bounds as two inequalities ($0\leq x\leq 3$ and $?\leq y\leq ?$). Then draw and shade the region $R$ described by these two inequalities.
2. Swap the order of integration from $dydx$ to $dxdy$. This forces you to describe the region using two inequalities of the form $c\leq y\leq d$ and $a(y)\leq x\leq b(y)$. This is the key.
3. Use your new bounds to compute the integral by hand (you'll need a $u$-substitution $u=y^2$ on the outer integral).
4. Now use Sage to check your work. Then also use Sage to compute the original the original integral $\ds \int_0^3\int_x^3 e^{y^2}dydx$, and tell us what the inner integral equals (if you see $i$, $\sqrt{\pi}$, and erf, then you did this correctly).
%
Consider the region $R$ in the plane that is trapped between the curves $x=2y$ and $x=y^2$. We would like to compute $\iint_R (-y) dA$ over this region $R$. Set up both iterated integrals. Then compute one of them. Explain why your answer is negative.
In the line integral chapter, we introduce the ideas of average value, centroid, and center of mass. We now extend those ideas to regions in the plane, in exactly the same way. For example, the average value formula in the line integral section was $\bar f = \dfrac{\int_C fdx}{\int_C ds}$. For double integrals, we just change $ds$ to $dA$, and add an integral.
Average value formula
This gives the formula $\bar f = \dfrac{\iint_R fdA}{\iint_R dA}.$ The same substitution works on all the integrals from before. We now have $dm = \delta dA$ instead of $dm=\delta ds$, as now density is a mass per area, instead of a mass per length. We obtained the arc length of a curve $C$ by computing $s=\int_C ds$, as we just add up little bits of arc length. We can obtain the area of a region $R$ by computing $A=\iint_R dA$, as we just add up little bits of area.
Centroid Formula
The centroid of a region $R$ in the plane is $$\left(\bar x = \frac{\iint_R x dA}{\iint_R dA}, \bar y = \frac{\iint_R y dA}{\iint_R dA}\right)$$
Center of Mass Formula
and the center of mass is $$\left(\bar x = \frac{\iint_R x dm}{\iint_R dm}, \bar y = \frac{\iint_R y dm}{\iint_R dm}\right), \text{ where dm=\delta dA}.$$ %I talk about inertial and radii of gyration in my course. Jason, I think you leave it out. That's why I commented out this portion. I decided to more this from the line integral to the double integral chapter. Here it is.
I used the variable $d$ to stand for radius of rotation. I DO NOT use $r$ because too many students replace it with the polar coordinate $r$, especially when we get to double integrals. I tried $d$, but now students were thinking it was a differential. I need a different variable. I've used $(rad)^2$ before, and it works, it's just awkward. Jason, if you have a good idea, email me. I would like to discuss this. We could use $(\text{dist})^2$ or $(\text{radius of rotation})^2$. Maybe the last is the best. However, I would really like to write $I=\int ?^2 dm$ without it taking up half a board. A variable would be good. Capital $R$ doesn't work.
One of the main reasons we are studying mass, center of mass, centroids, etc., is so that we can understand energy. The transfer of energy (for example from kinetic to electrical and then back from electrical to kinetic) is one of the most important ideas in modern innovations. Some of you may have already had a physics class, in which you learned that the kinetic energy of an object with mass $m$ moving at speed $v$ is $$KE = \frac{1}{2}mv^2.$$ If an object has a large mass, it takes a lot of work (transfer of energy) to get the object moving. Mass is an object's resistance to straight line motion. When something rotates, we need a handy way to compute its kinetic energy. We'll show that the kinetic energy of an object that is rotating about a line $L$, and has an angular velocity of $\omega$ radians per second about the line, is precisely
Compare the two formulas $KE = \frac{1}{2}mv^2$ and $KE = \frac{1}{2}I\omega^2$. If we replace speed with angular speed, then we replace mass with inertia. Heavy objects are hard to push. Objects with large inertia are hard to rotate. Just as mass is an objects resistance to being moved, inertia is an objects resistance to being rotated. Engineers build I-beams so that a large portion of the mass is far from the axis of rotation. This causes a large inertia, which prevents I-beams from rotating.
$$KE = \frac{1}{2}I \omega^2,$$ where $I$ is the (second) moment of inertia. If an object has a large inertia, it takes a lot of work (transfer of energy) to get the object rotating. Inertia is like an object's resistance to rotational motion.
We can obtain the moment of inertia by integrating $I=\iint_R (d)^2 dm$ where $d$ is the radius of rotation about the axis $L$ of rotation, which means that $d$ is distance from a point $(x,y,z)$ to the axis of rotation $L$. If the line $L$ is one of the coordinate axes, then we obtain the key formulas $$I_x = \iint_R (y^2)dm,\quad I_y = \iint_R (x^2)dm,\quad I_z = \iint_R (x^2+y^2)dm .$$
If you have never worked with kinetic energy before, you may skip the next problem and then just practice using these formulas.
% \instructor{One student asked if this had to do with figure skating. OF course. I spun around in a circle with my arms out, and then quickly brought them in. I also like to pick up a table/desk, and show them how easy it is to rotate the object if I use an axis near the center. Then I try to grab the edge of the desk and rotate it, it doesn't work. The only real thing I want them to master is that the inertia gets really large (grows quadratically) with distance to an axis. So I do something memorable to help them remember that. We just did the normal acceleration problem in the motion unit, so I try to connect it to that.}% Suppose that an object, whose mass is $m$, is attached to a string (whose mass is so small we'll ignore it). We rotate the object about a point, where the angular velocity is $\omega$ radians per second. The length of the string (distance from the point to the center of rotation) is $d$.
1. Explain why the speed of the object $v=\omega d$.
2. We know an object's kinetic energy $KE=\frac{1}{2}mv^2$.
The quantity $I=d^2m$ is called the moment of inertia. However, this formula assumes that all the mass is located at a single point.
Explain why the kinetic energy of the rotating object is $KE = \frac{1}{2}d^2m\omega^2$.
3. Let's take our object, located at the point $P(x,y)$, and rotate it about the $x$-axis, still with angular velocity $\omega$. Find the kinetic energy of this point. [All you need is the distance $d$ from the point $P(x,y)$ to the $x$-axis.]
4. We can think of a region $R$ in the plane as thousands of points $P(x,y)$, each with mass $dm=\delta dA$. As we rotate an entire object about the $x$-axis with angular velocity $\omega$, each little piece contributes a small amount of kinetic energy. Explain why the total kinetic energy of the region $R$, when rotated about the $x$ axis at angular speed $\omega$, is
The inertia about the $x$ axis is $I_x = \ds \iint_R (y^2)dm = \iint_R (y^2)\delta dA$.
$$KE= \frac{1}{2}\left(\iint_R (y^2)dm\right)\omega^2$$.
5. How does the formula above change if we instead rotate about the $y$-axis? What if we rotate about the origin?
Feel free to ask in class about how this connects to figure skating.
Consider the triangular region $R$ in the first quadrant, bounded by the line $\ds \frac{x}{5}+\frac{y}{7}=1$. Assume that the density of the object is a constant $\delta = c$.
1. Draw the region $R$, and give bounds for performing double integrals over this region. Check your answer with Sage (use any $f$ you want for the integrand, it doesn't matter as you just want to make sure you got the bounds right).
2. Set up an integral formula to compute the center of mass $\bar x$ of the region $R$. Compute any integrals by hand to show that $\bar x = \frac{5}{3}$.
Remember you can check your work with Sage.
Then state a guess for $\bar y$.
3. Set up an integral formula to compute the moments of inertia $I_x$, $I_y$, and $I_z$. Use technology to compute $I_x$.
4. You're welcome to compare your answers with known lists, such as this list on Wikipedia.
If the triangular region had its corners at $(0,0)$, $(b,0)$, and $(0,h)$, state the center of mass $\bar x$ and the moment of inertia $I_x$. You should be able to complete this part by replacing the 5's and 7's in your formula with $b$'s and $h$'s, provided you first factor any really large numbers, like $1715 = 5\cdot 343=5\cdot 7\cdot ?...$ (I'll let you finish factoring).
When we found average value, we wanted a height $\bar f$ such that the area under $f$ and the area under $\bar f$ were the same. As an equation, we wrote $$\iint_R \bar f dA = \iint_R f dA,$$ and then since $\bar f$ is constant, we pulled it out of the integral, and then solved for $\bar f$ to get $$\bar f \iint_R dA = \iint_R f dA \quad \text{or}\quad \bar f = \frac{\iint_R f dA }{\iint_R dA} .$$ This same process gives the center of mass. We could replace the variable distance $x$ in $\int_C x dm$ with the constant distance $\bar x$, and then solve for $\bar x$ in the equation $\int_C \bar xdm = \int_C x dm$. If all the mass were located at one spot, what would that spot have to be for the first moments of mass to be the same. The radii of gyration are obtained in the exact same manner. We'll think of a radius of gyration as a rotational center of mass.
% % Suppose a planar region $R$ has density $\delta(x,y)$. The inertia about a line $L$ we know is $I_x=\iint_R d^2 \delta(x,y)dA$, where $d$ is the radius of rotation (distance to the line $L$). What constant radius $R$ should we replace the variable radius $d$ with so that $\int_C R^2 dm = \int_C d^2 dm$. Explain why the radius of rotation about the $z$-axis is $$R_z = \sqrt{\frac{\iint_R (x^2+y^2)\delta(x,y)dA}{\iint_R \delta(x,y)dA}}.$$ [Hint: Remember that $R$ is constant. Read the paragraph above.]
You only needed to show how to obtain the radius of gyration about the $z$ axis. All three radii of gyration are found using the formulas $$R_x = \sqrt{\frac{\iint_R (y^2+z^2)dm}{\iint_R dm}},\quad R_y = \sqrt{\frac{\iint_R (x^2+z^2)dm}{\iint_R dm}}, \text{ and } R_z = \sqrt{\frac{\iint_R (x^2+y^2)dm}{\iint_R dm}}.$$ where $dm=\delta(x,y) dA$. Note that in 2 dimensions, we have $z=0$, so the formulas for $R_x$ and $R_y$ are simpler. %ends the part that involves the radius of gyration.
Consider the rectangular region $R$ in the $xy$-plane described by $\{(x,y)\ |\ 2\leq x\leq 11, 3\leq y\leq 7\}$.
1. Set up an integral formula which would give $\bar y$ for the centroid of $R$. Then evaluate the integral.
2. State $\bar x$ from geometric reasoning.
3. Set up an integral to give the moment of inertia about the $y$-axis if $\delta=5$. Note that $z=0$ in the $xy$-plane.
4. Set up an integral to give the $R_x$ if the density is $\delta(x,y)=xy^2$.
Consider the region in the plane that is bounded by the curves $x=y^2-3$ and $x=y-1$. A metal plate occupies this region in space, and its temperature function on the plate is give by the function $T(x,y)=2x+y$. Find the average temperature of the metal plate.
\label{centroid trick} Consider the region $R$ that is the circular disc which is inside the circle $(x-2)^2+(y+1)^2=9$. The centroid is clearly $(2,-1)$, and the area is $A=\pi(3)^2=9\pi$. We can use these fact to simplify many integrals that require integrating over the region $R$.
1. Compute $\iint_R 3dA = 3\iint_RdA$. [How can area help you?]
2. Explain why $\iint_R x dA = \bar x A$ for any region $R$, and then compute $\iint_R x dA$ for the circular disc. [You don't need to set up any integrals at all.]
3. Compute the integral $\iint_R 5x+2y dA$ by using centroid and area facts.
Consider the region $R$ in the $xy$-plane that is formed from two rectangular regions. The first region $R_1$ satisfies $x\in[-2,2]$ and $y\in[0,7]$. The second region $R_2$ satisfies $x\in[-5,5]$ and $y\in[7,10]$. Find the centroids of $R_1$, $R_2$ and then finally $R$.
%[Suggestion: Work with variables from the start. For the first region, let $x\in[-a,a]$ with $y\in[0,c]$. For the second region, let $x\in[-b,b]$ with $y\in[c,d]$. Solve the problem first with variables, and then plug in the numbers. You may need to split your integrals up into two integrals, as $\iint_R ydA = \iint_{R_1}ydA +\iint_{R_2}ydA$.]
Let $R$ be the region in the plane with $a\leq x\leq b$ and $g(x)\leq y\leq f(x)$. Let $A$ be the area of $R$.
When you use double integrals to find centroids, the formulas for the centroid are the same for both $\bar x$ and $\bar y$. In other courses, you may see the formulas on the left, because the ideas will be presented without requiring knowledge of double integrals. Integrating the inside integral from the double integral formula gives the single variable formulas.
1. Set up an iterated integral to compute the area of $R$. Then compute the inside integral. You should obtain a familiar formula from first-semester calculus.
2. Set up an iterated integral formula to compute $\bar x$ for the centroid. By computing the inside integral, show why $\ds\bar x = \frac{1}{A}\int_a^b x (f-g)dx$.
3. If the density depends only on $x$, so $\delta = \delta (x)$, set up an iterated integral formula to compute $\bar y$ for the center of mass. Explain why $$\ds\bar y = \frac{1}{mmahtmath}\int_a^b \frac{1}{2}(f^2-g^2)\delta(x)dx.$$

# Switching Coordinates: The Jacobian

We now want to explore how to perform $u$-substitution in high dimensions. Let's start with a review from first semester calculus.

Consider the integral $\ds\int_{-1}^4 e^{-3x} dx$.
1. Let $u=-3x$. Solve for $x$ and then compute $dx$.
2. Explain why $\ds\int_{-1}^4 e^{-3x} dx=\int_{3}^{-12}e^u \left(-\frac{1}{3}\right)du$.
3. Explain why $\ds\int_{-1}^4 e^{-3x} dx=\int_{-12}^{3}e^u \left|-\frac{1}{3}\right| du$.
4. If the $u$-values are between $-3$ and $2$, what would the $x$-values be between? How does the length of the $u$ interval $[-3,2]$ relate to the length of the corresponding $x$ interval?
In the problem above, we used a change of coordinates $u=-3x$, or $x=-1/3 u$. By taking derivatives, we found that $dx=-\frac{1}{3}du$. The negative means that the orientation of the interval was reversed. The fraction $\frac13$ tells us that lengths $dx$ using $x$ coordinates will be $1/3$rd as long as lengths $du$ using $u$ coordinates. When we write $dx = \frac{dx}{du}du$, the number $\frac{dx}{du}$ is called the Jacobian of $x$ with respect to $u$. The Jacobian tells us how lengths are altered when we change coordinate systems. We now generalize this to polar coordinates. Before we're done with this section, we'll generalize the Jacobian to any change of coordinates.
Consider the polar change of coordinates $x=r\cos\theta$ and $y=r\sin\theta$, which we could just write as $$\vec T(r,\theta)=(r\cos\theta,r\sin\theta).$$
1. Compute the derivative $D\vec T(r,\theta)$. You should have a 2 by 2 matrix.
2. We need a single number from this matrix that tells us something about area. Determinants are connected to area. Compute the determinant of $D\vec T(r,\theta)$ and simplify.
The determinant you found above is called the Jacobian of the polar coordinate transformation. Let's summarize these results in a theorem.
Ask me in class to give you an informal picture approach that explains why $dxdy=rdrd\theta$.
% If we use the polar coordinate transformation $x=r\cos\theta, y=r\sin\theta$, then we can switch from $(x,y)$ coordinates to $(r,\theta)$ coordinates if we use $$dxdy=|r|drd\theta.$$ The number $|r|$ is called the Jacobian of $x$ and $y$ with respect to $r$ and $\theta$. If we require all bounds for $r$ to be nonnegative, we can ignore the absolute value. If $R_{xy}$ is a region in the $xy$ plane that corresponds to the region $R_{r\theta}$ in the $r\theta$ plane (where $r\geq 0$), then we can write $$\iint_{R_{xy}} f(x,y) dxdy = \iint_{R_{r\theta}} f(r\cos\theta,r\sin\theta) r\ drd\theta.$$
We need some practice using this idea. We'll start by describing regions using inequalities on $r$ and $\theta$.
% Some day I would like to have them draw this picture themselves, but for now I'll do it. They are getting tired (it's near the end of the semester). I'll just give this one to them. %
% Polar coordinate picture idea. Introduce visually why $r$ should be the Jacobian. %
For each region $R$ below, draw the region in the $xy$-plane. Then give a set of inequalities of the form $a\leq r\leq b, \alpha(r)\leq \theta \leq \beta(r)$ or $\alpha<\theta<\beta, a(\theta)\leq r\leq b(\theta)$. For example, if the region is the inside of the circle $x^2+y^2=9$, then we could write $0\leq \theta\leq 2\pi$, $0\leq r\leq 3$.
1. The region $R$ is the quarter circle in the first quadrant inside the circle $x^2+y^2=25$.
2. The region $R$ is below $y=\sqrt{9-x^2}$, above $y=x$, and to the right of $x=0$.
3. The region $R$ is the triangular region below $y=\sqrt 3 x$, above the $x$-axis, and to the left of $x=1$.
See Sage.
% Consider the opening problem for this unit. We want to find the volume under $f(x,y)=9-x^2-y^2$ where $x\geq0$ and $z\geq 0$. We obtained the integral formula $$\iint_R f dA = \ds\int_{y=-3}^{y=3} \int_{x=0}^{x=\sqrt{9-y^2}}9-x^2-y^2 dx dy.$$
1. Write bounds for the region $R$ by giving bounds for $r$ and $\theta$.
2. Rewrite the double integral as an iterated integral with bounds for $r$ and $\theta$. Don't forget the Jacobian (as $dxdy=rdrd\theta$).
%Your integral should look something like %$$\iint_R f dA = \ds\int_{\theta=?}^{\theta=?} \int_{r=?}^{r=?} (9-x^2-y^2) r\ dr\right) d\theta.$$
3. Compute the integral in the previous part by hand. [Suggestion: you'll want to simplify $9-x^2-y^2$ to $9-r^2$ before integrating.]
Find the centroid of a semicircular disc of radius $a$ ($y\geq 0$). Actually compute any integrals. After doing this, in class we'll set up the integral formulas needed to find $R_y$, the radius of gyration about the $y$-axis, assuming the density is $\delta(x,y)=x^2+y^2$.
This is a great place to comment in class about the ability to do the integrals separately.
Compute the integral $\ds \int_{0}^{1}\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}} \frac{2}{(1+x^2+y^2)^2}dydx$. [Hint: try switching coordinate systems to polar coordinates. This will require you to first draw the region of integration, and then then obtain bounds for the region in polar coordinates.]
Optional problem:
The problem about integrating $e^{-x^2}$ from 0 to infinity. Make it optional, and then give them some hints. I'll work on this next semester. I want to prepare them for the normal distribution. Any student who want to tackle this problem should be asked if they want to become a math major. :)
We're now ready to define the Jacobian of any transformation.
Suppose $\vec T(u,v)=(x(u,v),y(u,v))$ is a differentiable coordinate transformation. To find the Jacobian of this transformation, we first find the derivative of $\vec T$. This is a square matrix, so it has a determinant, which should give us information about area. As the determinant may be positive or negative, we then take the absolute value to obtain the Jacobian. So the Jacobian of the transformation $\vec T$ is the absolute value of the determinant of the derivative.
For a tongue twister, say “the absolute value of the determinant of the derivative” ten times really fast.
Notationally we write $$J(u,v) = \frac{\partial (x,y)}{\partial (u,v)} = |\det(D\vec T(u,v))|.$$
Consider the transformation $u=x+2y$ and $v=2x-y$.
1. Solve for $x$ and $y$ in terms of $u$ and $v$. Then compute the Jacobian $\frac{\partial (x,y)}{\partial (u,v)}$.
2. We were give $u$ and $v$ in terms of $x$ and $y$, so we could have directly computed $\frac{\partial (u,v)}{\partial (x,y)}$. Do so now.
3. Make a conjecture about the relationship between $\frac{\partial (x,y)}{\partial (u,v)}$ and $\frac{\partial (u,v)}{\partial (x,y)}$.
There are a lot of different uses of the word Jacobian. It sometimes includes the absolute value, sometimes does not. Sometimes you stop at the derivative, sometimes you take the determinant. Which one is correct? I'm going with the one that includes the absolute values as well. That way I can say $r$ is the Jacobian for polar, and for spherical we have $\rho^2\phi$ (not $-\rho^2\phi$). If we want to address this in general, it should be in an appendix, with maybe a marginpar or footnote.
Suppose that $f$ is integrable over a region $R_{xy}$ in the $xy$ plane. Suppose that $\vec T(u,v)=(x(u,v),y(u,v))$ is a coordinate transformation that has the Jacobian $\ds \frac{\partial (x,y)}{\partial (u,v)}$. Suppose the region $R_{uv}$ in the $uv$-plane corresponds to the region $R_{xy}$ in the $xy$-plane. Provided the Jacobian is nonzero except possibly on regions with zero area, we can then write $$\iint_{R_{xy}} f(x,y) dxdy = \iint_{R_{uv}} f(x(u,v),y(u,v)) \frac{\partial (x,y)}{\partial (u,v)} dudv.$$ We can remember this in differential form as $$dxdy = \frac{\partial (x,y)}{\partial (u,v)} dudv.$$
Let's use this to rapidly find the area inside of an ellipse.
Consider the region $R$ inside the ellipse $\left(\dfrac{x}{a}\right)^2+\left(\dfrac{y}{b}\right)^2=1$. We'll consider the change of coordinates given by $u=(x/a)$ and $v=(y/b)$.
1. Draw the region $R$ in the $xy$-plane. After substituting $u=x/a$ and $v=y/b$, draw the region $R_{uv}$ in the $uv$-plane. You should have a circle. What is the area inside this circle in the $uv$-plane?
2. Solve for $x$ and $y$, and then compute the Jacobian $\dfrac{\partial (x,y)}{\partial (u,v)}$. Show how to get the same result from directly computing $\dfrac{\partial (u,v)}{\partial (x,y)}$.
3. We know the area in the $xy$-plane of the ellipse is $\iint_{R_{xy}} dxdy$. Use the previous theorem to switch to an integral over the region $R_{uv}$. Then evaluate this integral by using facts about area so prove that the area in the $xy$ plane is $\pi a b$. [Hint: you don't actually have to set up any bounds, rather just reduce this to an area integral over the region $R_{uv}$.]
Let $R$ be the region in the plane bounded by the curves $x+2y=1$, $x+2y=4$, $2x-y=0$, and $2x-y=8$. We want to compute the integral $\iint_R xdxdy$. Draw the region $R$ in the $xy$-plane. Use the change of coordinates $u=x+2y$ and $v=2x-y$ to evaluate this integral. Make sure you provide a sketch of the region $R_{uv}$ in the $uv$-plane (it should be a rectangle). [Hints: what are the bounds for $u$ and $v$? You'll want to solve for $x$ and $y$ in terms of $u$ and $v$, and then you'll need a Jacobian.]
This is problem 7 in section 15.8.
Use the transformation $u=3x+2y$ and $v=x+4y$ to evaluate the integral $$\iint_R (3x^2+14xy+8y^2)dxdy =\iint_R (3x+2y)(x+4y)dxdy$$ for the region $R$ that is bounded by the lines $y=-(3/2)x+1$, $y=-(3/2)x+3$, $y=-(1/4)x$, and $y=(-1/4)x+1$.
Here are some polar double integrals:
See page 653.
In this problem, you will develop a formula for finding area inside a polar curve.
1. Consider a circle of radius $r$. The area inside the circle is $\pi r^2$. This is the area inside when you traverse around the circle for a full $2\pi$ radians. Fill in the following table by finding the pattern that connects angle traversed to area inside.
{c|c} Angle traversed& Area inside\\ \hline $2\pi$ & $A=\pi r^2$\\ $\pi$ & \\ $\pi/2$ & \\ $\pi/4$ & \\ $d\theta$ & $dA=\quad\quad$
2. Explain why the area inside a polar curve $r=f(\theta)$ for $\alpha\leq \theta\leq \beta$ is $$A = \int dA = \int_\alpha^\beta \frac{1}{2}r^2d\theta.$$ What must be true about the curve $r=f(\theta)$ for this formula to be valid?
See 11.5: 1-20.
Find the area inside of the polar curve $r=\sin\theta$. [Hint: Construct a graph to determine the appropriate bounds for the integral. When you integrate, you'll need to use the half angle identity.]
Set up (do not evaluate) an integral to compute the area
1. inside the cardioid $r=2+2\sin\theta$, and
2. inside the circle $r=3\cos\theta$.
Set up (do not evaluate) an integral formula to compute the area that lies inside both $r=2-2\cos\theta$ and $r=\cos\theta$. Sketch both curves.

# Green's Theorem

Now that we have double integrals, it's time to make some of our circulation and flux problems from the line integral section get extremely simple. We'll start by defining the circulation density and flux density for a vector field $\vec F(x,y)=\left<M,N\right>$ in the plane.

\label{definition of flux density in 2D} Let $\vec F(x,y)=\left<M,N\right>$ be a continuously differentiable vector field. At the point $(x,y)$ in the plane, create a circle $C_a$ of radius $a$ centered at $(x,y)$, where the area inside of $C_a$ is $A_a=\pi a^2$. The quotient $\ds \frac{1}{A_a}\oint_{C_a} \vec F \cdot \vec T ds$ is a circulation per area. The quotient $\ds \frac{1}{A_a}\oint_{C_a} \vec F \cdot \vec n ds$ is a flux per area.
• We will not prove that the partial derivative expressions $N_x-M_y$ and $M_x+N_y$ are actually equal to the limits given here. That is best left to an advanced course.
% The circulation density of $\vec F$ at $(x,y)$ we define to be $$\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}=N_x-M_y = \lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} \vec F \cdot d\vec r = \lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} Mdx+Ndy.$$
• The divergence, or flux density, of $\vec F$ at $(x,y)$ we define to be $$\frac{\partial M}{\partial x}+\frac{\partial N}{\partial y}=M_x+N_y=\lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} \vec F \cdot \vec n ds = \lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} Mdy-Ndx.$$
In the definitions above, we could have replaced the circle $C_a$ with a square of side lengths $a$ centered at $(x,y)$ with interior area $A_a$. Alternately, we could have chosen any collection of curves $C_a$ which “shrink nicely” to $(x,y)$ and have area $A_a$ inside. Regardless of which curves you chose, it can be shown that $$N_x-M_y=\lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} \vec F \cdot \vec T ds \quad \text{ and } \quad M_x+N_y=\lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} \vec F \cdot \vec n ds.$$ To understand what the circulation and flux density mean in a physical sense, think of $\vec F$ as the velocity field of some gas.
• The circulation density tells us the rate at which the vector field $\vec F$ causes objects to rotate around points. If circulation density is positive, then particles near $(x,y)$ would tend to circulate around the point in a counterclockwise direction. The larger the circulation density, the faster the rotation. The velocity field of a gas could have some regions where the gas is swirling clockwise, and some regions where the gas is swirling counterclockwise.
• The divergence, or flux density, tells us the rate at which the vector field causes object to either flee from $(x,y)$ or come towards $(x,y)$. For the velocity field of a gas, the gas is expanding at points where the divergence is positive, and contracting at points where the divergence is negative.
We are now ready to state Green's Theorem. Ask me in class to give an informal proof as to why this theorem is valid.
I draw a curve. I then cut the interior up into little rectangular pieces, and ask them to consider the sum of the flux along every single little rectangular piece inside. I show them how the circulation (or flux) along any interior edge is computed twice but with opposite signs. This means that the integrals along every interior edge vanish. We then have the circulation along the entire edge equal to the sum of a bunch of tiny circulations. Multipy and divide by the area inside each rectangle. Taking a limit as the size of the rectangles shrinks to zero gives us a double integral of the circulation per area. This is Green's theorem
Let $\vec F(x,y)=(M,N)$ be a continuously differentiable vector field, which is defined on an open region in the plane that contains a simple closed curve $C$ and the region $R$ inside the curve $C$. Then we can compute the counterclockwise circulation of $\vec F$ along $C$, and the outward flux of $\vec F$ across $C$ by using the double integrals $$\oint_{C} \vec F \cdot \vec T ds=\iint_R N_x-M_y dA \quad \text{ and } \quad \oint_{C} \vec F \cdot \vec n ds=\iint_R M_x+N_y dA.$$

Let's now use this theorem to rapidly find circulation (work) and flux.

See 16.4 for more practice. Try doing a bunch of these, as they get really fast.
Consider the vector field $\vec F=(2x+3y,4x+5y)$. Start by computing $N_x-M_y$ and $M_x+N_y$. If $C$ is the boundary of the rectangle $2\leq x\leq 7$ and $0\leq y\leq 3$, find both the circulation and flux of $\vec F$ along $C$. You should be able to reduce the integrals to facts about area. [If you tried doing this without Green's theorem, you would have to parametrize 4 line segments, compute 4 integrals, and then sum the results.]
Consider the vector field $\vec F=(x^2+y^2,3x+5y)$. Start by computing $N_x-M_y$ and $M_x+N_y$. If $C$ is the circle $(x-3)^2+(y+1)^2=4$ (oriented counterclockwise), then find both the circulation and flux of $\vec F$ along $C$. You should be able to reduce the integrals to facts about the area and centroid.
Repeat the previous problem, but change the curve $C$ to the boundary of the triangular region $R$ with vertexes at $(0,0)$, $(3,0)$, and $(3,6)$. You can complete this problem without having to set up the bounds on any integrals, if you reduce the integrals to facts about area and centroids. You are welcome to look up the centroid of a triangular region without computing it.
% Let's finish by looking at some examples to see why the limit definition of circulation and flux density are equal to the partial derivative expressions $N_x-M_y$ and $M_x+N_y$. % %
The next two problems didn't go very well in class. There were a lot of questions about what they were showing. It might be that they should be put above the Green's Theorem problems, or they just might be poor problems. I'll try again next semester
%
% Consider the rotational vector field $\vec F = \left<-y,x\right>$. Consider the point $(x,y)=(0,0)$. Let $C_a$ be a circle of radius $a$ centered at $(0,0)$. %
1. %
2. Find the circulation of $\vec F$ along $C_a$. Don't use Green's theorem. %
3. Compute $\lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} Mdx+Ndy$. %
4. Compute $N_x-M_y$. Does it match the previous limit? %
5. As this vector field only causes rotation, the flux across any curve is zero. Without doing any computations, what should $M_x+N_y$ equal? Explain. Then actually compute $M_x+N_y$. %
%
% % %
% Consider the radial vector field $\vec F = \left<2x,2y\right>$. Consider the point $(x,y)=(0,0)$. Let $C_a$ be a circle of radius $a$ centered at $(0,0)$. %
1. %
2. Find the outward flux of $\vec F$ across $C_a$. Don't use Green's theorem. %
3. Compute $\lim_{a\to 0} \frac{1}{A_a}\oint_{C_a} Mdy-Ndx$. %
4. Compute $M_x+N_y$. Does it match the previous limit? %
5. If a field causes no circulation, then we call the field an irrotational vector field.
% % As this vector field is purely radial, the circulation along any curve is zero. Without doing any computations, what should $N_x-M_y$ equal? Explain. Then actually compute $N_x-M_y$. %
%