Double and triple integrals

Add up over areas and volumes.

An ordinary integral adds up something spread along a line: thin strips, side by side. But the mass of a metal plate is spread over an area, and the charge in a cloud is spread through a volume. To add those up you need the same idea in two directions at once, or three. That's all a double or a triple integral is. Start with a volume: how much space is there under a curved roof?

A surface over a rectangular floor, with the space under it filled by flat-topped columns. Drag the two amber points on the floor's edges to change its size. The graph beside it shows the same columns gathered into slices: each strip is one slice. Heights are drawn at about half scale so the tallest surface fits.
  • Slide "Columns along each side" from 1 up to 16. With the height taken at each column's near corner, the total climbs: 0.00, then 1.00 with four columns, 2.25 with sixteen, and 3.52 with 256. It's creeping up on the exact volume, 4.00.
  • Switch to "Far corner". Now every column pokes through the surface, and 256 of them give 4.52. The true volume is trapped between the two.
  • Switch to "Middle". On this surface it's exactly right, even with one column. Choose "A bump" and it no longer is: one column gives 16.00, sixteen give 9.67 and 256 give 9.35, against an exact 9.33.
  • Go back to "A twisted sheet" and press "Add up the slices". The columns are added a slice at a time, each slice at one value of \(x\), and each slice becomes one strip in the graph. The strips are an ordinary integral.
  • Choose "At each y" and press it again. The slices are cut the other way, yet the total is the same. On this square floor the strips match too, because \(x \times y\) treats \(x\) and \(y\) alike. Then try "A sloping roof": at each \(x\) the strips climb, at each \(y\) every slice is identical.
  • Choose "A twisted sheet" once more, and drag the amber point on the \(y\) edge until the floor is 2 by 1. The exact volume becomes 1.00. You'll work that out by hand below.

A sum over small patches

In the Riemann lesson you cut an interval into pieces of width \(\Delta x\), stood a strip on each, and added up height times width. Do the same with a floor. Cut it into small patches, each \(\Delta x\) by \(\Delta y\). Over each patch the surface \(f(x, y)\) is nearly level, so the space above it is nearly a column of volume \(f \times \Delta x \times \Delta y\). Add up every column. The double integral is what that sum settles on as the patches shrink:

\[ \iint f(x, y)\,dA = \lim \sum f(x_i, y_j)\,\Delta x\,\Delta y \]

Two integral signs, because there are two directions to add up over. \(dA\) stands for the area of one tiny patch, and on a rectangular grid \(dA = dx\,dy\).

The height doesn't have to be a height. If \(f\) is how many kilograms each square metre of a plate weighs, the same sum is the plate's mass. If \(f\) is 1, it's just the area of the floor.

One direction at a time

A sum over a grid can be done a row at a time. That turns one double integral into two ordinary ones, done one after the other.

Cut the solid into slices, each at a fixed \(x\), like a sliced loaf. The face of a slice is an ordinary area under a curve: go along \(y\) with \(x\) held still.

\[ A(x) = \int f(x, y)\,dy \]

It's the same move as a partial derivative, run backwards: treat the other variable as a constant. Each slice has volume \(A(x)\,dx\), so adding the slices is a second ordinary integral, \(\int A(x)\,dx\). This is exactly what the figure's graph shows: the white curve is \(A(x)\) and the strips are the slices.

Take the twisted sheet, \(f = xy\), over a floor that runs from 0 to 2 in \(x\) and from 0 to 1 in \(y\).

Write the integral with the inside one in brackets. The limits on each sign belong to the variable in its matching \(d\): \(y\) runs from 0 to 1, and \(x\) from 0 to 2.

\[ \int_0^2 \left( \int_0^1 xy\,dy \right) dx \]

Do the inside one first. It's an integral over \(y\), so \(x\) is just a number sitting in front. The integral of \(y\) is \(\frac{1}{2}y^2\).

\[ \int_0^1 xy\,dy = x\left[\tfrac{1}{2}y^2\right]_0^1 = \tfrac{1}{2}x \]

That's the area of the slice at \(x\). Slices further along are bigger, in a straight line: it's the white line in the figure's graph. Now add the slices up.

