29 min read

For five chapters you have been climbing a ladder of integration. Each rung integrates something over a region of higher dimension, and the pattern is so consistent it is almost a single idea wearing different clothes:

Prerequisites

  • Chapter 32: Multiple Integrals
  • Chapter 35: Line Integrals

Learning Objectives

  • Parametrize a surface and compute its area.
  • Compute scalar surface integrals $\iint_S f \, dS$.
  • Compute flux $\iint_S \mathbf{F} \cdot d\mathbf{S}$.
  • Apply surface integrals to physical fluxes (heat, fluid, electric).
  • Distinguish oriented and unoriented surface integrals.

Chapter 36 — Surface Integrals

36.1 From Curves to Surfaces

For five chapters you have been climbing a ladder of integration. Each rung integrates something over a region of higher dimension, and the pattern is so consistent it is almost a single idea wearing different clothes:

  • Over an interval: $\int_a^b f\,dx$ — the definite integral of Chapter 13.
  • Over a flat 2D region: $\iint_R f\,dA$ — the double integral of Chapter 32.
  • Along a curve in space: $\int_C f\,ds$ — the scalar line integral of Chapter 35.

Each one chops the domain into tiny pieces, weights each piece by the value of $f$ there, and sums. The only thing that changes from rung to rung is the shape of the pieces and how we measure their size.

This chapter adds the next rung: integration over a surface sitting in three-dimensional space. A surface is a curved two-dimensional region — the skin of a sphere, the wall of a cylinder, the graph of a function $z = g(x,y)$. We will write a scalar surface integral as $\iint_S f\,dS$, and then, for vector fields, we will build the single most physically important object in this chapter: the flux $\iint_S \mathbf{F}\cdot d\mathbf{S}$, the rate at which a field crosses the surface.

The Key Insight. A surface integral is to a curve what a double integral is to an interval. To integrate over a curved surface, we flatten it back into a flat parameter region — where we already know how to integrate — and pay a stretching factor that records how much the parametrization distorts area. Every surface-integral computation is "double integral plus a stretching factor."

This is the line-integral story of Chapter 35 told one dimension up. There, a curve $\mathbf{r}(t)$ was traced by one parameter and the stretching factor was $\|\mathbf{r}'(t)\|$. Here a surface $\mathbf{r}(u,v)$ is swept out by two parameters, and the stretching factor will turn out to be $\|\mathbf{r}_u \times \mathbf{r}_v\|$. Same idea, one more parameter. And just as line integrals fed straight into Green's Theorem, the flux integrals of this chapter are exactly the objects that Stokes' Theorem and the Divergence Theorem (Chapter 37) will relate to boundary integrals.

36.2 Parametrized Surfaces

A curve needs one parameter to trace it; a surface needs two. A parametrized surface is a vector function

$$\mathbf{r}(u, v) = \langle x(u, v),\, y(u, v),\, z(u, v) \rangle,$$

where $(u, v)$ ranges over a flat two-dimensional parameter domain $D$ in the $uv$-plane. As $(u,v)$ sweeps across $D$, the tip of $\mathbf{r}$ paints out the surface $S$ in three-dimensional space.

This is the direct descendant of the parametric curves you met back in Chapter 25. There a single parameter $t$ gave $\mathbf{r}(t)$; here two independent parameters give a two-dimensional sheet. Holding $v$ fixed and varying $u$ traces a curve on the surface (a "$u$-curve"); holding $u$ fixed and varying $v$ traces a "$v$-curve." Together these two families form a curvilinear grid drawn on $S$ — the latitude-and-longitude lines on a globe are exactly such a grid.

Geometric Intuition. Picture a flat rubber sheet, the rectangle $D$ in the $uv$-plane, printed with ordinary graph paper. The map $\mathbf{r}$ picks up that sheet and stretches, bends, and wraps it into three dimensions. The horizontal grid lines become $u$-curves; the vertical grid lines become $v$-curves. Where $\mathbf{r}$ stretches the rubber a lot, the printed grid squares become large patches on $S$; where it barely stretches, they stay small. The whole game of surface integration is measuring how big each patch became.

Here is a catalog of the parametrizations we will use repeatedly.

Plane. $\mathbf{r}(u, v) = \mathbf{r}_0 + u\,\mathbf{a} + v\,\mathbf{b}$, where $\mathbf{a}$ and $\mathbf{b}$ are two non-parallel direction vectors through the point $\mathbf{r}_0$.

Graph of a function $z = g(x, y)$. The simplest case of all: use $x$ and $y$ themselves as parameters, $$\mathbf{r}(x, y) = \langle x,\, y,\, g(x, y) \rangle, \qquad (x,y)\in D.$$

Sphere of radius $R$ (centered at the origin). Using the spherical angles $\phi$ (polar angle from the north pole) and $\theta$ (azimuthal angle), $$\mathbf{r}(\phi, \theta) = \langle R\sin\phi\cos\theta,\ R\sin\phi\sin\theta,\ R\cos\phi \rangle, \qquad 0 \le \phi \le \pi,\ 0 \le \theta < 2\pi.$$

Cylinder of radius $R$. $\mathbf{r}(\theta, z) = \langle R\cos\theta,\ R\sin\theta,\ z \rangle$, with $\theta$ around and $z$ along the axis.

Torus (radius $R$ from center to tube center, tube radius $r$). $\mathbf{r}(\phi, \theta) = \langle (R + r\cos\phi)\cos\theta,\ (R + r\cos\phi)\sin\theta,\ r\sin\phi \rangle$.

