Grid: 4 × 4
Click & drag to orbit

A dome sits on a quarter-circle footprint. Rectangular columns approximate its volume - but what happens at the curved boundary?

Beyond Rectangles

In §4.1, we built double integrals over rectangular regions - neat grids of boxes that tile perfectly. But picture a lake whose shoreline curves. If we want total water volume, or total mass of an irregularly shaped plate, rectangles don't tile the region cleanly.

Here's the idea: we still overlay a grid of lines parallel to the axes, but we only count the small rectangles that lie inside the region $R$. Some rectangles straddle the boundary, partly in and partly out. Should we worry about them? Before you play with the visualization below, make a prediction: as you double the grid resolution, what happens to the number of boundary rectangles? Does it go up, down, or stay roughly the same?

Fully inside Boundary Outside
Inside: 8 | Boundary: 10

Surprising, right? The number of boundary rectangles actually increases (roughly proportional to $n$) - but each one is much smaller (area $\sim 1/n^2$). So the total area of boundary rectangles shrinks like $n \cdot (1/n^2) = 1/n \to 0$. The boundary becomes a thinner and thinner band. The sum over interior rectangles converges to the same limit whether we include boundary cells or not - the boundary contribution is negligible.

This is what lets us define the double integral over any region $R$ with a "reasonable" boundary (continuous boundary curves):

$$ \iint_R f(x,y)\,dA = \lim_{h\to 0}\sum_{i=1}^n f(x_i^*,y_i^*)\,\Delta_i A $$

Here $h$ is the mesh - the maximum diagonal of any sub-rectangle - and $(x_i^*,y_i^*)$ is any sample point inside the $i$-th rectangle. As long as $f$ is continuous on $R$ and the boundary of $R$ is made of smooth curves, this limit exists and doesn't depend on how we choose sample points.

Two Types of Regions

Knowing the double integral exists is one thing. To actually compute it, we need to turn it into iterated single integrals - and that means describing the region $R$ in a way that gives us bounds of integration.

There are two natural ways to describe a region:

Type I (vertical slices): For each $x$ in $[x_1, x_2]$, $y$ runs from a bottom curve $y_1(x)$ to a top curve $y_2(x)$. We sweep a vertical line across $R$.

Type II (horizontal slices): For each $y$ in $[y_1, y_2]$, $x$ runs from a left curve $x_1(y)$ to a right curve $x_2(y)$. We sweep a horizontal line across $R$.

Toggle below to see both descriptions of the quarter-circle $x^2 + y^2 \le 1$, $x \ge 0$, $y \ge 0$:

Type I: $\;0 \le x \le 1$, $\;0 \le y \le \sqrt{1-x^2}$

Common mistake: Choosing the wrong type can make an integral much harder - or even impossible to evaluate in closed form. Here's a striking example. Try this integral:

$$\int_0^1\int_0^x e^{y^2}\,dy\,dx$$

The inner integral $\int_0^x e^{y^2}\,dy$ has no closed form - we're stuck, just like the non-elementary integrals from §4.2. But sketch the region: it's the triangle where $0 \le y \le x \le 1$. Switching to Type II, $y$ ranges from $0$ to $1$, and for each $y$, $x$ goes from $y$ to $1$:

$$\int_0^1\int_y^1 e^{y^2}\,dx\,dy = \int_0^1 (1-y)\,e^{y^2}\,dy$$

Now $e^{y^2}$ is just a function of $y$ - the inner integral was trivial! A substitution $u = y^2$ finishes it off. The lesson: always sketch the region and consider both orders before diving in.

Iterated Integrals over General Regions

Here is the key theorem that converts a double integral into something we can actually compute:

$$ \iint_R f(x,y)\,dA = \int_{x_1}^{x_2}\!\left[\int_{y_1(x)}^{y_2(x)} f(x,y)\,dy\right]dx $$

This works for any Type I region. For Type II, the roles of $x$ and $y$ swap:

$$ \iint_R f(x,y)\,dA = \int_{y_1}^{y_2}\!\left[\int_{x_1(y)}^{x_2(y)} f(x,y)\,dx\right]dy $$

Let's walk through Kaplan's example. We want $\iint_R (x^2+y^2)\,dA$ over the quarter-circle $R$: $0 \le x \le 1$, $0 \le y \le \sqrt{1-x^2}$.