\[ \int_0^2 \tfrac{1}{2}x\,dx = \left[\tfrac{1}{4}x^2\right]_0^2 = 1 \]

Now slice the other way, at each \(y\). This time \(y\) is the number sitting in front.

\[ \int_0^2 xy\,dx = y\left[\tfrac{1}{2}x^2\right]_0^2 = 2y \]

Add those slices up, and the total is the same.

\[ \int_0^1 2y\,dy = \left[y^2\right]_0^1 = 1 \]
\[ \iint f\,dA = \int\!\left(\int f\,dy\right)dx \qquad \iint f\,dA = \int\!\left(\int f\,dx\right)dy \]

Do the inside integral first, holding the other variable still.

The order doesn't matter because both are the same columns, counted in a different order. Pick whichever makes the inside integral easier.

If the floor isn't a rectangle, the ends of a slice depend on where the slice is. Take the triangle under the line \(y = x\), from \(x = 0\) to \(x = 1\). The slice at \(x\) runs from \(y = 0\) up to \(y = x\), so \(x\) appears as a limit of the inside integral:

\[ \int_0^1 \left( \int_0^x f\,dy \right) dx \]

After the inside integral, only \(x\) is left, and the outside one finishes the job as before. Problem 4 does one.

Circles: why polar coordinates carry an extra r

Squares are a poor fit for a disc. For anything round it's better to say where a point is by its distance \(r\) from the centre and its angle \(\theta\) round from the \(x\) axis. These are polar coordinates, and you've used them already: \(x = r\cos\theta\) and \(y = r\sin\theta\). Now the natural pieces are bounded by circles and spokes.

A disc of radius 1 m cut into rings and wedges. Drag the amber point to pick a piece. Each bar in the graph is one whole ring, set at its distance from the centre. A ring's radius is measured to its middle, and for the moment of inertia the disc's mass is taken to be spread evenly.
  • Drag the amber point from the centre straight out to the rim. Every piece is the same depth, \(\Delta r\), and spans the same angle, \(\Delta\theta\). But the pieces get wider as you go: their arcs are 0.0654, 0.1963, 0.3272 and 0.4581 m long.
  • Slide "Wedges" up to 32. The pieces look more and more like small rectangles, \(\Delta r\) one way and \(r\,\Delta\theta\) the other.
  • Look at the bars. Each is as tall as its ring is long, \(2\pi r\), and as wide as the ring is deep, so its area is the ring's area. The outer rings hold most of the disc. The bars add up to 3.1416 however you cut the disc, because the corner of each bar that pokes above the line exactly fills the gap beneath it.

An angle on its own isn't a length. An arc is: at distance \(r\) from the centre, an angle \(\Delta\theta\) in radians spans an arc of length \(r\,\Delta\theta\). So a small piece is \(\Delta r\) deep and \(r\,\Delta\theta\) wide, and its area is

\[ dA = r\,dr\,d\theta \]

That \(r\) is the whole point. Equal steps in angle cover more ground further out, and the \(r\) keeps count of it.

\[ \iint f\,dA = \int\!\!\int f\;r\,dr\,d\theta \]

Check it on the area of a disc of radius \(R\), where \(f = 1\). The inside integral runs out along a spoke, from 0 to \(R\), and gives \(\frac{1}{2}R^2\). The outside one goes all the way round, from 0 to \(2\pi\), and nothing in it depends on \(\theta\), so it just multiplies by \(2\pi\):

\[ \int_0^{2\pi}\!\left(\int_0^R r\,dr\right)d\theta = \int_0^{2\pi} \tfrac{1}{2}R^2\,d\theta = \pi R^2 \]

Leave the \(r\) out and you'd get \(2\pi R\), which isn't even an area: it's a length. The units catch the mistake.

A promise kept: the disc's moment of inertia

The rotation lesson said that a body's moment of inertia is the sum of \(mr^2\) over all its pieces, and quoted \(\frac{1}{2}MR^2\) for a solid disc turning about its centre. Now you can get it yourself. The disc has mass \(M\) and radius \(R\), spread evenly.

  • In the figure, choose "Moment of inertia". Each ring is now lit by how much a kilogram there counts, which is \(r^2\), and the area of each bar is its ring's share of the mass times its \(r^2\).
  • Slide "Rings" from 1 up to 20. The total goes 0.2500, 0.4375, 0.4844, 0.4900, 0.4961, 0.4975, 0.4994, all in units of \(MR^2\). It's closing on a half.