Check Your Understanding. What surface does $\mathbf{r}(u,v) = \langle u\cos v,\ u\sin v,\ u\rangle$, with $u \ge 0$ and $0 \le v < 2\pi$, describe? (Hint: what is the relationship between the $z$-coordinate and the distance from the $z$-axis?)

AnswerThe distance from the $z$-axis is $\sqrt{(u\cos v)^2 + (u\sin v)^2} = |u| = u$, which equals the height $z = u$. A surface where height equals horizontal distance from the axis is a cone opening upward at $45^\circ$, with its vertex at the origin. The parameter $u$ is the height (and also the radius at that height); $v$ is the angle around the axis.

36.3 The Surface Area Element $dS$

To integrate over $S$ we need to know the area of a tiny patch. Consider a small rectangle in the parameter domain with corner $(u,v)$ and side lengths $du$ and $dv$. Its four corners map to four nearby points on $S$, and for small $du, dv$ the patch is very nearly a flat parallelogram.

What are the sides of that parallelogram? Moving by $du$ in the $u$-direction shifts the surface point by approximately $\mathbf{r}_u\,du$, where $\mathbf{r}_u = \partial\mathbf{r}/\partial u$ is the tangent vector along the $u$-curve. Likewise moving by $dv$ shifts it by $\mathbf{r}_v\,dv$. So the patch is the parallelogram spanned by the two edge vectors $\mathbf{r}_u\,du$ and $\mathbf{r}_v\,dv$.

The area of a parallelogram spanned by two vectors is the magnitude of their cross product. Therefore the surface area element is

$$\boxed{\,dS = \|\mathbf{r}_u \times \mathbf{r}_v\|\,du\,dv\,}.$$

The vector $\mathbf{r}_u \times \mathbf{r}_v$ does double duty. Its magnitude is the local area-scaling factor — exactly the "stretching factor" promised in §36.1. Its direction is perpendicular to both tangent vectors, hence normal to the surface. We will lean on that normal direction in §36.5 when we orient the surface.

Geometric Intuition. $\mathbf{r}_u$ and $\mathbf{r}_v$ are the two "grid directions" living tangent to the surface at a point. The cross product $\mathbf{r}_u\times\mathbf{r}_v$ measures both how much area their little parallelogram encloses (its length) and which way the surface faces (its direction). When the grid lines on $S$ are far apart, $\|\mathbf{r}_u\times\mathbf{r}_v\|$ is large; when they bunch together, it is small. It is the Jacobian of Chapter 33, now living on a curved surface.

Worked Example: the area element of a sphere

Take the sphere $\mathbf{r}(\phi, \theta) = \langle R\sin\phi\cos\theta,\ R\sin\phi\sin\theta,\ R\cos\phi \rangle$. Differentiate:

$$\mathbf{r}_\phi = \langle R\cos\phi\cos\theta,\ R\cos\phi\sin\theta,\ -R\sin\phi \rangle,$$ $$\mathbf{r}_\theta = \langle -R\sin\phi\sin\theta,\ R\sin\phi\cos\theta,\ 0 \rangle.$$

Compute the cross product component by component:

$$\mathbf{r}_\phi \times \mathbf{r}_\theta = \big\langle R^2\sin^2\phi\cos\theta,\ R^2\sin^2\phi\sin\theta,\ R^2\sin\phi\cos\phi \big\rangle.$$

Its magnitude factors cleanly. Pull out $R^2\sin\phi$ (which is $\ge 0$ since $0\le\phi\le\pi$):

$$\|\mathbf{r}_\phi \times \mathbf{r}_\theta\| = R^2\sin\phi\,\sqrt{\sin^2\phi\cos^2\theta + \sin^2\phi\sin^2\theta + \cos^2\phi} = R^2\sin\phi\,\sqrt{\sin^2\phi + \cos^2\phi} = R^2\sin\phi.$$

So for the sphere, $$dS = R^2\sin\phi\,d\phi\,d\theta.$$

As a sanity check, integrate $dS$ over the whole parameter domain to recover the total surface area:

$$\text{Area} = \int_0^{2\pi}\!\!\int_0^\pi R^2\sin\phi\,d\phi\,d\theta = R^2\Big(\!\int_0^\pi \sin\phi\,d\phi\Big)\Big(\!\int_0^{2\pi}\!d\theta\Big) = R^2 \cdot 2 \cdot 2\pi = 4\pi R^2. \checkmark$$

The familiar $4\pi R^2$ falls out of the machinery, our first confirmation that the area element is right.

The special case of a graph $z = g(x,y)$

When the surface is the graph of a function, the parametrization $\mathbf{r}(x,y) = \langle x, y, g(x,y)\rangle$ gives tangent vectors

$$\mathbf{r}_x = \langle 1, 0, g_x \rangle, \qquad \mathbf{r}_y = \langle 0, 1, g_y \rangle,$$

and their cross product is

$$\mathbf{r}_x \times \mathbf{r}_y = \langle -g_x,\ -g_y,\ 1 \rangle, \qquad \|\mathbf{r}_x \times \mathbf{r}_y\| = \sqrt{1 + g_x^2 + g_y^2}.$$

So the surface area of a graph over a region $D$ is

$$\boxed{\,S = \iint_D \sqrt{1 + g_x^2 + g_y^2}\,dA\,}.$$