Before we compute, let's build some intuition. The function $f = x^2 + y^2$ equals the squared distance from the origin. Over our quarter-circle (radius 1), this ranges from $0$ at the origin to $1$ at the boundary. The area of the quarter-circle is $\pi/4 \approx 0.785$. If $f$ averaged, say, about $0.5$ over the region, we'd guess the integral is roughly $0.5 \times 0.785 \approx 0.4$. Keep that ballpark in mind.

Step 1: Inner integral (integrate in $y$, treating $x$ as constant)

$$\int_0^{\sqrt{1-x^2}} (x^2+y^2)\,dy = \left[x^2 y + \frac{y^3}{3}\right]_0^{\sqrt{1-x^2}} = x^2\sqrt{1-x^2} + \frac{(1-x^2)^{3/2}}{3}$$

Step 2: Outer integral

$$\int_0^1 \left[x^2\sqrt{1-x^2} + \frac{(1-x^2)^{3/2}}{3}\right]dx$$

This is doable but messy in Cartesian. Whenever the region is a disk or part of one and the integrand involves $x^2 + y^2$, polar coordinates are calling to us. Let $x = r\cos\theta$, $y = r\sin\theta$, $dA = r\,dr\,d\theta$. The quarter-circle becomes $0 \le r \le 1$, $0 \le \theta \le \pi/2$, and $x^2 + y^2 = r^2$:

$$\int_0^{\pi/2}\!\int_0^1 r^2 \cdot r\,dr\,d\theta = \int_0^{\pi/2}d\theta \cdot \int_0^1 r^3\,dr = \frac{\pi}{2}\cdot\frac{1}{4}$$

$$ \iint_R (x^2+y^2)\,dA = \frac{\pi}{8} \approx 0.3927 $$

That's close to our ballpark estimate of $0.4$ - a good sign. The average value of $r^2$ over the unit quarter-disk turns out to be exactly $1/2$, and $1/2 \times \pi/4 = \pi/8$. Satisfying when the prediction and the algebra agree.

Below, watch the 3D visualization. The surface $z = x^2 + y^2$ sits above the quarter-circle, and columns approximate the volume beneath it:

Volume under z = x² + y²
Click & drag to orbit
Volume ≈ 0.3927

Only columns whose centers fall inside the quarter-circle are shown. Exact value: $\pi/8$.

Reversing Order of Integration

This is one of the most important skills in multivariable calculus. You're given an iterated integral with specific limits - and you need to rewrite it with the variables in the opposite order. Why? Because (as we saw with the $e^{y^2}$ example) one order might be impossible while the other is easy.

The method is always the same three steps:

  1. Read off the region from the given limits
  2. Sketch it - this is the step you cannot skip
  3. Re-describe the region with the other variable as the outer integral

Let's walk through a concrete example. Suppose we're given:

$$\int_0^1\int_{x^2}^{x} f(x,y)\,dy\,dx$$

Step 1: Read off the region. The outer integral says $0 \le x \le 1$. For each such $x$, the inner integral says $x^2 \le y \le x$. So the region $R$ is bounded below by $y = x^2$ and above by $y = x$, with $x$ from $0$ to $1$.

Step 2: Sketch it. The curves $y = x$ and $y = x^2$ intersect at $(0,0)$ and $(1,1)$. The region is the "lens" between the parabola and the line.

Step 3: Re-describe for $dx\,dy$. Now $y$ is the outer variable. From the sketch, $y$ ranges from $0$ to $1$. For a fixed $y$, which $x$-values are in the region? We need $y = x^2$ (so $x = \sqrt{y}$, the right boundary) and $y = x$ (so $x = y$, the left boundary). Thus $y \le x \le \sqrt{y}$.

$$\int_0^1\int_{x^2}^{x} f\,dy\,dx = \int_0^1\int_{y}^{\sqrt{y}} f\,dx\,dy$$

Both integrals describe the same region and will give the same answer - but one order might be vastly easier to evaluate than the other.

A second example - this pattern shows up constantly on exams. Given:

$$\int_0^1\int_0^{\sqrt{y}} f(x,y)\,dx\,dy$$