Every square metre of the disc has the same mass. Call it \(\sigma\) (sigma), the mass divided by the area.

\[ \sigma = \frac{M}{\pi R^2} \]

A small piece has area \(r\,dr\,d\theta\), so its mass is \(\sigma\) times that. It sits a distance \(r\) from the axis, so it adds its mass times \(r^2\) to the total.

\[ r^2 \times \sigma\,r\,dr\,d\theta = \sigma\,r^3\,dr\,d\theta \]

Add up all the pieces: out along a spoke, then all the way round.

\[ I = \int_0^{2\pi}\!\left(\int_0^R \sigma\,r^3\,dr\right)d\theta \]

The inside integral: \(r^3\) integrates to \(\frac{1}{4}r^4\).

\[ \int_0^R \sigma\,r^3\,dr = \tfrac{1}{4}\sigma R^4 \]

Nothing in that depends on \(\theta\), so going round just multiplies it by \(2\pi\).

\[ I = 2\pi \times \tfrac{1}{4}\sigma R^4 = \tfrac{1}{2}\pi\sigma R^4 \]

Put \(\sigma = \frac{M}{\pi R^2}\) back. The \(\pi\) cancels, and \(R^4\) over \(R^2\) leaves \(R^2\).

\[ I = \tfrac{1}{2}\pi R^4 \times \frac{M}{\pi R^2} = \tfrac{1}{2}MR^2 \]

The half comes from that \(r^3\): one \(r\) because there's more disc further out, and two more because mass counts by the square of its distance. A hoop has all its mass at the rim, so it needs no integral at all: \(I = MR^2\).

Triple integrals: the same idea once more

Through a volume, the small pieces are boxes, \(dV = dx\,dy\,dz\), and there are three integrals, done from the inside out. If \(\rho\) (rho) is the density, the mass in each cubic metre, then the mass of a solid is

\[ m = \iiint \rho\,dV \]

Take a tank 2 m by 1 m across and 3 m deep, holding a liquid that's denser towards the bottom: \(\rho = 1200 - 100z\) kg/m³, where \(z\) is the height in metres above the floor. Nothing depends on \(x\) or \(y\), so those two integrals just multiply by the lengths 2 and 1, and one real integral is left:

\[ m = 2 \times 1 \times \int_0^3 (1200 - 100z)\,dz \]

The integral is \(\left[1200z - 50z^2\right]_0^3 = 3600 - 450 = 3150\), so \(m = 2 \times 3150 = 6300\) kg.

And for anything round, cut it to fit, as with the rings. A ball is a nest of thin shells. The shell at radius \(r\) has the area of a sphere, \(4\pi r^2\), and thickness \(dr\), so the ball's volume is

\[ \int_0^R 4\pi r^2\,dr = \tfrac{4}{3}\pi R^3 \]

Physics keeps asking for totals of things that are spread out. The charge in a region is its charge density integrated over the volume, which is one side of Gauss's law. The other side is a field added up over a surface, a double integral you'll meet in the next lesson. The pull of a planet is the pull of every piece of it, added up. And in quantum mechanics the chance of finding an electron inside some region is a triple integral of the wavefunction's size squared over that region. The hydrogen atom is worked out in \(r\) and two angles, with its own version of the extra \(r\).

Problems

Work out \(\displaystyle\int_0^3\!\left(\int_0^2 (x + y)\,dy\right)dx\). Then do it in the other order and check that you get the same number.

Answer

Inside first, with \(x\) held still: \(\int_0^2 (x + y)\,dy = \left[xy + \tfrac{1}{2}y^2\right]_0^2 = 2x + 2\). Then \(\int_0^3 (2x + 2)\,dx = \left[x^2 + 2x\right]_0^3 = 9 + 6 = 15\).

The other order: \(\int_0^3 (x + y)\,dx = \left[\tfrac{1}{2}x^2 + xy\right]_0^3 = 4.5 + 3y\). Then \(\int_0^2 (4.5 + 3y)\,dy = \left[4.5y + 1.5y^2\right]_0^2 = 9 + 6 = 15\).

