🦖 Bellaziraptor

Unit 4

Multiple Integrals

A single integral adds up slices along a line. A double integral adds up little tiles over a region; a triple integral adds up little bricks through a solid. The calculus is the same one you already own — the integrals nest, and you do the inside one first. What is genuinely new is describing the region: writing limits that sweep a strip across exactly the right shape, and choosing the coordinate system whose tiles fit that shape. Three labs are built into this page: one that shows the Riemann sum turning into a volume, one for setting up limits and swapping their order, and one that shows why \(dV\) picks up an \(r\) in cylindrical coordinates and a \(\rho^2\sin\phi\) in spherical.

1 · Double integrals over rectangles

\[ \iint_R f(x,y)\,dA = \lim_{m,n\to\infty}\sum_{i=1}^{m}\sum_{j=1}^{n} f(x_{ij}^*, y_{ij}^*)\,\Delta A \] Chop the rectangle \(R = [a,b]\times[c,d]\) into \(mn\) tiles of area \(\Delta A = \Delta x\,\Delta y\), pick a sample point in each, build a box of height \(f\) on each tile, add the volumes. If \(f \ge 0\) the limit is the volume under the surface. In general it is the signed volume — parts below the \(xy\)-plane count negative, exactly like area in Calculus I.
\[ \iint_R f(x,y)\,dA = \int_a^b\!\!\int_c^d f(x,y)\,dy\,dx = \int_c^d\!\!\int_a^b f(x,y)\,dx\,dy \] Fubini's theorem (for continuous \(f\)): compute the double integral as an iterated integral, in either order. Do the inner integral first, treating the outer variable as a constant — a partial integral, the twin of a partial derivative. The result is a function of the outer variable; integrate that. Think of it as adding up the areas of cross-sectional slices.
When the integrand factors

If \(f(x,y) = g(x)\,h(y)\) on a rectangle, the double integral is a product of two single integrals: \(\int_a^b g(x)\,dx\cdot\int_c^d h(y)\,dy\). This is only true on rectangles with constant limits — on a triangle, the inner limits involve the outer variable and nothing separates.

Interactive lab

Riemann boxes under a surface

The square \([0,2]\times[0,2]\) is cut into \(n\times n\) tiles and a box is built on each one, with height equal to \(f\) at the chosen sample point. Slide \(n\) up and watch the staircase melt into the surface; the graph on the right tracks the sum against \(n\) and the exact value. Note how much faster the midpoint rule converges than either corner rule — the corner rules are consistently biased on a monotone surface, the midpoint rule is not.

Drag to orbit. Boxes coloured by height; the faint mesh is the true surface.

Riemann sum against \(n\) for the current rule; dashed line is the exact integral. The dot is your current \(n\).

Subdivisions n4 × 4
Sample point
Show
ΔA = Δx·Δy
Riemann sum
Exact ∬ f dA
Error
The sum being computed

2 · General regions and the order of integration

Most regions are not rectangles. The trick is to describe the region so that one variable runs between two numbers and the other runs between two curves:

\[ \text{Type I (vertical strips):}\quad D = \{a\le x\le b,\ g_1(x)\le y\le g_2(x)\}\quad\Longrightarrow\quad \iint_D f\,dA = \int_a^b\!\!\int_{g_1(x)}^{g_2(x)} f(x,y)\,dy\,dx \] \[ \text{Type II (horizontal strips):}\quad D = \{c\le y\le d,\ h_1(y)\le x\le h_2(y)\}\quad\Longrightarrow\quad \iint_D f\,dA = \int_c^d\!\!\int_{h_1(y)}^{h_2(y)} f(x,y)\,dx\,dy \] The inner limits are where the strip enters and leaves the region; the outer limits are the range the strip sweeps through. Inner limits may depend on the outer variable. Outer limits are always constants. If you ever write an outer limit with a variable in it, stop — something is upside down.
The procedure, every time
  1. Sketch the region. Find where the boundary curves intersect.
  2. Pick a strip direction. Draw one representative strip.
  3. Inner limits: the curve the strip enters through, to the curve it leaves through — in terms of the outer variable.
  4. Outer limits: the smallest and largest value of the outer variable anywhere in the region.

If the entering or leaving curve changes partway across, you need to split the integral — or switch strip direction, which very often removes the split entirely. That is the lab's fifth preset.

Reversing the order

Some inner integrals cannot be done: \(\int e^{y^2}dy\) and \(\int \sin(x^2)\,dx\) have no elementary antiderivative. The fix is to reverse the order — and to do that you must recover the region from the limits, sketch it, and re-describe it with the other strip direction. You cannot swap limits by rearranging symbols. Draw the region.