Read the region: $0 \le y \le 1$, and for each $y$, $0 \le x \le \sqrt{y}$. That means $x \le \sqrt{y}$, i.e., $y \ge x^2$. The region is below $y = 1$ and above $y = x^2$. To reverse: $x$ ranges from $0$ to $1$, and for each $x$, $y$ goes from $x^2$ to $1$:

$$\int_0^1\int_0^{\sqrt{y}} f\,dx\,dy = \int_0^1\int_{x^2}^{1} f\,dy\,dx$$

Common mistakes when reversing order:

Physical Applications

Think of a thin flat plate occupying region $R$ with variable density $f(x,y)$ (mass per unit area). The double integral $\iint_R f\,dA$ gives the plate's total mass. But we can extract much more.

Imagine you have a triangular metal plate (vertices at $(0,0)$, $(1,0)$, $(0,1)$) and the density increases as you move away from the origin: $f(x,y) = 1 + x + y$. Where should you place your finger to balance this plate? The corner at the origin is lighter (density $= 1$), while the far edge is heavier (density up to $3$). So the balance point should be pulled toward the heavy side - somewhere above and to the right of the geometric center. Let's quantify this.

Mass is the total "stuff" on the plate:

$$M = \iint_R f(x,y)\,dA$$

Center of mass $(\bar{x}, \bar{y})$ is the balance point. We weight each position by how much mass is there, then divide by total mass:

$$\bar{x} = \frac{1}{M}\iint_R x\,f(x,y)\,dA, \quad \bar{y} = \frac{1}{M}\iint_R y\,f(x,y)\,dA$$

Moments of inertia measure resistance to rotation. If you spin the plate around the $x$-axis, mass far from that axis is hard to accelerate. The moment $I_x$ captures this:

$$I_x = \iint_R y^2 f\,dA, \quad I_y = \iint_R x^2 f\,dA, \quad I_0 = I_x + I_y$$

The factor $y^2$ is the squared distance from the $x$-axis - so mass far from the axis contributes much more to $I_x$. This is why hollow cylinders have larger moments of inertia than solid ones of the same mass: the mass is farther out.

Below, explore our triangular plate with $f(x,y) = 1 + x + y$. Toggle between quantities and notice how the center of mass ($\approx 0.40, 0.40$) is indeed shifted toward the heavier corner, past the geometric centroid ($1/3, 1/3$).

Mass

The Mean Value Theorem

For single-variable integrals, the Mean Value Theorem says: if $f$ is continuous on $[a,b]$, then there's some $c$ in $[a,b]$ where $f(c) = \frac{1}{b-a}\int_a^b f(x)\,dx$. The function must hit its average value somewhere.

The same idea extends to two dimensions. If $f$ is continuous on a closed, bounded region $R$ with area $A$, then there exists some point $(x_1,y_1)$ in $R$ such that:

$$ \iint_R f(x,y)\,dA = f(x_1,y_1)\cdot A $$

Rearranging, the average value of $f$ over $R$ is:

$$ \bar{f} = \frac{1}{A}\iint_R f(x,y)\,dA $$

Think about it with the density analogy: $\bar{f}$ is the uniform density that, spread across the whole plate, would give the same total mass. And the MVT guarantees the actual density equals this average somewhere in the plate.

This leads to a powerful idea Kaplan calls "differentiating with respect to area." Shrink $R$ down to a tiny region $R_r$ of area $A_r$ around a point $(x_0, y_0)$. The MVT gives:

$$ \frac{1}{A_r}\iint_{R_r} f\,dA = f(\xi, \eta) $$

for some $(\xi, \eta)$ in $R_r$. As $r \to 0$, $(\xi,\eta) \to (x_0,y_0)$, so:

$$ \lim_{r\to 0}\frac{1}{A_r}\iint_{R_r} f\,dA = f(x_0,y_0) $$

We can recover the value of $f$ at any point by "zooming in" with the integral average. This is the 2D version of the Fundamental Theorem of Calculus in disguise - and it becomes essential when we reach the divergence theorem later in Chapter 5.

Finally, some useful properties that follow from the definition:

Setting Up Limits from Geometry

So far we've been given the limits. But on a real problem, you get a region described by curves or vertices - and you need to find the limits yourself.