In the first figure, choose "A sloping roof" over the full floor, 2 by 2. Its height is \(1 + x\). Find the volume under it without calculus, from the floor's area and the roof's average height. Then find it with a double integral, and check both against the figure.

Answer

The roof rises evenly from 1 to 3, so its average height is 2. The floor's area is 4, and \(4 \times 2 = 8\).

With an integral: \(\int_0^2 (1 + x)\,dy = 2(1 + x)\), the area of the slice at \(x\). Then \(\int_0^2 2(1 + x)\,dx = 2\left[x + \tfrac{1}{2}x^2\right]_0^2 = 2 \times 4 = 8\). The figure's exact volume is 8.00.

A metal plate is 2 m long and 1 m wide, and gets thicker towards one end. At a distance \(x\) along it, each square metre has a mass of \(3 + 2x\) kg. What's the mass of the plate? What would it be if it were as thin as its thin end all the way along?

Answer

The mass is \(\iint (3 + 2x)\,dA\), with \(x\) from 0 to 2 and \(y\) from 0 to 1. Nothing depends on \(y\), so the inside integral just multiplies by the width, 1. That leaves \(\int_0^2 (3 + 2x)\,dx = \left[3x + x^2\right]_0^2 = 6 + 4 = 10\) kg.

At 3 kg on every square metre it would be \(3 \times 2 = 6\) kg.

Integrate \(f = xy\) over the triangle with corners \((0, 0)\), \((1, 0)\) and \((1, 1)\). The slice at \(x\) runs from \(y = 0\) up to \(y = x\).

Answer

The inside integral has \(x\) as its upper limit: \(\int_0^x xy\,dy = x\left[\tfrac{1}{2}y^2\right]_0^x = \tfrac{1}{2}x^3\).

Then \(\int_0^1 \tfrac{1}{2}x^3\,dx = \left[\tfrac{1}{8}x^4\right]_0^1 = \tfrac{1}{8}\).

A dome has height \(4 - x^2 - y^2\) above the ground, and stands on a disc of radius 2 (where its height has come down to zero). Find its volume. In polar coordinates \(x^2 + y^2 = r^2\), so the height is \(4 - r^2\).

Answer

\(\int_0^{2\pi}\!\left(\int_0^2 (4 - r^2)\,r\,dr\right)d\theta\). Multiply the extra \(r\) in before integrating: \((4 - r^2)\,r = 4r - r^3\).

Inside: \(\int_0^2 (4r - r^3)\,dr = \left[2r^2 - \tfrac{1}{4}r^4\right]_0^2 = 8 - 4 = 4\).

Nothing depends on \(\theta\), so the outside integral multiplies by \(2\pi\): the volume is \(8\pi \approx 25.1\).

A washer is a disc of radius \(R\) with a hole of radius \(a\) cut from its middle. Its mass is \(M\), spread evenly over what's left. Find its moment of inertia about its centre. Then check your answer when the hole shrinks to nothing, and when it grows until only a thin hoop is left.

Answer

The only changes from the disc are the area and the limits. The area left is \(\pi R^2 - \pi a^2\), so \(\sigma = \frac{M}{\pi(R^2 - a^2)}\), and \(r\) now runs from \(a\) to \(R\):

\(I = 2\pi\sigma\int_a^R r^3\,dr = 2\pi\sigma \times \tfrac{1}{4}(R^4 - a^4) = \tfrac{1}{2}\pi\sigma(R^4 - a^4)\).

A difference of two squares factorises: \(R^4 - a^4 = (R^2 - a^2)(R^2 + a^2)\). Putting \(\sigma\) in, the \(\pi\) and the \((R^2 - a^2)\) both cancel:

\(I = \tfrac{1}{2}M(R^2 + a^2)\).

With no hole, \(a = 0\) and this is \(\frac{1}{2}MR^2\), the disc. With \(a\) nearly equal to \(R\) it's nearly \(\frac{1}{2}M \times 2R^2 = MR^2\), the hoop. A washer sits between the two.

Learn more

An unhandled error has occurred. Reload 🗙