Interactive lab

Region explorer: strips, limits and order

Pick a region and a strip direction. The highlighted strip slides across the region; the labels at its ends are the inner limits, and the integral below is written out for that order with the limits filled in. Switch the direction and watch the same region get a completely different description. The last preset needs two integrals in one direction and only one in the other.

Vertical strips: \(dy\) inside, \(dx\) outside. The strip enters through the lower curve and leaves through the upper one.

Strips
Strip
The region
Iterated integral in this order
Strip at
Inner limits here
Strip length
Area ∬ 1 dA (either order)

3 · Double integrals in polar coordinates

\[ \iint_D f(x,y)\,dA = \int_\alpha^\beta\!\!\int_{r_1(\theta)}^{r_2(\theta)} f(r\cos\theta,\ r\sin\theta)\;\underbrace{r\,dr\,d\theta}_{dA} \] A polar tile is not a rectangle: it is a piece of a ring, with radial width \(dr\) and arc length \(r\,d\theta\). Its area is \(r\,dr\,d\theta\) — the extra factor of \(r\) is the single most forgotten thing in this unit. It is also why polar integrals are often easier: that \(r\) is exactly what a substitution \(u = r^2\) needs.

Use polar whenever the region is a disk, ring, sector or cardioid, or whenever the integrand contains \(x^2 + y^2\). Both conditions together make the integral collapse.

The Gaussian integral — noise, probability, everything

\(I = \int_{-\infty}^\infty e^{-x^2}dx\) has no elementary antiderivative. But \(I^2 = \iint_{\mathbb{R}^2} e^{-(x^2+y^2)}\,dA = \int_0^{2\pi}\!\!\int_0^\infty e^{-r^2}\,r\,dr\,d\theta = 2\pi\cdot\tfrac12 = \pi\), so \(I = \sqrt\pi\). The factor of \(r\) from \(dA\) is what makes the inner integral doable. Every normal distribution, every thermal-noise calculation, every Gaussian pulse rests on this one polar integral.

4 · Mass, centroids, moments and probability

Every application is the slicing principle from Calculus II with a tile in place of a strip: write the contribution of one tile of area \(dA\), then integrate. For a lamina (thin plate) with surface density \(\rho(x,y)\):

QuantityOne tile contributesTotal
Area\(dA\)\(A = \iint_D dA\)
Mass\(\rho\,dA\)\(m = \iint_D \rho\,dA\)
Moment about the \(y\)-axis\(x\,\rho\,dA\)\(M_y = \iint_D x\rho\,dA\), and \(\bar x = M_y/m\)
Moment about the \(x\)-axis\(y\,\rho\,dA\)\(M_x = \iint_D y\rho\,dA\), and \(\bar y = M_x/m\)
Moment of inertia about the \(x\)-axis\(y^2\rho\,dA\)\(I_x = \iint_D y^2\rho\,dA\) (distance to the axis, squared)
Polar moment (about the origin)\((x^2+y^2)\rho\,dA\)\(I_0 = I_x + I_y\)
Average value of \(f\)\(f\,dA\)\(f_{\text{avg}} = \dfrac{1}{A}\iint_D f\,dA\)
Total charge on a plate\(\sigma\,dA\)\(Q = \iint_D \sigma\,dA\) — same integral as mass with \(\sigma\) for \(\rho\)
Notice the pattern: weight \(\times\) density \(\times\) area. Moment of inertia uses distance squared — the rotational analogue of mass — and appears in every motor and flywheel calculation.

Probability

\[ P\big((X,Y)\in D\big) = \iint_D f(x,y)\,dA,\qquad \iint_{\mathbb{R}^2} f\,dA = 1,\qquad E[X] = \iint x\,f(x,y)\,dA \] A joint density \(f(x,y)\) is a lamina whose total mass is 1; expected values are its centroid. Two independent noise sources have joint density \(f_1(x)f_2(y)\), and the probability that their sum exceeds a threshold is a double integral over a half-plane — the standard bit-error-rate calculation.

5 · Surface area