Consider the triangle with vertices $(0,0)$, $(2,0)$, $(0,1)$. We want to evaluate $\iint_R xy\,dA$. Always sketch first.

The three boundary lines are:

Now describe this region two ways. Toggle below to see each description with strip overlays:

Type I ($dy\,dx$): sweep a vertical line from $x=0$ to $x=2$. For each $x$, $y$ runs from $0$ up to the hypotenuse $y = 1 - x/2$:

$$\int_0^2\!\int_0^{1-x/2} xy\,dy\,dx$$

Type II ($dx\,dy$): sweep a horizontal line from $y=0$ to $y=1$. For each $y$, $x$ runs from $0$ to the hypotenuse $x = 2 - 2y$:

$$\int_0^1\!\int_0^{2-2y} xy\,dx\,dy$$

Let's evaluate using Type I. The inner integral is:

Step 1: Inner integral (in $y$)

$$\int_0^{1-x/2} xy\,dy = x\cdot\frac{y^2}{2}\Big|_0^{1-x/2} = \frac{x}{2}\left(1-\frac{x}{2}\right)^2$$

Step 2: Expand and integrate in $x$

$$\frac{x}{2}\left(1-\frac{x}{2}\right)^2 = \frac{x}{2}\left(1 - x + \frac{x^2}{4}\right) = \frac{x}{2} - \frac{x^2}{2} + \frac{x^3}{8}$$

$$\int_0^2 \left(\frac{x}{2} - \frac{x^2}{2} + \frac{x^3}{8}\right)dx = \left[\frac{x^2}{4} - \frac{x^3}{6} + \frac{x^4}{32}\right]_0^2 = 1 - \frac{4}{3} + \frac{1}{2} = \frac{1}{6}$$

Let's sanity-check. The centroid of this triangle is at $\left(\frac{2}{3},\frac{1}{3}\right)$, so $xy$ averages around $\frac{2}{9} \approx 0.22$. The area of the triangle is $1$. So we'd predict the integral is near $0.22$. Our answer $\frac{1}{6} \approx 0.167$ is in the right ballpark - a bit lower because $xy$ is small near the origin where much of the triangle's area sits.

Common trap: When reversing order, the limits change because the bounding curves are described differently. Never just swap $dx \leftrightarrow dy$ and keep the same numbers. For this triangle, Type I has outer limits $[0,2]$ and Type II has outer limits $[0,1]$ - completely different ranges.

When Reversing Requires Splitting

The triangle above was clean - one integral each way. Some regions force a split when reversed.

Suppose someone hands us this:

$$\int_0^1\!\int_0^y f\,dx\,dy \;+\; \int_1^2\!\int_0^{2-y} f\,dx\,dy$$

Two separate integrals summed together. What region is this? Let's decode each piece.

First piece: $0 \le y \le 1$, $0 \le x \le y$. That's the triangle below the line $x = y$ (in the lower part).

Second piece: $1 \le y \le 2$, $0 \le x \le 2-y$. That's the triangle below the line $x = 2-y$ (in the upper part).

Together they form a single triangle with vertices $(0,0)$, $(1,1)$, and $(0,2)$. The boundary has a corner at $(1,1)$ where $x=y$ meets $x=2-y$. Toggle below to see the two sub-regions highlighted:

Why the split? In $dx\,dy$ order, the right boundary of the region changes at $y = 1$. Below $y=1$ the right edge is $x = y$; above $y=1$ it's $x = 2 - y$. A single iterated integral can't handle a boundary that switches formulas partway through, so we need two integrals.

Now reverse to $dy\,dx$. For a fixed $x$ in $[0,1]$, sweep a vertical line and ask: what $y$-values are inside the region? The bottom boundary is $y = x$ (from the first piece), and the top boundary is $y = 2-x$ (from the second piece). There's no break - for every $x$, both boundaries apply continuously. So:

$$\int_0^1\!\int_0^y f\,dx\,dy + \int_1^2\!\int_0^{2-y} f\,dx\,dy = \int_0^1\!\int_x^{2-x} f\,dy\,dx$$

Two integrals collapsed into one. That's cleaner and often easier to evaluate.

Key insight: When the boundary has a corner, one order splits and the other doesn't. Always sketch first, then pick the simpler order.