This is the exact two-dimensional analog of the arc-length formula $\int\sqrt{1 + f'(x)^2}\,dx$ from Chapter 18: the $1$ accounts for the flat base, and the squared partials account for the tilt. A steep graph has a large $\sqrt{1+g_x^2+g_y^2}$ and so packs more surface area above each unit of floor.

Common Pitfall. Many students write $dS = dA$ for a graph — they integrate the function over its shadow $D$ and forget the $\sqrt{1+g_x^2+g_y^2}$ factor entirely. That is only correct when the surface is horizontal ($g_x = g_y = 0$). For any tilted or curved surface the factor is strictly greater than $1$, so dropping it underestimates the area. The factor is the whole point of a surface integral; without it you have merely computed a double integral over the shadow.

36.4 Scalar Surface Integrals

With the area element in hand, the scalar surface integral is defined exactly as you would guess: weight each patch by the value of $f$ there, and sum.

$$\iint_S f\,dS = \iint_D f\big(\mathbf{r}(u, v)\big)\,\|\mathbf{r}_u \times \mathbf{r}_v\|\,du\,dv.$$

The right-hand side is an ordinary double integral over the flat parameter domain $D$ — which is the whole strategy of §36.1 made literal. You substitute the parametrization into $f$, multiply by the stretching factor, and integrate over $D$.

When $f \equiv 1$, this reduces to the surface area itself. More interestingly, when $f$ represents a density spread over the surface, the integral computes a physical total:

  • Mass of a thin sheet with surface density $\sigma$ (mass per unit area): $M = \iint_S \sigma\,dS$.
  • Total charge on a charged surface with charge density $\sigma$: $Q = \iint_S \sigma\,dS$.
  • Center of mass: $\bar{x} = \dfrac{1}{M}\iint_S x\,\sigma\,dS$, and similarly for $\bar y, \bar z$.
  • Average value of $f$ over $S$: $\bar f = \dfrac{1}{\text{Area}(S)}\iint_S f\,dS$.

Worked Example: a moment over a hemisphere

Let $S$ be the upper unit hemisphere $z = \sqrt{1 - x^2 - y^2}$, and integrate $f = z$ over it. Use the spherical parametrization with $R = 1$, restricting $\phi$ to $[0, \pi/2]$ so we stay on the top half. On the sphere, $z = \cos\phi$, and we found $dS = \sin\phi\,d\phi\,d\theta$. Therefore

$$\iint_S z\,dS = \int_0^{2\pi}\!\!\int_0^{\pi/2} (\cos\phi)(\sin\phi)\,d\phi\,d\theta.$$

The inner integral uses $\int_0^{\pi/2}\cos\phi\sin\phi\,d\phi = \tfrac12\sin^2\phi\big|_0^{\pi/2} = \tfrac12$, so

$$\iint_S z\,dS = \int_0^{2\pi} \tfrac12\,d\theta = 2\pi\cdot\tfrac12 = \pi.$$

Because the hemisphere has area $2\pi(1)^2 = 2\pi$, the average height of a point on the dome is $\pi / (2\pi) = \tfrac12$. That is a satisfying answer: the centroid of a hemispherical shell sits at exactly half its radius above the equatorial plane.

Check Your Understanding. A thin metal hemispherical shell of radius $1$ has uniform surface density $\sigma = 3$ (mass per unit area). What is its total mass?

AnswerMass is $\iint_S \sigma\,dS = 3\iint_S dS = 3\cdot\text{Area}(S)$. The hemisphere has area $\tfrac12(4\pi\cdot 1^2) = 2\pi$, so $M = 3\cdot 2\pi = 6\pi \approx 18.85$. For a uniform density you never need the patch-by-patch integral — density times area suffices. The integral earns its keep only when $\sigma$ varies across the surface.

36.5 Orientation and the Unit Normal

So far the surface has had no "sides." For scalar integrals that is fine — area and mass do not care which way the surface faces. But flux does: to ask "how much fluid crosses $S$ outward" you must first decide which way "outward" points. This is the idea of orientation.

To orient a surface is to choose a continuous unit normal vector $\hat{\mathbf{n}}$ at every point, varying smoothly as you slide around $S$. At each point there are exactly two candidates, $\hat{\mathbf{n}}$ and $-\hat{\mathbf{n}}$; choosing one consistently across the whole surface selects a "positive side." From the parametrization, the natural normal is

$$\hat{\mathbf{n}} = \frac{\mathbf{r}_u \times \mathbf{r}_v}{\|\mathbf{r}_u \times \mathbf{r}_v\|},$$

and the opposite choice $-\hat{\mathbf{n}}$ comes from swapping the roles of $u$ and $v$ (since $\mathbf{r}_v\times\mathbf{r}_u = -\,\mathbf{r}_u\times\mathbf{r}_v$).

Standard conventions fix the sign in practice:

  • Closed surface (a sphere, a box — anything enclosing a solid region): choose the outward normal.
  • Graph $z = g(x,y)$: choose the upward normal, the one with positive $z$-component; from $\mathbf{r}_x\times\mathbf{r}_y = \langle -g_x, -g_y, 1\rangle$ this is automatic.
  • Open surface bounded by a curve: the orientation must be compatible with the direction of travel around the boundary — the right-hand rule that Stokes' Theorem will demand in Chapter 37.

Warning — Non-orientable surfaces. Not every surface can be oriented. The famous Möbius band — a strip of paper given a half-twist before its ends are joined — has only one side. Start with a normal vector pointing "up," slide it once around the loop, and it returns pointing "down": there is no consistent global choice of $\hat{\mathbf{n}}$. A surface admitting a continuous unit normal is called orientable; the Möbius band is the standard counterexample of a surface that is not. Flux integrals are simply undefined on non-orientable surfaces, because the very question "which way is across?" has no answer. Every surface we integrate vector fields over in this book is orientable; the Möbius band is the cautionary tale that tells you orientability is an assumption, not a freebie.

Math Major Sidebar — Why the surface integral is well-defined. A surface admits many parametrizations: the same sphere can be swept by spherical angles, by stereographic coordinates, or by patches of graphs. For $\iint_S f\,dS$ to be a property of the surface rather than of our arbitrary choice of $\mathbf{r}$, it must give the same number under any reparametrization. It does. If $\mathbf{r}(u,v)$ and $\tilde{\mathbf{r}}(s,t)$ describe $S$ with a smooth change of parameters, the chain rule makes the area factors transform by the Jacobian of that change, $\|\tilde{\mathbf{r}}_s\times\tilde{\mathbf{r}}_t\| = \|\mathbf{r}_u\times\mathbf{r}_v\|\,\big|\partial(u,v)/\partial(s,t)\big|$ — and the change-of-variables theorem from Chapter 33 absorbs that Jacobian exactly, leaving the integral unchanged. The scalar integral $\iint_S f\,dS$ is therefore fully parametrization-independent. The flux integral is independent only up to the sign set by orientation: a reparametrization that reverses orientation (negative Jacobian) flips $\hat{\mathbf{n}}$ to $-\hat{\mathbf{n}}$ and negates the flux. This is exactly why orientation had to be chosen by hand in §36.5 — the surface alone does not determine the sign; you must.

For surfaces given implicitly by an equation $G(x,y,z) = 0$, the gradient gives the normal directly — no parametrization needed. Since $\nabla G$ is perpendicular to every level surface of $G$,

$$\hat{\mathbf{n}} = \frac{\nabla G}{\|\nabla G\|}.$$

For the sphere $G = x^2 + y^2 + z^2 - R^2$, this gives $\nabla G = 2\langle x,y,z\rangle$ and $\|\nabla G\| = 2R$, so $\hat{\mathbf{n}} = \langle x,y,z\rangle / R$ — the outward radial unit vector, exactly as expected. This is a payoff of the gradient's geometric meaning from Chapter 30: the gradient always points perpendicular to level sets.

36.6 Vector Surface Integrals: Flux

Now the centerpiece. Given an oriented surface $S$ with unit normal $\hat{\mathbf{n}}$ and a vector field $\mathbf{F}$, the flux of $\mathbf{F}$ through $S$ is

$$\iint_S \mathbf{F}\cdot d\mathbf{S} \;=\; \iint_S (\mathbf{F}\cdot\hat{\mathbf{n}})\,dS.$$

The dot product $\mathbf{F}\cdot\hat{\mathbf{n}}$ is the component of $\mathbf{F}$ in the normal direction — the part of the field that actually pierces the surface. The part of $\mathbf{F}$ tangent to $S$ slides along the surface and contributes nothing to crossing it. Flux integrates the piercing component over the whole surface.

To compute it, recall that $\hat{\mathbf{n}}\,dS = \dfrac{\mathbf{r}_u\times\mathbf{r}_v}{\|\mathbf{r}_u\times\mathbf{r}_v\|}\cdot\|\mathbf{r}_u\times\mathbf{r}_v\|\,du\,dv = (\mathbf{r}_u\times\mathbf{r}_v)\,du\,dv$. The normalizing magnitude cancels beautifully, leaving the clean working formula

$$\boxed{\;\iint_S \mathbf{F}\cdot d\mathbf{S} = \iint_D \mathbf{F}\big(\mathbf{r}(u,v)\big)\cdot(\mathbf{r}_u\times\mathbf{r}_v)\,du\,dv\;}.$$

You never have to normalize the normal: the same vector $\mathbf{r}_u\times\mathbf{r}_v$ that gave you area now gives you flux, with no square roots in sight. (Watch its direction, though — if it points the wrong way for your chosen orientation, negate the answer.)

Geometric Intuition. Imagine $\mathbf{F}$ as the velocity field of a flowing fluid and $S$ as an imaginary net held in the stream. Where the flow runs straight through the net, $\mathbf{F}$ and $\hat{\mathbf{n}}$ align and $\mathbf{F}\cdot\hat{\mathbf{n}}$ is large and positive — lots of fluid per second crossing in the positive direction. Where the flow skims along the net, $\mathbf{F}\perp\hat{\mathbf{n}}$ and nothing crosses. Where the flow runs backward through the net, $\mathbf{F}\cdot\hat{\mathbf{n}} < 0$. The flux integral tallies the net volume per second passing through, counting backward flow as negative. This is the line-integral idea of "work" from Chapter 35 turned sideways: there we dotted $\mathbf{F}$ with the tangent to a curve; here we dot it with the normal to a surface.

The physical readings of flux are the reason this chapter matters:

  • $\mathbf{F} = $ fluid velocity $\Rightarrow$ flux is the volume of fluid crossing $S$ per unit time.
  • $\mathbf{F} = $ heat flow $\Rightarrow$ flux is the heat energy crossing $S$ per unit time.
  • $\mathbf{F} = $ electric field $\Rightarrow$ flux is the electric flux (Gauss's law, §36.9).

Worked Example: the inverse-square field through a sphere

This calculation is one of the most consequential in all of physics. Take the radial inverse-square field

$$\mathbf{F} = \frac{\mathbf{r}}{\|\mathbf{r}\|^3} = \frac{\langle x,y,z\rangle}{(x^2+y^2+z^2)^{3/2}},$$

which models gravity and electrostatics, and compute its outward flux through the sphere of radius $R$ centered at the origin.

On that sphere $\|\mathbf{r}\| = R$, so $\mathbf{F} = \mathbf{r}/R^3$, and the outward unit normal is $\hat{\mathbf{n}} = \mathbf{r}/R$. Then

$$\mathbf{F}\cdot\hat{\mathbf{n}} = \frac{\mathbf{r}}{R^3}\cdot\frac{\mathbf{r}}{R} = \frac{\mathbf{r}\cdot\mathbf{r}}{R^4} = \frac{R^2}{R^4} = \frac{1}{R^2},$$

a constant over the whole sphere. The flux is therefore just that constant times the area:

$$\iint_S \mathbf{F}\cdot d\mathbf{S} = \frac{1}{R^2}\cdot 4\pi R^2 = 4\pi.$$

The radius cancels completely. A sphere of radius $1$ meter and a sphere of radius $1$ kilometer, both centered on the source, capture exactly the same flux, $4\pi$. Geometrically, the field weakens as $1/R^2$ at precisely the rate the area grows as $R^2$, and the two effects annihilate. This radius-independence is Gauss's law in disguise; for a true electric field it becomes $q/\varepsilon_0$, and we will see in §36.9 why it holds for any closed surface around the charge, not just spheres.

Real-World Application — Aerodynamics and ventilation (engineering). Engineers designing an HVAC duct, an aircraft intake, or a cooling fan all need the volumetric flow rate through a cross-section: how many cubic meters of air pass per second. That is literally $\iint_S \mathbf{v}\cdot d\mathbf{S}$ for the air-velocity field $\mathbf{v}$. In computational fluid dynamics the surface is broken into thousands of small panels, the velocity is sampled at each panel center, and the flux is summed panel by panel — the discrete version of this integral. Sizing a fan, certifying a fume hood, or balancing the airflow in a building all come down to evaluating surface integrals of a velocity field.

36.7 Computing Flux: Three Standard Cases

In practice three surface types cover most problems, and each has a ready-made flux formula. Throughout, write $\mathbf{F} = \langle P, Q, R\rangle$.

Graph $z = g(x,y)$, upward normal

With $\mathbf{r}_x\times\mathbf{r}_y = \langle -g_x, -g_y, 1\rangle$, the flux is

$$\iint_S \mathbf{F}\cdot d\mathbf{S} = \iint_D \big(-P\,g_x - Q\,g_y + R\big)\,dA,$$

where $P, Q, R$ are evaluated at $(x, y, g(x,y))$ and $D$ is the surface's shadow in the $xy$-plane. This turns a flux into an ordinary double integral over $D$.

Sphere of radius $R$, outward normal

Here $\hat{\mathbf{n}} = \mathbf{r}/R$ and $dS = R^2\sin\phi\,d\phi\,d\theta$, so

$$\iint_S \mathbf{F}\cdot d\mathbf{S} = \iint_S \frac{\mathbf{F}\cdot\mathbf{r}}{R}\,dS = \int_0^{2\pi}\!\!\int_0^{\pi}\frac{\mathbf{F}\cdot\mathbf{r}}{R}\,R^2\sin\phi\,d\phi\,d\theta.$$

Cylinder of radius $R$, outward (radial) normal

For the side wall, $\hat{\mathbf{n}} = \langle\cos\theta, \sin\theta, 0\rangle$ and $dS = R\,d\theta\,dz$, giving

$$\iint_S \mathbf{F}\cdot d\mathbf{S} = \int\!\!\int \big(P\cos\theta + Q\sin\theta\big)\,R\,d\theta\,dz.$$

Notice the cylinder's normal has no $z$-component, so a purely vertical field has zero flux through the side wall — it slides along the wall without crossing it. That is the kind of structural shortcut a good orientation choice reveals.

Worked Example: flux through a graph

Compute the upward flux of $\mathbf{F} = \langle x, y, z\rangle$ through the piece of the paraboloid $z = g(x,y) = 4 - x^2 - y^2$ lying above the disk $D: x^2 + y^2 \le 4$. Here $g_x = -2x$ and $g_y = -2y$, and on the surface $R = z = 4 - x^2 - y^2$. The graph formula gives

$$\iint_S \mathbf{F}\cdot d\mathbf{S} = \iint_D \big(-P\,g_x - Q\,g_y + R\big)\,dA = \iint_D \big(2x^2 + 2y^2 + 4 - x^2 - y^2\big)\,dA = \iint_D \big(x^2 + y^2 + 4\big)\,dA.$$

Switch to polar coordinates, where $x^2 + y^2 = \rho^2$ and $dA = \rho\,d\rho\,d\theta$, with $\rho$ from $0$ to $2$:

$$\int_0^{2\pi}\!\!\int_0^{2} (\rho^2 + 4)\,\rho\,d\rho\,d\theta = 2\pi\int_0^2 (\rho^3 + 4\rho)\,d\rho = 2\pi\Big[\tfrac{\rho^4}{4} + 2\rho^2\Big]_0^2 = 2\pi(4 + 8) = 24\pi.$$

The flux is positive, as it must be: the position field points outward and upward through a dome that faces up, so $\mathbf{F}$ and $\hat{\mathbf{n}}$ broadly agree everywhere on $S$. Reversing the orientation to the downward normal would flip the sign to $-24\pi$ — the same fluid crossing the same surface, now counted as leaving rather than entering.

Common Pitfall. When the same closed surface is built from several pieces — say a cylinder capped by two disks — students often compute the flux through one piece and stop, or they forget to flip the normal on a piece so that "outward" is consistent everywhere. For a closed surface every face's normal must point out of the enclosed solid; the bottom cap's outward normal points down, not up. Total flux through a closed surface is the sum over all faces, each with its own correctly-oriented normal. Mixing orientations silently turns a $+$ into a $-$ and corrupts the whole answer.

36.8 Fluid Flux, Heat Flux, and the Continuity Idea

Two applications recur so often they deserve their own statements, and both are pure surface integrals.

Mass flow of a fluid. A fluid of density $\rho$ moving with velocity field $\mathbf{v}$ carries mass across $S$ at the rate

$$\dot m = \iint_S \rho\,\mathbf{v}\cdot d\mathbf{S}.$$

For an incompressible fluid ($\rho$ constant) this is just $\rho$ times the volume flow rate $\iint_S \mathbf{v}\cdot d\mathbf{S}$. The deep statement lurking here is the continuity equation, $\partial_t\rho + \nabla\cdot(\rho\mathbf{v}) = 0$, which says mass is neither created nor destroyed: whatever flows out through the boundary of a region must equal the rate at which mass inside it decreases. That sentence is precisely what the Divergence Theorem of Chapter 37 will make rigorous, converting the boundary flux into a volume integral of $\nabla\cdot(\rho\mathbf{v})$.

Heat flow. Fourier's law states that heat flows down a temperature gradient: the heat-flux field is $\mathbf{q} = -k\,\nabla T$, where $T(x,y,z)$ is temperature and $k > 0$ is the thermal conductivity. The minus sign encodes that heat moves from hot to cold (opposite the gradient, which points toward increasing $T$). The rate of heat energy crossing a surface $S$ is then

$$\dot Q = \iint_S \mathbf{q}\cdot d\mathbf{S} = -\iint_S k\,\nabla T\cdot d\mathbf{S}.$$

In steady state with no internal heat sources, the net flux through any closed surface is zero — heat in equals heat out — which is the integral form of the heat equation's conservation law.

Real-World Application — Building thermal design (mechanical engineering). To size a furnace or rate a wall's insulation, an engineer computes the heat flux $\dot Q = -\iint_S k\,\nabla T\cdot d\mathbf{S}$ through the building envelope. The temperature gradient $\nabla T$ across a wall and the conductivity $k$ of its materials together fix how fast heat leaks out. The "R-value" printed on insulation is, under the hood, a statement about this surface integral: higher R means a smaller flux for the same temperature difference, hence a lower heating bill. The same integral, with $k$ for silicon and $T$ from a thermal-simulation, tells chip designers whether a processor will overheat.

36.9 Electric Flux and Gauss's Law

The inverse-square calculation of §36.6 was a preview of one of the four Maxwell equations. For an electric field $\mathbf{E}$, the electric flux through a surface is

$$\Phi_E = \iint_S \mathbf{E}\cdot d\mathbf{S},$$

and Gauss's law (integral form) states that the flux through any closed surface equals the total enclosed charge divided by the permittivity of free space $\varepsilon_0$:

$$\oiint_S \mathbf{E}\cdot d\mathbf{S} = \frac{Q_{\text{enc}}}{\varepsilon_0}.$$

(The circle on the integral sign marks a closed surface.) The field of a point charge $q$ is $\mathbf{E} = \dfrac{q}{4\pi\varepsilon_0}\dfrac{\mathbf{r}}{\|\mathbf{r}\|^3}$ — the inverse-square field again, scaled by $q/(4\pi\varepsilon_0)$. From §36.6 the bare field had flux $4\pi$ through any centered sphere, so

$$\Phi_E = \frac{q}{4\pi\varepsilon_0}\cdot 4\pi = \frac{q}{\varepsilon_0},$$

matching Gauss's law exactly. The remarkable part is that the surface need not be a sphere: because the inverse-square field has zero divergence everywhere except at the charge, the Divergence Theorem (Chapter 37) guarantees the same flux $q/\varepsilon_0$ through any closed surface enclosing $q$ — a cube, a blob, anything. Gauss's law is what lets physicists deduce the field of a symmetric charge distribution without ever integrating the field directly: pick a clever surface, read off the enclosed charge, done.

Historical Note. Carl Friedrich Gauss (1777–1855) formulated this flux law in the 1830s, though the underlying inverse-square geometry traces to Joseph-Louis Lagrange and earlier. When James Clerk Maxwell assembled his electromagnetic equations in the 1860s, Gauss's law for the electric field (and its twin $\oiint\mathbf{B}\cdot d\mathbf{S} = 0$, asserting there are no magnetic monopoles) became two of the four. Every one of Maxwell's equations is either a flux integral or a circulation integral — which is to say, the surface and line integrals of this part of the book are the language of classical electromagnetism.

Check Your Understanding. Two point charges, $+5$ and $-3$ (in units where $\varepsilon_0 = 1$), sit inside a closed surface $S$; a third charge $+10$ sits outside $S$. What is the total electric flux $\oiint_S \mathbf{E}\cdot d\mathbf{S}$?

AnswerGauss's law counts only the enclosed charge: $Q_{\text{enc}} = 5 + (-3) = 2$, so the flux is $2/\varepsilon_0 = 2$. The outside charge contributes zero net flux — its field enters $S$ on one side and exits on the other, and the two cancel exactly. Charges outside a closed surface never contribute to its total flux. This cancellation is the Divergence Theorem at work: a source-free field has zero net flux through any closed surface.

36.10 The Bridge to Chapter 37: Stokes and Divergence

Surface integrals are not the end of the road — they are precisely the objects the two great theorems of the next chapter act on. Both are higher-dimensional cousins of the Fundamental Theorem of Calculus (Chapter 14), and both say the integral over a region equals something on its boundary.

Stokes' Theorem relates the flux of the curl of a field through a surface $S$ to the circulation of the field around the boundary curve $\partial S = C$:

$$\iint_S (\nabla\times\mathbf{F})\cdot d\mathbf{S} = \oint_C \mathbf{F}\cdot d\mathbf{r}.$$

The left side is a flux integral of the type we just built; the right side is the line integral of Chapter 35. Stokes' Theorem is the three-dimensional generalization of Green's Theorem.

The Divergence Theorem relates the flux of a field out through a closed surface $S$ to the integral of its divergence over the enclosed solid $E$:

$$\oiint_S \mathbf{F}\cdot d\mathbf{S} = \iiint_E (\nabla\cdot\mathbf{F})\,dV.$$

This is what makes Gauss's law work for arbitrary surfaces, and what turns the awkward boundary fluxes of §36.8 into clean volume integrals.

The Key Insight. Everything in this chapter — the area element, the unit normal, the flux integral — exists so that Chapter 37 has something to relate to a boundary. Surface integrals are the right-hand side of Stokes' Theorem and the left-hand side of the Divergence Theorem. Master the mechanics here, and the theorems of Chapter 37 become statements about objects you already know how to compute. They are, in the slogan of Chapter 14, just FTC in one more dimension: the integral of a derivative over a region equals the values on the boundary.

36.11 Surfaces of Revolution and Named Surfaces

A curve $y = f(x)$ on $[a,b]$, revolved about the $x$-axis, sweeps out a surface of revolution. Parametrize it by the height $x$ and the angle of revolution $\theta$:

$$\mathbf{r}(x, \theta) = \langle x,\ f(x)\cos\theta,\ f(x)\sin\theta\rangle.$$

Working through the cross product gives $dS = |f(x)|\sqrt{1 + f'(x)^2}\,dx\,d\theta$, and integrating $\theta$ from $0$ to $2\pi$ recovers the lateral-surface-area formula from Chapter 18:

$$S = 2\pi\int_a^b |f(x)|\sqrt{1 + f'(x)^2}\,dx.$$

This is the surface-integral re-derivation of a result you first met as an application of the definite integral — geometry and algebra arriving at the same formula from two directions, the recurring theme of this book. As a check, revolving $f(x) = \sqrt{R^2 - x^2}$ on $[-R, R]$ gives a sphere; the integral collapses to $2\pi\int_{-R}^{R} R\,dx = 4\pi R^2$, agreeing with §36.3.

The standard closed-form areas, all derivable by the same machinery, are worth memorizing:

Surface Lateral / total area
Sphere, radius $R$ $4\pi R^2$
Cylinder side, radius $R$, height $h$ $2\pi R h$
Cone, base radius $R$, slant height $\ell = \sqrt{R^2 + h^2}$ $\pi R \ell$
Torus, radii $R$ (center) and $r$ (tube) $4\pi^2 R r$

36.12 Computing Surface Integrals in Python

Closed-form surface integrals are pleasant when they exist, but most real surfaces and fields demand numerics. The pattern follows the three-tier convention of this book: pose the integral, reduce it to a double integral over the parameter domain, then evaluate that double integral with scipy.

The flux of the position field $\mathbf{F} = \langle x, y, z\rangle$ through the upper unit hemisphere has hand value $\iint_S \mathbf{F}\cdot d\mathbf{S}$. On the sphere $\mathbf{F}\cdot\hat{\mathbf{n}} = (\langle x,y,z\rangle)\cdot(\langle x,y,z\rangle/R) = R = 1$, and the hemisphere area is $2\pi$, so the flux is $2\pi$. Let us confirm that numerically.

import numpy as np
from scipy.integrate import dblquad

# Flux of F = <x, y, z> through the upper unit hemisphere, outward normal.
# Spherical parametrization, R = 1: F . n_hat = R = 1, and dS = R^2 sin(phi).
# Integrand for the parameter-domain double integral is (F . n_hat) * (dS area factor).
def flux_integrand(theta: float, phi: float, R: float = 1.0) -> float:
    F_dot_n = R                    # F . n_hat = R on the sphere of radius R
    dS_factor = R**2 * np.sin(phi) # surface area element R^2 sin(phi)
    return F_dot_n * dS_factor

# dblquad integrates over phi in [0, pi/2] (outer) and theta in [0, 2*pi] (inner).
result, _ = dblquad(flux_integrand, 0, np.pi/2, 0, 2*np.pi)
print(f"Numerical flux: {result:.6f}")  # Numerical flux: 6.283185
print(f"Hand value 2*pi: {2*np.pi:.6f}") # Hand value 2*pi: 6.283185

The two agree to six digits — the machine confirming the hand calculation, exactly the verification habit this book insists on. The same skeleton handles harder fields: replace F_dot_n with the genuine dot product $\mathbf{F}(\mathbf{r}(\phi,\theta))\cdot\hat{\mathbf{n}}(\phi,\theta)$ evaluated symbolically once, and the numerical integration does the rest.

Computational Note. scipy.integrate.dblquad(func, a, b, gfun, hfun) integrates func(y, x) with the outer variable $x$ running over $[a, b]$ and the inner variable $y$ over $[\,gfun(x),\, hfun(x)]$. The argument order is the reverse of how you read it — the first parameter of your integrand is the inner variable. Mixing up that order is the most common dblquad bug; here theta is inner and phi is outer, matching the call. When the parameter domain is a constant rectangle, as it is for a full sphere or hemisphere, pass plain numbers for the inner limits rather than functions.

We can also visualize the surface and its grid, making the parametrization of §36.2 tangible:

import numpy as np
import matplotlib.pyplot as plt

# Plot the upper unit hemisphere using its spherical parametrization.
phi = np.linspace(0, np.pi/2, 40)       # polar angle, top half only
theta = np.linspace(0, 2*np.pi, 60)     # azimuthal angle
PHI, THETA = np.meshgrid(phi, theta)
X = np.sin(PHI) * np.cos(THETA)
Y = np.sin(PHI) * np.sin(THETA)
Z = np.cos(PHI)

fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")
ax.plot_surface(X, Y, Z, alpha=0.7)     # the curvilinear grid IS the (phi, theta) net
ax.set_title("Hemisphere as a parametrized surface r(phi, theta)")
# Figure 36.1: the meshgrid lines are the u-curves and v-curves of the parametrization;
# each grid quadrilateral is one patch of area dS = sin(phi) dphi dtheta.
plt.show()

The grid you see drawn on the dome is exactly the $\phi$-curves and $\theta$-curves of §36.2; each little quadrilateral is one $dS$ patch, larger near the equator (where $\sin\phi$ is large) and shrinking to nothing at the pole (where $\sin\phi \to 0$). The picture and the area element $dS = \sin\phi\,d\phi\,d\theta$ are the same fact stated twice.

36.13 Discrete Surfaces: Triangulated Meshes

The continuous theory has a thoroughly practical discrete shadow. In computer graphics, CAD, and engineering simulation, curved surfaces are almost never represented by formulas; they are approximated by triangulated meshes — thousands or millions of flat triangles stitched together. The flux through such a mesh is a finite sum, one term per triangle:

$$\iint_S \mathbf{F}\cdot d\mathbf{S} \;\approx\; \sum_{\text{triangles } T}\mathbf{F}(\mathbf{c}_T)\cdot\hat{\mathbf{n}}_T\,A_T,$$

where $\mathbf{c}_T$ is the triangle's centroid, $\hat{\mathbf{n}}_T$ its unit normal, and $A_T$ its area. This is precisely the Riemann-sum definition of the surface integral — patches, normal components, areas, summed — with the patches now being honest flat triangles rather than infinitesimal parallelograms.

Real-World Application — Computational electromagnetics and graphics (data science / engineering). Antenna designers solve Maxwell's equations on triangulated meshes using the boundary-element and method-of-moments techniques, where every entry of the system matrix is a surface integral over mesh triangles. The same triangle-by-triangle flux sums drive radiosity and path-tracing in film and game rendering, where the "flux" being integrated is light energy across surfaces. Whenever a curved object lives inside a computer, its surface integrals have become finite sums over triangles — the theory of this chapter, discretized.

36.14 Add to Your Modeling Portfolio

Add to Your Modeling Portfolio. Add a flux computation to your model — the rate at which something crosses a boundary surface. Pick the track that matches your project and compute $\iint_S \mathbf{F}\cdot d\mathbf{S}$ for the relevant field. Biology: model transport across a cell membrane. With a concentration-driven flux field $\mathbf{F} = -D\nabla C$ (Fick's law, the diffusion twin of Fourier's heat law), compute the net molecular flux through a spherical membrane to quantify osmosis or nutrient uptake. Economics: model a commodity-flow field over a transport network and compute the net flow through a surface separating two regions — a continuous analog of trade balance across a border. Physics: compute the electric flux $\oiint_S \mathbf{E}\cdot d\mathbf{S} = Q_{\text{enc}}/\varepsilon_0$ for a charge distribution of your choosing, and verify Gauss's law by checking that the flux is independent of the surface you wrap around the charge. Data Science: integrate a probability-density flux over a high-dimensional surface, or use triangulated-mesh flux sums as a stepping stone toward the surface integrals that appear in manifold learning and normalizing-flow models.

Looking Ahead

You can now integrate a scalar over a surface, orient that surface with a unit normal, and compute the flux of a vector field through it. Three of the four Maxwell equations, the flow rate through any duct, and the heat loss through any wall are now within reach — each a surface integral you could set up and evaluate.

Chapter 37 is the climax of vector calculus. Stokes' Theorem will relate the flux of $\nabla\times\mathbf{F}$ through a surface to the circulation of $\mathbf{F}$ around its boundary curve, generalizing Green's Theorem to three dimensions. The Divergence Theorem will relate the flux of $\mathbf{F}$ out through a closed surface to the integral of $\nabla\cdot\mathbf{F}$ over the solid it encloses — finally explaining why Gauss's law holds for any closed surface, not just spheres. Both theorems take the surface integrals you built in this chapter as one of their two sides. Chapter 38 then reveals that the Fundamental Theorem of Calculus, Green's Theorem, Stokes' Theorem, and the Divergence Theorem are a single statement, $\int_{\partial M}\omega = \int_M d\omega$, written in four dimensions' worth of notation.

Reflection

The flux integral may be the most physically transparent idea in all of vector calculus. Strip away the parametrizations and cross products, and it asks one plain question: how much of $\mathbf{F}$ passes through $S$? Whether $\mathbf{F}$ is flowing water, escaping heat, an electric field, or light bouncing through a rendered scene, the answer is always a surface integral. You have learned to flatten a curved surface back to its parameter domain, to weigh each patch by the field's piercing component, and to read the result as a rate of crossing. That single skill is what the next chapter's theorems are built to exploit — and it is what lets calculus describe, in one clean integral, the flow of nearly everything.