\[ A(S) = \iint_D \sqrt{1 + f_x^2 + f_y^2}\;dA \qquad\text{for } z = f(x,y) \text{ over } D \] A small tile \(dA\) on the floor sits under a tilted patch of the surface. The patch is bigger than the tile by the factor \(\sqrt{1 + f_x^2 + f_y^2}\) — the area-stretch of the tangent plane, and the 2D twin of the Calculus II arc-length factor \(\sqrt{1 + f'^2}\). Unit 6 generalises this to any parametric surface.

6 · Triple integrals

\[ \iiint_E f(x,y,z)\,dV = \int_a^b\!\!\int_{g_1(x)}^{g_2(x)}\!\!\int_{u_1(x,y)}^{u_2(x,y)} f(x,y,z)\,dz\,dy\,dx \] Same idea, one more layer. The innermost limits are the surfaces the solid is bounded below and above by, as functions of \((x,y)\). The remaining double integral runs over the projection (shadow) of the solid on the \(xy\)-plane, and you describe that with Section 2. If \(f = 1\), the triple integral is the volume.
Setting up a triple integral
  1. Decide which variable to integrate first (innermost). Usually the one for which the solid has an obvious “floor” and “ceiling” — \(z\) for most solids.
  2. Write the inner limits as the floor and ceiling surfaces, solved for that variable.
  3. Find the shadow of the solid on the plane of the other two variables — often by asking where floor and ceiling meet — and describe it as a double integral.

There are six possible orders. Any of them is correct; one is usually much easier. If the inner integral is impossible, reorder.

Applications carry over: mass \(\iiint\rho\,dV\), centroid, moments of inertia, and — the EE one — total charge \(Q = \iiint\rho_v\,dV\) from a volume charge density, and stored field energy \(W = \iiint\tfrac12\varepsilon|\mathbf{E}|^2\,dV\).

7 · Triple integrals in cylindrical and spherical coordinates

\[ \iiint_E f\,dV = \iiint f(r\cos\theta,\ r\sin\theta,\ z)\;r\,dz\,dr\,d\theta \] Cylindrical. A little wedge has radial thickness \(dr\), arc length \(r\,d\theta\), and height \(dz\); multiply. The \(r\) is the polar \(r\) again. Use it for anything with an axis: cylinders, cones, paraboloids, the region between a paraboloid and a plane, a coaxial cable.
\[ \iiint_E f\,dV = \iiint f(\rho\sin\phi\cos\theta,\ \rho\sin\phi\sin\theta,\ \rho\cos\phi)\;\rho^2\sin\phi\,d\rho\,d\theta\,d\phi \] Spherical. The wedge has radial thickness \(d\rho\); its edge in the \(\phi\) direction is an arc of radius \(\rho\), length \(\rho\,d\phi\); its edge in the \(\theta\) direction is an arc of radius \(\rho\sin\phi\) (the distance from the \(z\)-axis), length \(\rho\sin\phi\,d\theta\). Multiply: \(\rho^2\sin\phi\,d\rho\,d\theta\,d\phi\). Use it for spheres, cones through the origin, and anything with \(x^2+y^2+z^2\) in the integrand.
The two factors people drop

\(r\) in cylindrical, \(\rho^2\sin\phi\) in spherical. Forgetting them gives an answer with the wrong units — you would be adding up areas instead of volumes. The lab below exists so that you never again have to remember these as formulas: you will have seen the wedge and measured its three edges.

Interactive lab

The volume element, edge by edge

A small wedge of space at the position you choose, sitting on its coordinate surface (a cylinder for cylindrical, a sphere for spherical). Its three edges are labelled with their lengths. Move it outward and watch the arc edges grow with \(r\) or \(\rho\); in spherical, move it toward the pole and watch the \(\theta\)-edge shrink with \(\sin\phi\). The readout compares the product of the three edges with the wedge's exact volume — they agree in the limit of small \(\Delta\), which is all a differential ever claims.

Drag to orbit. The faint surface is \(r = \) const (cylindrical) or \(\rho = \) const (spherical). Edge labels are lengths.

r1.60
θ40°
z0.40
Δ size0.45
Show
Edge 1: Δr
Edge 2: r Δθ
Edge 3: Δz
Product of edges
Exact wedge volume
Ratio
Volume element with your numbers

8 · Change of variables and the Jacobian

Polar, cylindrical and spherical are special cases of one rule. If a transformation \(x = x(u,v)\), \(y = y(u,v)\) maps a region \(S\) in the \(uv\)-plane onto \(D\) in the \(xy\)-plane, then

\[ \iint_D f(x,y)\,dx\,dy = \iint_S f\big(x(u,v),\ y(u,v)\big)\,\left|\frac{\partial(x,y)}{\partial(u,v)}\right|du\,dv, \qquad \frac{\partial(x,y)}{\partial(u,v)} = \begin{vmatrix} x_u & x_v\\ y_u & y_v\end{vmatrix} \] The Jacobian is the local area-stretch factor of the map: a tiny \(du\,dv\) rectangle lands as a tiny parallelogram of area \(|J|\,du\,dv\). Use the absolute value. For three variables it is the \(3\times3\) determinant and it stretches volumes.
TransformationJacobianSo \(dA\) or \(dV\) becomes
Polar: \(x = r\cos\theta,\ y = r\sin\theta\)\(\begin{vmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{vmatrix} = r\)\(r\,dr\,d\theta\)
Cylindrical\(r\)\(r\,dr\,d\theta\,dz\)
Spherical\(\rho^2\sin\phi\)\(\rho^2\sin\phi\,d\rho\,d\theta\,d\phi\)
Linear: \(x = au + bv,\ y = cu + dv\)\(ad - bc\)\(|ad-bc|\,du\,dv\) — a constant; parallelograms map to rectangles
The lab above is the Jacobian for cylindrical and spherical, measured geometrically instead of computed as a determinant. Both routes give the same factor — a good check to run once by hand.
Choosing \(u\) and \(v\)

Look at the boundary of \(D\). If it is bounded by lines like \(x + y = 1\), \(x + y = 3\), \(x - y = 0\), \(x - y = 2\), take \(u = x + y\) and \(v = x - y\) — the region becomes a rectangle in \(uv\). Then solve for \(x, y\) in terms of \(u, v\) to compute the Jacobian (or use \(\partial(x,y)/\partial(u,v) = 1\big/\big(\partial(u,v)/\partial(x,y)\big)\), which is often quicker).

9 · Worked examples

1. Volume under a surface over a triangle

Find the volume under \(z = x + 2y\) over the triangle with vertices \((0,0), (2,0), (0,1)\).

Sketch: the hypotenuse is the line from \((2,0)\) to \((0,1)\): \(y = 1 - x/2\). Vertical strips run from \(y = 0\) up to \(y = 1 - x/2\), for \(x\) from 0 to 2.

\[ V = \int_0^2\!\!\int_0^{1-x/2} (x + 2y)\,dy\,dx = \int_0^2 \Big[xy + y^2\Big]_0^{1-x/2}dx = \int_0^2 \left[x\left(1-\tfrac{x}{2}\right) + \left(1-\tfrac{x}{2}\right)^2\right]dx \] \[ = \int_0^2 \left[x - \tfrac{x^2}{2} + 1 - x + \tfrac{x^2}{4}\right]dx = \int_0^2\left[1 - \tfrac{x^2}{4}\right]dx = 2 - \tfrac{8}{12} = \tfrac43 \]

Sanity check: the triangle has area 1, and \(z\) ranges from 0 to 2 over it, so the volume must be between 0 and 2. ✓ Set this up with horizontal strips as an exercise: \(x\) from 0 to \(2 - 2y\), \(y\) from 0 to 1. Same answer.

2. Reverse the order to make an impossible integral possible

Evaluate \(\displaystyle\int_0^1\!\!\int_x^1 e^{y^2}\,dy\,dx\).

The inner integral \(\int e^{y^2}dy\) cannot be done. Recover the region: \(0\le x\le1\), \(x\le y\le 1\). That is the triangle above the line \(y = x\), below \(y = 1\), right of \(x = 0\) — vertices \((0,0), (0,1), (1,1)\).

Re-describe with horizontal strips: for each \(y\) from 0 to 1, \(x\) runs from 0 to \(y\).

\[ \int_0^1\!\!\int_0^{y} e^{y^2}\,dx\,dy = \int_0^1 y\,e^{y^2}\,dy = \Big[\tfrac12 e^{y^2}\Big]_0^1 = \frac{e - 1}{2} \approx 0.859 \]

The inner integral in \(x\) supplied exactly the factor \(y\) that the substitution \(u = y^2\) needs. This is the standard shape of a reverse-the-order problem: the “impossible” integrand is waiting for a factor that the other order provides.

3. Polar: volume between a paraboloid and a plane

Find the volume of the solid under \(z = 8 - x^2 - y^2\) and above \(z = x^2 + y^2\).

Where they meet: \(8 - r^2 = r^2 \Rightarrow r = 2\). The shadow is the disk \(r \le 2\). Height of the solid at radius \(r\): top minus bottom \(= 8 - 2r^2\).

\[ V = \int_0^{2\pi}\!\!\int_0^2 (8 - 2r^2)\,r\,dr\,d\theta = 2\pi\Big[4r^2 - \tfrac{r^4}{2}\Big]_0^2 = 2\pi(16 - 8) = 16\pi \]

Check: the solid sits inside a cylinder of radius 2 and height 8, volume \(32\pi\); it is roughly half of that. ✓ In Cartesian this would be \(\int_{-2}^{2}\int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}}(8 - 2x^2 - 2y^2)\,dy\,dx\) — doable but ugly. The \(x^2+y^2\) in the integrand and the circular region both said “polar”.

4. Centre of mass of a half-disk

A uniform half-disk of radius \(a\) occupies \(y \ge 0\). Find its centroid.

By symmetry \(\bar x = 0\). Area \(A = \pi a^2/2\). For \(\bar y\), use polar with \(y = r\sin\theta\):

\[ M_x = \iint_D y\,dA = \int_0^\pi\!\!\int_0^a (r\sin\theta)\,r\,dr\,d\theta = \int_0^\pi\sin\theta\,d\theta\cdot\int_0^a r^2\,dr = 2\cdot\frac{a^3}{3} \] \[ \bar y = \frac{M_x}{A} = \frac{2a^3/3}{\pi a^2/2} = \frac{4a}{3\pi} \approx 0.424\,a \]

Sensible? Below the midpoint \(a/2\), because there is more material near the flat edge (wide) than near the top (narrow). ✓ This is the classic result you will see again for the centroid of a semicircular current loop.

5. Triple integral in cylindrical coordinates: charge in a cylinder

A cylinder of radius \(R\) and height \(h\) (\(0\le z\le h\)) carries charge density \(\rho_v = k\,r\) (proportional to distance from the axis). Find the total charge.

\[ Q = \iiint \rho_v\,dV = \int_0^{2\pi}\!\!\int_0^R\!\!\int_0^h (kr)\;r\,dz\,dr\,d\theta = k\cdot 2\pi\cdot h\cdot\int_0^R r^2\,dr = \frac{2\pi k h R^3}{3} \]

Units: \(k\) has units C/m⁴ (so that \(kr\) is C/m³); \(khR^3\) is then C/m⁴ · m · m³ = C. ✓ Note the integrand's \(r\) and the Jacobian's \(r\) are different things that happen to multiply into \(r^2\) — write them both, every time.

6. Spherical coordinates: volume of an ice-cream cone

Find the volume inside the sphere \(x^2+y^2+z^2 = 4\) and above the cone \(z = \sqrt{x^2+y^2}\).

In spherical: sphere is \(\rho = 2\); cone is \(\phi = \pi/4\) (from Unit 1, example 6). The solid is \(0\le\rho\le2\), \(0\le\phi\le\pi/4\), \(0\le\theta\le2\pi\) — a box in spherical coordinates.

\[ V = \int_0^{2\pi}\!\!\int_0^{\pi/4}\!\!\int_0^2 \rho^2\sin\phi\,d\rho\,d\phi\,d\theta = 2\pi\cdot\Big[-\cos\phi\Big]_0^{\pi/4}\cdot\Big[\tfrac{\rho^3}{3}\Big]_0^2 = 2\pi\left(1 - \tfrac{\sqrt2}{2}\right)\frac{8}{3} = \frac{16\pi}{3}\left(1 - \tfrac{\sqrt2}{2}\right) \approx 4.91 \]

Check: the whole sphere has volume \(\tfrac43\pi(8) \approx 33.5\); the cone with half-angle \(45^\circ\) cuts out the fraction \((1 - \cos 45^\circ)/2 \approx 0.146\) of it, i.e. \(\approx 4.91\). ✓ The \(\sin\phi\) integrated to \(1 - \cos\phi\) — the standard spherical-cap fraction. Try the cylindrical setup for comparison: \(\int_0^{2\pi}\int_0^{\sqrt2}\int_r^{\sqrt{4-r^2}} r\,dz\,dr\,d\theta\). It works, but the limits are messier — spherical fits the shape.

Checklist

  • I sketch the region before writing any limits, and I draw one strip.
  • My inner limits are curves in the outer variable; my outer limits are constants.
  • I can reverse the order of integration by recovering the region, not by shuffling symbols.
  • I never forget the \(r\) in polar and cylindrical, or \(\rho^2\sin\phi\) in spherical.
  • I recognise \(x^2+y^2\) and circular regions as a call for polar; \(x^2+y^2+z^2\) and spheres or cones as a call for spherical.
  • I can set up mass, centroid, moment of inertia and total charge as weighted integrals.
  • I can compute a Jacobian and use its absolute value.