Common trap: If someone gives you a sum of two iterated integrals over the same integrand, that's a hint - they had to split because their chosen order hit a corner. Reversing may combine them into one. Look for this pattern on exams.

Practice Problems - §4.3

From Kaplan, problems after §4.5.

1(a) $\iint_R (x^2 + y^2)\,dx\,dy$ over the triangle with vertices $(0,0)$, $(1,0)$, $(1,1)$
Evaluate $\iint_R (x^2 + y^2)\,dx\,dy$ where $R$ is the triangle bounded by $y=0$, $x=1$, and $y=x$.
Step 1: Set up bounds.

Sketch shows: for fixed $x \in [0,1]$, $y$ runs from $0$ to $x$. So

$$\int_0^1\!\int_0^x (x^2 + y^2)\,dy\,dx.$$
Step 2: Inner integral. $$\int_0^x (x^2 + y^2)\,dy = x^2 y + \tfrac{y^3}{3}\Big|_0^x = x^3 + \tfrac{x^3}{3} = \tfrac{4x^3}{3}.$$
Step 3: Outer integral. $$\int_0^1 \tfrac{4x^3}{3}\,dx = \tfrac{4}{3}\cdot\tfrac{1}{4} = \tfrac{1}{3}.$$
2(a) Volume below $z = e^x \cos y$ over $0 \le x \le 1$, $0 \le y \le \pi/2$
Find the volume of the solid below $z = e^x \cos y$ over the rectangle $0 \le x \le 1$, $0 \le y \le \pi/2$.
Step 1: The integrand separates.

Since $e^x \cos y$ factors as a product of one-variable functions, the double integral splits:

$$V = \int_0^1 e^x\,dx \cdot \int_0^{\pi/2} \cos y\,dy.$$
Step 2: Evaluate each piece. $$\int_0^1 e^x\,dx = e - 1, \qquad \int_0^{\pi/2} \cos y\,dy = 1.$$

So $V = e - 1$.

Worth memorizing the trick: when $f(x,y) = g(x)h(y)$ on a rectangle, the double integral is the product of the single integrals. Saves time on problems like this.

5(a) Reverse the order: $\int_{1/2}^1 \int_{1-x}^{1+x} f(x,y)\,dy\,dx$
Sketch the region of integration and rewrite with the order of integration reversed.
Step 1: Identify the region.

For $x \in [1/2, 1]$, $y$ runs from $1 - x$ up to $1 + x$. The boundary curves are $y = 1-x$, $y = 1+x$, and the vertical line $x = 1/2$ (left) and $x = 1$ (right). The corners are $(1/2, 1/2)$, $(1/2, 3/2)$, $(1, 0)$, $(1, 2)$.

Step 2: Slice horizontally.

Fixing $y$, the bounds on $x$ depend on which strip we're in:

  • For $0 \le y \le 1/2$: $x$ runs from $1 - y$ to $1$.
  • For $1/2 \le y \le 3/2$: $x$ runs from $1/2$ to $1$.
  • For $3/2 \le y \le 2$: $x$ runs from $y - 1$ to $1$.

So we split into three pieces:

$$\int_0^{1/2}\!\!\int_{1-y}^1 f\,dx\,dy + \int_{1/2}^{3/2}\!\!\int_{1/2}^1 f\,dx\,dy + \int_{3/2}^2\!\!\int_{y-1}^1 f\,dx\,dy.$$

When reversing, the original "easy" order may turn into a sum - that's the corner-splitting trap from the last card showing up in real life.

5(b) Reverse: $\int_0^1 \int_0^{1-x^2} f(x,y)\,dy\,dx$
Sketch the region and rewrite with the order reversed.
Step 1: Region.

Bounded by $x = 0$ (left), $y = 0$ (bottom), and $y = 1 - x^2$ (top, a downward parabola). It's the first-quadrant region under the parabola from $x=0$ to $x=1$.

Step 2: Reverse.

Solve $y = 1 - x^2$ for $x$: $x = \sqrt{1 - y}$. For fixed $y \in [0,1]$, $x$ runs from $0$ to $\sqrt{1-y}$:

$$\int_0^1 \int_0^{\sqrt{1-y}} f(x,y)\,dx\,dy.$$

No splitting needed - this region is "Type I and Type II" simultaneously.