Contents / Calculus / Vector Calculus
Chapter 13
Vector Calculus
Vector fields, line and surface integrals, and the theorems of Green, Stokes, and Gauss.
Introduction
Everything in this chapter is a version of one sentence: the integral of a derivative over a region equals the integral of the function over the region's boundary. In one variable that sentence is the Fundamental Theorem of Calculus, , where the "boundary" of is the two endpoints. Here the regions become curves, surfaces and solids, the functions become vector fields, and the derivatives become the gradient, the curl and the divergence.
The chapter builds the objects first — vector fields, integrals along curves, integrals over surfaces — and then proves the three great theorems that connect them: Green's theorem in the plane, Stokes' theorem for surfaces, and the Divergence theorem for solids. Each is stated precisely, proved in the case a textbook proves it, and then used to turn hard integrals into easy ones.
13.1Vector fields
Definition 13.1 (Vector field). Let be a set in . A vector field on is a function that assigns to each point in a two-dimensional vector
A vector field on a set in assigns to each point a three-dimensional vector . The scalar functions , , are the component functions of , and is continuous exactly when its component functions are.
A vector field is a function whose output is a vector, and the natural way to picture it is to draw the output vector as an arrow with its tail at the input point . Doing this at a grid of points produces the familiar arrow plot. The arrow at is the vector ; it is not the position vector of , and it is not tangent to any particular curve unless the field was built that way.
The physical examples are the ones to keep in mind. The velocity field of a fluid assigns to each point the velocity of the particle passing through it. A gravitational field assigns to each point the force a unit mass would feel there; the arrows all point toward the attracting body and shrink with distance. An electric field does the same for a unit charge. A wind map is a vector field on the surface of the earth.
Example 13.2 (Sketching a rotation field). Describe the vector field .
Solution.
- Compute a few values. , , , . Drawn at their base points, these four arrows circulate counterclockwise around the origin.
- Check the direction in general: the dot product of the field with the position vector is , so every arrow is perpendicular to the line from the origin to its base point — tangent to the circle through that point.
- Check the size: , the distance from the origin. Arrows grow linearly with radius.
- The picture is a fluid rotating rigidly counterclockwise about the origin, faster the further out you look. Sanity check: at the arrow is , of length , pointing "up and to the left", which is indeed the counterclockwise tangent direction there.
Example 13.3 (A field in space). Describe .
Solution. Every arrow is vertical. Above the -plane () the arrows point up and get longer with height; below it they point down; on the plane itself the field is zero. Nothing depends on or , so the picture is the same in every vertical slice.□
The most important source of vector fields in this chapter is differentiation. If is a scalar function of two variables, its gradient is a vector field, called a gradient field; in three variables . Recall from the chapter on partial derivatives that at a point is perpendicular to the level curve (or level surface) of through that point and points in the direction of fastest increase.
Example 13.4 (A gradient field and its level curves). Find the gradient field of and check its relation to a level curve at the point .
Solution.
- .
- At this is .
- The level curve through is , that is ; near it is the line , whose tangent direction is .
- Sanity check: , so the gradient is perpendicular to the level curve, as it must be.
Definition 13.5 (Conservative field, potential function). A vector field is conservative if it is the gradient of some scalar function: . Any such is called a potential function for .
Not every field is a gradient. The rotation field is not: if it were we would need and , so and , contradicting equality of mixed partials. The sections on line integrals explain why conservative fields matter — the work they do depends only on where you start and finish — and give a complete test for recognising them.
Example 13.6 (The gravitational field is conservative). Newton's law says that the force exerted by a mass at the origin on a mass at is
Show that is conservative.
Solution.
- Guess a potential of the form , a function of the distance alone.
- Differentiate with the chain rule:
which is exactly the first component of . 3. By symmetry and match the second and third components. 4. So : the gravitational field is conservative, with potential . Sanity check: decreases as grows, so points toward the origin, where the attracting mass sits.□
Intuition. A conservative field has an invisible landscape underneath it. Stand anywhere on a hillside and the ground tilts in some direction with some steepness; that tilt is the gradient of the height function, and drawing it at every point gives a vector field. The height function is the potential. A field like has no such landscape: if you followed its arrows you would walk in a circle and come back to where you started, yet the arrows pushed you forward the whole way, which no hill can do.
Pitfall. The arrow drawn at a point is the value of there, not the point's position vector. For the two happen to coincide, which makes the radial field look deceptively "natural"; for every other field they differ.
13.2Line integrals
A line integral adds up a quantity along a curve rather than along an interval. The construction copies the Riemann sum that defined , with the interval replaced by a curve and the widths replaced by lengths of arc.
Let be a smooth plane curve given by for , where is continuous and never zero. Divide into subintervals of equal width; the images cut into subarcs of lengths . Pick a sample point on the th subarc, multiply the value of there by the length of the subarc, and add.
Definition 13.7 (Line integral with respect to arc length). If is defined on a smooth curve , the line integral of along is
provided the limit exists.
To compute it, recall that arc length from to is , so . Substituting turns the line integral into an ordinary integral over the parameter:
Because the definition is phrased in terms of arc length, the value does not depend on which parametrisation of you use, nor on the direction in which is traversed: , where denotes the same curve run backwards. When the integral is simply the length of . If is only piecewise smooth — a finite union of smooth pieces joined end to end — integrate over each piece and add.
The physical reading is mass. If a thin wire lies along and has linear density (mass per unit length), then is approximately the mass of the th piece, and
give the mass and centre of mass of the wire. Everything extends to space curves with .
Example 13.8 (A scalar line integral on a semicircle). Evaluate , where is the upper half of the unit circle .
Solution.
- Parametrise: , , traces the upper half once.
- Arc length element: , , so .
- Substitute:
- Sanity check: the integrand is at least on the curve, and the curve has length , so the answer must exceed . It does, by a little, because on the upper semicircle.
Example 13.9 (Mass of a wire). A wire lies along the helix , , with density . Find its mass.
Solution.
- , so .
- .
- Sanity check: the wire has length and its density runs from to with average , so the mass should be about . It is exactly that, because grows linearly along the wire.
Two other line integrals arise from the same Riemann sum with replaced by the change in or in along the subarc, and .
Definition 13.10 (Line integrals with respect to and ).
The two usually appear together, and the sum is abbreviated
These integrals do depend on direction. Reversing the curve changes the sign of every and , so
When a curve is described only by its endpoints and shape, you must supply a parametrisation. For the segment from to the standard choice is , .
Example 13.11 (The same endpoints, two different paths). Evaluate where (a) is the line segment from to , and (b) is the arc of the parabola from to .
Solution.
- For use , so , , , with and .
- Then
- For the parabola is already solved for , so use itself as the parameter: , , with .
- Then
- The two answers differ: for this integrand the value depends on the route, not only on the endpoints. The next two sections identify precisely the integrands for which the route does not matter.
Now let be a continuous force field. Moving a particle along against or with the field does work, and the line integral computes it. On a short subarc the field is nearly constant, , and the displacement is nearly in the direction of the unit tangent . Since work is force times displacement in the direction of the force, the work on the subarc is about . Adding and taking the limit,
With and the lengths cancel, giving the formula that is used in practice.
Definition 13.12 (Line integral of a vector field). Let be a continuous vector field on a smooth curve given by , . The line integral of along is
Writing and shows that this is nothing new:
The vector line integral is the - - integral in disguise, and inherits its sign change under reversal: , because reversing the curve reverses .
Intuition. A scalar line integral is the cost of a road trip on a toll road where the rate per kilometre changes from place to place: rate times distance at each point, summed along the route. Direction is irrelevant — the tolls are the same both ways.
A vector line integral is how much a wind helps or hinders you on a walk. Wind at your back does positive work; a crosswind contributes nothing, whatever its strength; a headwind does negative work. Walk the route backwards and every tailwind becomes a headwind, so the sign flips.
Example 13.13 (Work along a quarter circle). Find the work done by the force field in moving a particle along the quarter circle , .
Solution.
- Evaluate the field on the curve: .
- Differentiate the curve: .
- Dot: .
- Integrate:
- Sanity check on the sign: along the arc the particle moves up and to the left, while the field's first component pushes to the right and its second component pushes down. The field opposes the motion, so negative work is right.
Example 13.14 (A line integral in space). Evaluate for along the twisted cubic , .
Solution.
- On the curve, .
- .
- .
- .
Pitfall. The arc-length element is , never just . Forgetting the factor is the most common error in scalar line integrals; the unit-speed parametrisation of a circle, where the factor happens to be , is the exception that trains the bad habit. In vector line integrals the factor cancels, which is why needs but not its length.
13.3The Fundamental Theorem for line integrals
In one variable, : integrating a derivative recovers the net change of the function, and only the endpoints matter. The gradient is the multivariable derivative of a scalar function, so the analogue should say that integrating along a curve gives the net change in . It does.
Theorem 13.15 (Fundamental Theorem for line integrals). Let be a piecewise-smooth curve given by , , and let be a function whose gradient is continuous on . Then
Proof. Take smooth first. By the definition of the line integral of a vector field and of the gradient,
The integrand is exactly what the chain rule produces for the one-variable function :
So the integral is , and the one-variable Fundamental Theorem of Calculus evaluates it as . If is only piecewise smooth, apply this on each smooth piece; the sum telescopes, because the terminal point of one piece is the initial point of the next, leaving only the value at the very end minus the value at the very start.∎
The theorem says the work done by a conservative field depends only on the two endpoints. Physically, is potential energy and the work equals the drop in potential energy; this is where the word "conservative" comes from, since total energy is conserved.
Definition 13.16 (Path independence). is independent of path in a region if for every pair of paths , in with the same initial point and the same terminal point.
Theorem 13.17 (Path independence and closed loops). is independent of path in if and only if for every closed path in . (A path is closed when its terminal point equals its initial point.)
Proof. Suppose the integral is path independent, and let be a closed path. Choose two points and on it, splitting into from to and from to . Then runs from to , so path independence gives , hence .
Conversely, suppose every closed integral vanishes and let , run from to . The path is closed, so , which is the claim.∎
Combining the last two results: for a conservative field every closed line integral is zero, because the endpoints coincide and . Remarkably the converse holds too, provided the region is reasonable. Call a region open if every point of has a disc around it contained in , and connected if any two points of can be joined by a path lying in .
Theorem 13.18 (Path independence implies conservative). Suppose is continuous on an open connected region . If is independent of path in , then is conservative on : there is a function with .
Proof. Fix a point in and define, for each point of ,
the integral along any path in from to . Connectedness guarantees such a path exists and path independence makes the value unambiguous, so is well defined.
To compute , take a point and a small disc around it inside . Choose a path that reaches some point in the disc however it likes and then runs along the horizontal segment from to . Then
and the first term does not depend on . Differentiating and writing , on we have constant so , and parametrising by itself gives
by the one-variable Fundamental Theorem of Calculus. The same argument with a vertical segment gives . Hence .∎
So on an open connected region the three statements — is conservative, the line integrals are path independent, every closed line integral is zero — say the same thing. What is still missing is a way to check the condition without hunting for a potential. Differentiating and supplies a necessary condition immediately.
Theorem 13.19 (Necessary condition for a conservative plane field). If is conservative on an open region and , have continuous first-order partial derivatives there, then
Proof. Write , so and . Then and , and Clairaut's theorem — equality of mixed partial derivatives for functions with continuous second partials — gives .∎
The converse needs a hypothesis on the shape of . A curve is simple if it does not cross itself, and an open connected region is simply connected if every simple closed curve in encloses only points of — informally, has no holes. A disc, a rectangle and the whole plane are simply connected; the punctured plane and an annulus are not.
Theorem 13.20 (Test for a conservative plane field). Let be a vector field on an open simply connected region , with and having continuous first-order partial derivatives. If
throughout , then is conservative.
The proof is a consequence of Green's theorem, proved in the next section: the condition makes the double integral in Green's theorem vanish, so every closed line integral is zero, and the previous theorem supplies the potential. Simple connectedness is what lets Green's theorem apply — it guarantees that the inside of any closed curve in is itself part of .
Pitfall. Drop simple connectedness and the test fails. On take
A short computation gives everywhere on , yet the integral around the unit circle is . So is not conservative on , even though it passes the cross-partial test. The hole at the origin is the whole difference.
Method 13.21 (Finding a potential function in the plane). Given passing the test:
- Integrate with respect to , holding fixed: . The constant of integration is an arbitrary function of , because .
- Differentiate the result with respect to and set it equal to . Every term containing must cancel; if one does not, was not conservative.
- Solve the resulting ordinary differential equation for , integrate to get , and write out . Add for an arbitrary constant if a specific value of is required.
Example 13.22 (Potential function in the plane, then a work computation). Show that is conservative, find a potential function, and evaluate where is any path from to .
Solution.
- Test: and . They agree, and the field is defined on all of , which is simply connected, so is conservative.
- Integrate in : .
- Differentiate in : . Setting this equal to gives , so (taking the constant to be zero).
- A potential is .
- By the Fundamental Theorem for line integrals,
- Sanity check: differentiate back. .
In three dimensions the same method works, one variable at a time. The necessary condition becomes three equations, , , , which are exactly the statement defined in the next section.
Example 13.23 (Potential function in space). Show that is conservative and find a potential function.
Solution.
- Check the three cross-conditions: ; ; . All hold, and is defined on all of .
- Integrate in : , where the "constant" may involve both remaining variables.
- Differentiate in : , and this must equal , so and depends on alone: .
- Differentiate in : , and this must equal , so and .
- A potential is . Sanity check: , as required.
Example 13.24 (Using the potential on a nasty curve). Evaluate for the field of the previous example along the curve , .
Solution.
- Parametrising directly would be miserable. Instead use the potential found above.
- Endpoints: and .
- By the Fundamental Theorem, .
- The entire complicated path contributed nothing beyond its two endpoints, which is the point of the theorem.
Intuition. Think of as altitude on a map and as the arrow showing which way the ground rises, drawn at every point. Walk any route from the car park at 300 m to a hut at 1100 m: whatever ridges and gullies you cross, the net climb is 800 m. That is the Fundamental Theorem for line integrals. Walk a loop back to the car park and the net climb is zero — that is the closed-loop criterion. And if somebody hands you a field of arrows for which some loop gives a net climb of 200 m, no altitude map can exist, so the field is not a gradient.
13.4Green's theorem
Green's theorem converts a line integral around a closed plane curve into a double integral over the region the curve encloses. It is the first genuine instance of the chapter's pattern — boundary integral equals integral of a derivative inside — and it makes many otherwise laborious line integrals immediate.
Orientation must be fixed first. A simple closed curve bounding a region is positively oriented when it is traversed counterclockwise, so that the region always lies to the left of a walker following . The notation signals a closed curve and, unless stated otherwise, positive orientation.
Theorem 13.25 (Green's theorem). Let be a positively oriented, piecewise-smooth, simple closed curve in the plane and let be the region bounded by . If and have continuous partial derivatives on an open region containing , then
Proof. It is enough to prove the two halves
and add them. We prove the first for a region of type I, that is one of the form
with and continuous. Compute the right-hand side by the inner integral in , using the one-variable Fundamental Theorem of Calculus:
Now compute the left-hand side. The boundary splits into four pieces: the bottom , the graph with running from to ; the right-hand vertical segment ; the top , the graph traversed backwards, that is where has running from to ; and the left-hand vertical segment . On the vertical pieces is constant, so and they contribute nothing to . Parametrising the two graphs by ,
which is the first half. The second half is the mirror image: express as a type II region , integrate first in , and match against the two graphs and , on which the horizontal boundary pieces contribute nothing because there.
A region that is both type I and type II — a disc, a rectangle, a triangle — is therefore covered completely. A general region is handled by cutting it into finitely many such pieces: applying the result to each piece and adding, every internal cut is traversed twice in opposite directions, so those contributions cancel and only the outer boundary survives.∎
Note where each hypothesis earns its place. Simple forbids self-crossing, so "the region enclosed" means something. Closed is what makes the boundary terms telescope. Positively oriented fixes the sign; running clockwise negates the left side, so the double integral would need a minus sign. Continuity of the partials is what licenses the Fundamental Theorem of Calculus in the inner integral.
Intuition. Cut the region into a fine grid of tiny squares and imagine walking counterclockwise around each one, tallying as you go. Every internal edge gets walked twice, once in each direction, so those tallies cancel exactly; only the outer edges survive. The total over all squares is therefore the integral around the outer boundary. And the tally for one tiny square at works out to times its area — the local swirl. Boundary circulation equals total interior swirl.
Example 13.26 (A line integral done two ways). Evaluate , where is the triangle with vertices , , traversed counterclockwise.
Solution.
- Directly, the curve has three pieces and each needs its own parametrisation. Green's theorem needs none.
- Here and , so and , giving .
- The triangle is type I: , . So
- Sanity check on the sign: on the triangle, so a counterclockwise circuit must give a positive answer, and it does.
Example 13.27 (A circle, with a shortcut). Evaluate , where is the circle traversed counterclockwise.
Solution.
- Neither nor has an elementary antiderivative, so a direct computation is hopeless.
- Green's theorem only needs the two partials that survive: (the -term dies) and (the -term dies).
- So and
- The awkward functions contributed nothing because each depended on the "wrong" variable — a very common pattern in Green's theorem exercises.
Reading the theorem backwards turns it into a way of computing areas. Choosing and so that makes the double integral the area of .
Corollary 13.28 (Area from a boundary integral). If is a positively oriented simple closed curve bounding the region , then
Proof. For the first, take and , so and Green's theorem gives . For the second take , . The third is the average of the first two, which is the symmetric form usually used because it treats and alike.∎
Example 13.29 (Area of an ellipse). Find the area enclosed by the ellipse .
Solution.
- Parametrise positively: , , . Then and .
- Use the symmetric area formula:
- The integrand is , so .
- Sanity check: setting gives , the area of a circle.
Green's theorem also extends to regions with holes, which is what rescues integrands that blow up at an isolated point. Let be bounded on the outside by a simple closed curve and on the inside by a simple closed curve lying inside . The positive orientation of the boundary is still "region on the left": counterclockwise on the outer curve and clockwise on the inner curve .
Theorem 13.30 (Green's theorem for a region with a hole). With , and as above and , having continuous partials on an open set containing ,
where both curves are now traversed counterclockwise.
Proof. Cut along two segments joining to , splitting the annular region into two simply connected pieces and , each bounded by a simple closed curve. Apply the ordinary Green's theorem to each and add. Each cut segment is traversed once in each direction, so those line integrals cancel. What remains on the left is the whole of counterclockwise together with the whole of clockwise, and reversing to counterclockwise introduces the minus sign in the statement.∎
Example 13.31 (A field with a singularity at the origin). Let . Show that for every positively oriented simple closed curve that encloses the origin.
Solution.
- A direct computation is impossible in general, since is arbitrary. Instead compare with a small circle.
- Choose small enough that the circle lies entirely inside , and let be the region between them. The origin, where is undefined, is not in , so the hypotheses hold on .
- On we computed earlier that .
- Green's theorem for a region with a hole then gives .
- On , parametrised by , , the integrand simplifies because :
- Hence for every such . This is the same example that defeated the cross-partial test: the value detects the hole.
Pitfall. Green's theorem needs and to have continuous partials on the whole region enclosed, not merely on the curve. Applying it to the field above on a curve around the origin would give , which is wrong by , because the field is not even defined at the origin. Always check the interior for singularities before converting.
13.5Curl and divergence
Two derivatives of a vector field organise the rest of the chapter. One is a vector that measures rotation; the other is a scalar that measures spreading. Both are written using the symbolic vector operator
which produces when it "multiplies" a scalar function, and which can be dotted or crossed with a vector field.
Definition 13.32 (Curl). If is a vector field on whose components have partial derivatives, then
The formula is easiest to remember as a symbolic determinant, expanded along the first row exactly as for a cross product:
Definition 13.33 (Divergence). With as above,
Curl is a vector field; divergence is a scalar function. Confusing the two is the most frequent error in the chapter, and the shapes give it away: a dot product produces a number, a cross product produces a vector.
The physical meanings become precise later, once Stokes' and the Divergence theorem are available, but the reading to carry in the meantime is this. If is the velocity field of a fluid, then at a point tells you about a tiny paddle wheel placed there: the wheel spins fastest when its axis is aligned with , and the angular speed is proportional to the magnitude. A field with everywhere is called irrotational — no paddle wheel anywhere spins. Meanwhile at a point measures the net rate at which fluid flows out of a tiny region around it: positive means a source, negative a sink, zero an incompressible flow.
Example 13.34 (Computing both derivatives). For find and .
Solution.
- Here , , .
- First component of the curl: .
- Second: .
- Third: .
- So .
- Divergence: , a scalar.
Two identities tie the three derivatives , and together, and both are proved in a line by Clairaut's theorem.
Theorem 13.35 (The curl of a gradient is zero). If has continuous second-order partial derivatives, then
Proof. Apply the definition to :
since each pair of mixed second partials is equal by Clairaut's theorem.∎
Corollary 13.36 (Curl test for conservative fields in space). If is conservative then . Conversely, if is defined on all of (or on any simply connected region) with continuous partials and , then is conservative.
The forward direction is the theorem just proved, since a conservative field is . The converse is the three-dimensional version of the cross-partial test, and it follows from Stokes' theorem the same way the plane version follows from Green's: on a simply connected region every closed curve bounds a surface lying in the region, and zero curl makes the circulation around it vanish. Writing out gives the three conditions , , used in the previous section.
Example 13.37 (Testing a space field for conservativeness). Is conservative? If so, find a potential.
Solution.
- Curl, component by component: ; ; .
- So , and since is defined and smooth on all of , it is conservative.
- Integrate in : .
- Then forces , and forces . So is constant.
- A potential is .
Theorem 13.38 (The divergence of a curl is zero). If has continuous second-order partial derivatives, then
Proof. Write out the divergence of the curl:
The six terms cancel in pairs by Clairaut's theorem: , and .∎
This identity is a useful negative test. If somebody claims is the curl of some field, compute ; a nonzero answer refutes the claim at once. For instance from the earlier example has , so no field has it as its curl.
Combining the divergence with the gradient produces the operator that dominates the partial differential equations of physics.
Definition 13.39 (Laplacian). For a scalar function with continuous second partials,
The equation is Laplace's equation, and its solutions are called harmonic functions. The Laplacian of a vector field is taken componentwise: .
Example 13.40 (A harmonic function). Show that is harmonic.
Solution.
- , so .
- , so .
- , so satisfies Laplace's equation everywhere.
Finally, Green's theorem can be rewritten in terms of curl and divergence, which reveals it as the two-dimensional shadow of the two big theorems still to come. Regard a plane field as the space field . Then only the third component of its curl survives,
and Green's theorem takes the circulation form
which is precisely Stokes' theorem for a flat surface in the -plane. Alternatively, let be the outward unit normal to . If traverses positively then and rotating it by a quarter turn clockwise gives . Then
where the last step is Green's theorem applied with in the role of and in the role of . That is the flux form of Green's theorem,
which is the Divergence theorem one dimension down: the outward flow across the boundary curve equals the total source strength inside.
Intuition. Drop a tiny paddle wheel into a flowing river at a point and hold its axle fixed in some direction . The wheel spins at a rate proportional to , so the direction of is the axle direction giving the fastest spin, and its length says how fast. In a river where the water near the banks moves slower than in the middle — say between banks at — the curl is , nonzero away from the centre line: a wheel floating off-centre really does spin, because one side of it sits in faster water than the other, even though the water flows in perfectly straight lines.
Now imagine instead a tiny balloon at a point. Divergence is the rate at which the balloon's volume would have to grow to keep pace with the fluid: positive at a tap, negative at a drain, zero for water, which does not compress.
Pitfall. Curl is defined for three-dimensional fields. For a plane field the phrase "the curl" always means the scalar , that is the -component of the curl of . Writing is standard shorthand, but remember it is a component of a vector, not a vector.
13.6Parametric surfaces and their areas
A curve is one-dimensional, so describing it takes one parameter. A surface is two-dimensional and takes two.
Definition 13.41 (Parametric surface). A parametric surface is the image of a vector function of two variables
where is a region in the -plane. The equations , , are parametric equations of the surface .
Holding fixed and letting vary traces a curve on , a grid curve; holding fixed and letting vary traces the other family. Together the two families are the mesh you see drawn on a plotted surface, and they are the key to both tangent planes and area.
Four parametrisations cover almost everything.
A graph. Any surface over a region is parametric with and themselves as parameters:
A plane through spanned by two non-parallel vectors and :
A sphere of radius centred at the origin, using the spherical angles (from the positive -axis) and (around it):
Here the grid curves are the circles of latitude ( fixed) and the meridians of longitude ( fixed).
A cylinder of radius about the -axis, between and :
A surface of revolution obtained by rotating the graph , , with , about the -axis:
Example 13.42 (Identifying a parametric surface). Identify the surface .
Solution.
- The first and third components satisfy , independently of .
- The second component is , unrestricted.
- So the surface is the circular cylinder of radius with axis the -axis. The grid curves constant are the circles of radius ; the grid curves constant are the straight rulings parallel to the -axis.
Tangent planes come from the grid curves. Fix ; the curve lies in and its tangent vector is the partial derivative
and similarly is tangent to the other grid curve. A surface is called smooth at a point if there, which is exactly the condition that the two tangent vectors are not parallel and therefore span a plane.
Definition 13.43 (Tangent plane and normal vector). At a smooth point of , the tangent plane is the plane through that point containing and , and
is a normal vector to there.
Example 13.44 (Tangent plane to a parametric surface). Find the tangent plane to at the point where , .
Solution.
- The point is .
- at , and .
- Normal: .
- The tangent plane is , that is , or after dividing by : .
- Sanity check: the point satisfies .
Now the area. Cut the parameter region into small rectangles of dimensions by . The image of is a small curved patch of with one corner at . Along the bottom edge of the point moves by in , so the corresponding displacement on is approximately ; along the left edge it is approximately . The patch is therefore approximately the parallelogram spanned by those two vectors, whose area is the length of their cross product:
Adding over all rectangles and letting the mesh shrink turns the sum into a double integral.
Definition 13.45 (Surface area of a parametric surface). If a smooth surface is given by , , and is covered just once as ranges over , then the surface area of is
"Covered just once" matters: letting run to on a cylinder wraps the surface twice and doubles the answer.
Example 13.46 (Surface area of a sphere). Find the area of a sphere of radius .
Solution.
- Use on , which covers the sphere once.
- and .
- The cross product is
- Its length: , so the length is (positive because for ).
- Integrate:
- This is the classical formula, which is the sanity check.
When the surface is a graph , the general formula collapses to something simpler. With ,
so .
Corollary 13.47 (Area of a graph). The area of the part of the surface lying above a region in the -plane is
The square root is at least , so the area of a surface is never less than the area of its shadow — a useful check.
Example 13.48 (Area of a piece of a paraboloid). Find the area of the part of the paraboloid that lies under the plane .
Solution.
- The shadow is the disc , of radius .
- and , so the integrand is .
- Polar coordinates fit the disc and the integrand: with , and ,
- Numerically that is about , comfortably more than the shadow's area , as it must be for a steeply curved surface.
Example 13.49 (Area of a piece of a cylinder). Find the area of the part of the cylinder between the planes and .
Solution.
- Parametrise: , , .
- and .
- , of length .
- .
- Sanity check: unrolled, the cylinder is a rectangle of width and height , of area .
Intuition. A parametrisation is a map of the surface printed on a flat sheet, and is the instruction for wrapping the sheet onto the object. A small square on the sheet lands as a small parallelogram on the object, stretched by in one direction and in the other, and is the factor by which the wrapping magnifies area at that spot. For the sphere that factor is : near the equator () a square of map becomes a patch of area , while near the poles () it is squeezed to nothing — which is exactly why Greenland looks enormous on a flat world map.
Pitfall. The area element uses the length of the cross product, a positive scalar. The vector itself belongs to flux integrals, in the next section, where its direction carries the orientation. Swapping the two would either give an area with a sign or a flux without a direction.
13.7Surface integrals and flux
A surface integral is to a surface what a line integral is to a curve: it adds up the values of a function over the surface, weighting each patch by its area. The construction is the Riemann sum from the previous section with inserted.
Definition 13.50 (Surface integral of a scalar function). Let be a smooth surface parametrised by over a region , covered once. For a function continuous on ,
Taking recovers the surface area. If is a thin sheet with surface density , then is its mass. For a graph over the formula reads
As with , the value does not depend on the parametrisation, and a piecewise-smooth surface (a cube, or a cylinder with its two caps) is handled by integrating over each smooth piece and adding.
Example 13.51 (A scalar surface integral over a sphere). Evaluate , where is the unit sphere .
Solution.
- Parametrise with : , , , over , .
- From the sphere computation, .
- So
- The first factor is . For the second, .
- The value is .
- Sanity check by symmetry: , and their sum is . One third of is indeed .
Example 13.52 (A surface integral over a graph). Evaluate , where is the part of the plane lying in the first octant.
Solution.
- The surface is a graph with , so , and .
- The shadow is where with : the triangle , .
- Then
To integrate a vector field over a surface we must first say which way the surface faces, just as a line integral of a vector field needed a direction along the curve.
Definition 13.53 (Orientation). An orientable surface is one on which a continuous choice of unit normal vector can be made at every point. Choosing one of the two possible continuous choices orients the surface. For a closed surface — one that bounds a solid region — the positive orientation is the one whose normals point outward.
For a parametric surface the parametrisation itself supplies an orientation,
and swapping and reverses it. For a graph the choice has positive -component, so it is the upward orientation. Not every surface is orientable: the Möbius band, made by giving a strip a half-twist before joining the ends, has only one side, and a normal carried once around it returns pointing the opposite way. Such surfaces are excluded throughout.
Definition 13.54 (Surface integral of a vector field: flux). If is a continuous vector field on an oriented surface with unit normal , the surface integral of over , also called the flux of across , is
If is given by over with the orientation induced by the parametrisation, then
The second formula follows from the first because the length in cancels against the same factor in — the same cancellation that simplified into .
The physical reading: if is the mass flow rate of a fluid of density moving with velocity , then is the mass of fluid crossing per unit time, counted positively in the direction of . The dot product is doing the essential work: only the component of the flow through the surface counts, and flow parallel to the surface contributes nothing.
Specialising to a graph with upward orientation gives a formula worth memorising. With ,
where each of , , is evaluated at . For the downward orientation, negate.
Example 13.55 (Flux through a graph). Find the flux of upward through the part of the paraboloid above the -plane.
Solution.
- The shadow is the unit disc , where .
- Here , so and .
- Using the graph formula with , , :
- The term integrates to zero over the disc by symmetry (replacing by maps the disc to itself and flips the sign).
- In polar coordinates the rest is
Example 13.56 (Flux through a sphere). Find the flux of outward through the sphere of radius centred at the origin.
Solution.
- On the sphere the outward unit normal at a point is , because the position vector points straight out from the centre.
- Therefore , a constant on .
- So .
- Sanity check: the field points outward everywhere, so the flux must be positive, and it is. (The Divergence theorem will reproduce this as .)
Example 13.57 (Flux through a cylinder). Find the flux of outward through the lateral surface of the cylinder , .
Solution.
- Parametrise , with . This has positive radial component, so it is the outward orientation.
- On the surface, .
- Dot: .
- So the flux is .
- Sanity check: everywhere on the lateral surface (the radius), and the lateral area is ; .
Intuition. Hold a hoop in a river. The flux through it is the volume of water passing through per second. Hold it face-on to the current and the flux is large; turn it edge-on and the flux drops to zero even though the water is moving just as fast. That turning is what the dot product with measures.
Orientation is the bookkeeping that says which way through counts as positive. Flip the hoop and the same river gives the flux the opposite sign — nothing physical changed, only the choice of "forwards".
Pitfall. Reversing the orientation of a surface negates but leaves unchanged. When a problem says "outward" or "upward", check the sign of the cross product your parametrisation produced: for the upward normal on a graph the -component must be positive, and for the outward normal on a closed surface the normal must point away from the enclosed solid. Silently using the wrong one is a sign error that no later step will catch.
13.8Stokes' theorem
Green's theorem equates a circulation around a plane curve with a double integral over the flat region it bounds. Stokes' theorem says the region need not be flat: any oriented surface with that curve as its boundary will do, and the integrand becomes the normal component of the curl.
Orientation again has to be pinned down, and the rule linking the two is the right-hand one. Let be an oriented surface with unit normal and boundary curve . The boundary is positively oriented when, walking along with your head pointing in the direction of , the surface is on your left. Equivalently: point the thumb of your right hand along and your fingers curl in the positive direction of .
Theorem 13.58 (Stokes' theorem). Let be an oriented piecewise-smooth surface bounded by a simple, closed, piecewise-smooth boundary curve with positive orientation. If is a vector field whose components have continuous partial derivatives on an open region containing , then
Proof. We prove it in the case a textbook does: is the graph of a function with continuous second partials over a region in the -plane, oriented upward, whose boundary projects onto the boundary curve of , positively oriented. Write .
Start with the right-hand side. Using the graph formula for flux with in place of ,
with , , evaluated at .
Now the left-hand side. Parametrise by , , ; then is parametrised by the same with , and the chain rule gives . Hence
This is an ordinary plane line integral, so Green's theorem applies to it with the bracketed expressions in the roles of and :
Expand the two derivatives, remembering that , , depend on and both directly and through , so each needs the chain rule:
Subtracting, the terms cancel, and so do and by Clairaut's theorem. What remains is
which is exactly the expression obtained for the surface integral above. The two sides agree.∎
Two consequences are worth stating at once. First, Green's theorem is the special case in which is a flat region of the -plane with , since then . Second — and this is where the theorem earns its keep — the right-hand side depends on but not on which surface you span it with. If and share the boundary curve and are compatibly oriented, then
so you may replace an awkward surface with any convenient one that has the same edge.
Example 13.59 (Circulation computed through the surface). Evaluate , where and is the curve of intersection of the plane with the cylinder , oriented counterclockwise seen from above.
Solution.
- Parametrising directly is possible but messy. Use Stokes' theorem with the elliptical disc cut out of the plane by the cylinder.
- Curl: .
- is the graph over the unit disc , oriented upward, which matches the counterclockwise-from-above orientation of . Here and .
- Flux of the curl through a graph: , so
- Over the unit disc by symmetry, so the value is .
- Sanity check: the term contributed nothing to the curl's -component beyond , whose average over the disc is zero; what survived is the swirl of the field , which circulates counterclockwise, so a positive answer is right.
Example 13.60 (Flux of a curl, computed through the boundary). Use Stokes' theorem to compute , where and is the part of the sphere lying inside the cylinder and above the -plane, oriented upward.
Solution.
- The surface integral over a spherical cap is unpleasant; the boundary is a circle, which is easy.
- The boundary is where the sphere meets the cylinder with : and . Positively oriented for the upward normal means counterclockwise seen from above, so take , .
- On : , and .
- Dot: .
- The integrand vanishes identically, so the flux of the curl is .
Example 13.61 (A full verification of Stokes' theorem). Verify Stokes' theorem for and the surface : the part of the plane in the first octant, oriented upward, whose boundary is the triangle with vertices , , traversed in that order.
Solution. The surface side. The curl is
The surface is the graph over the triangle , , , with . The upward normal vector element is . Hence
since is a right triangle with legs and .
The boundary side. The triangle consists of three segments. On from to : , , and , so and .
On from to : , , and , so and the integral is again .
On from to : , , and , so , giving once more.
Adding, .
Comparison. Both sides equal , as Stokes' theorem promises. Note the orientation check: walking with the upward normal keeps the triangle on the left, so the two orientations are compatible; had we traversed the triangle the other way, the line integral would have come out and the theorem would have appeared to fail.□
Stokes' theorem also explains what curl means. Let be a point, a unit vector, and the small disc of radius centred at and perpendicular to , with boundary circle . Since is continuous, its normal component is nearly constant on , so
and dividing and letting gives the exact statement
So the component of the curl in the direction is the circulation per unit area around a small loop perpendicular to — the paddle-wheel picture, made exact. The circulation is largest when points along , which is why a paddle wheel spins fastest with its axle in that direction.
Intuition. Stretch a soap film across a wire loop. Stokes' theorem says the total swirl of the field measured over the film equals the circulation you would measure by walking around the wire. Now blow gently on the film so it bulges: the film changed, the wire did not, and the total swirl over the new film is unchanged. That independence is not a coincidence but a consequence — the difference between two such films is a closed surface, and the flux of a curl through a closed surface is zero, because .
Pitfall. A mismatch between the surface's normal and the direction the boundary is traversed flips the sign of the whole identity. Fix the orientation before computing either side: choose , then determine the boundary direction by the right-hand rule, or the other way round — but never choose both independently.
13.9The Divergence theorem
Stokes' theorem handles circulation. The remaining combination — flux out of a closed surface — is governed by the divergence, and the result is the three-dimensional counterpart of the flux form of Green's theorem.
Call a solid region simple if it is simultaneously of type 1, type 2 and type 3, meaning it can be described as lying between two graphs in each of the three coordinate directions. Balls, boxes and solid ellipsoids are simple; so, after cutting, is anything met in practice.
Theorem 13.62 (Divergence theorem). Let be a simple solid region whose boundary surface is given the positive (outward) orientation. If is a vector field whose component functions have continuous partial derivatives on an open region containing , then
Proof. Write , so that the claim reads
It suffices to prove the three separate identities
and add. We prove the third; the other two are identical arguments in the other coordinate directions, which is exactly what being simple in all three senses guarantees.
Because is of type 1, write
The right-hand side, by Fubini and the one-variable Fundamental Theorem of Calculus, is
Now the left-hand side. The boundary consists of a top , the graph with upward normal; a bottom , the graph with downward normal, since outward on the bottom means downward; and possibly a vertical side surface lying over the boundary of . On the outward normal is horizontal, so and that piece contributes nothing.
For the top, the graph formula for flux with and upward orientation gives . For the bottom the normal is reversed, so . Adding the three pieces reproduces the double integral computed above, which proves the third identity.
A region that is not simple is cut into finitely many simple pieces. Applying the result to each and adding, every internal cutting surface is counted twice with opposite outward normals, so those flux contributions cancel and only the outer boundary remains.∎
The theorem converts a surface integral over a closed surface — often several pieces, each needing its own parametrisation — into one triple integral. That is almost always the easier direction.
Example 13.63 (Flux out of a sphere). Find the flux of outward through the unit sphere .
Solution.
- .
- By the Divergence theorem the flux is , the volume of the unit ball.
- So the flux is .
Example 13.64 (A flux that would be painful directly). Evaluate , where and is the boundary of the solid region bounded by the parabolic cylinder and the planes , , .
Solution.
- Direct computation would need four separate surfaces and would meet and head-on.
- The divergence collapses them: , because does not depend on and does not depend on .
- Describe : , , . Then
- The inner integral is .
- So the flux is .
- Evaluating, , so the flux is .
Example 13.65 (A full verification of the Divergence theorem). Verify the Divergence theorem for on the solid cylinder : , .
Solution. The volume side. , so
The surface side. The boundary has three pieces.
Lateral surface. Computed in the previous section for the field ; since the extra component is perpendicular to the horizontal outward normal there, it contributes nothing, and the flux is .
Top disc , , outward normal . Then , so the flux is .
Bottom disc , outward normal . Then , so the flux is .
Comparison. Total flux , matching the triple integral.□
The Divergence theorem also makes the meaning of divergence exact, by the same shrinking argument used for the curl. Let be the ball of radius about a point , with boundary sphere . Continuity of gives
so
Divergence is outward flux per unit volume: the strength of the source at that point. A field with everywhere is called incompressible, and by the theorem its flux through every closed surface is zero — whatever flows in flows out again.
Example 13.66 (Divergence-free means no net flux). Let and let be any closed surface bounding a simple solid. Compute the flux through .
Solution.
- , because each component is differentiated with respect to a variable it does not contain.
- So the flux is , whatever the shape of . The field is incompressible: whatever flows in through one part of flows out through another.
- Had the third component been instead, the divergence would have been and the flux : a uniform sink, absorbing one unit of volume per unit volume per unit time.
Intuition. Put a bucket into a river and ask how much water leaves it per second through its walls. If the water is incompressible, the answer must be zero: whatever enters through one side leaves through another. Any nonzero answer means water is being created or destroyed inside — a tap or a drain. The Divergence theorem is the statement that the total flow out through the walls equals the total production inside, and divergence is the local production rate. Gauss's law of electrostatics is exactly this statement with charge as the source.
Pitfall. The Divergence theorem needs to be closed. Applied to an open surface — the paraboloid cap, the upper hemisphere alone — it is simply false, because there is no solid for the triple integral. The fix, when a problem hands you an open surface, is to close it with a convenient lid, apply the theorem to the closed surface, and then subtract the lid's flux, which is usually easy to compute directly.
13.10The three theorems as one pattern
Every result of this chapter is a version of the Fundamental Theorem of Calculus. Each says: the integral of a derivative of over a region equals the integral of over the boundary of that region, suitably oriented.
Summary (The family).
Read downwards, the dimension of the region rises from to and the derivative changes shape — , then , then , then — but the sentence never changes. In the language of differential forms all five are literally one theorem, , which is the point of view a later course takes.
Two structural facts make the family consistent. Because , applying two of these operators in succession gives zero, which matches the geometric fact that a boundary has no boundary: the endpoints of a closed curve cancel. Because , the flux of a curl through a closed surface vanishes — again, the closed surface is a boundary, and boundaries have no boundary.
Method 13.67 (Choosing the right theorem).
- A line integral of a field along a curve, and the field is a gradient (or passes the curl test): use the Fundamental Theorem for line integrals — evaluate a potential at the two endpoints.
- A line integral around a closed plane curve: use Green's theorem to convert to a double integral over the inside.
- A line integral around a closed space curve: use Stokes' theorem, spanning the curve with whichever surface is simplest.
- A flux integral over a closed surface: use the Divergence theorem to convert to a triple integral.
- A flux integral of a curl over an open surface: use Stokes' theorem in reverse, converting to a line integral around the boundary.
- A flux integral over an open surface of a field that is not a curl: compute directly, or close the surface with a lid and use the Divergence theorem, subtracting the lid.
Example 13.68 (Picking the tool). Evaluate where and is the sphere of radius with outward orientation.
Solution.
- is closed, so rule 4 says use the Divergence theorem: in spherical coordinates.
- With ,
- Sanity check: the field points outward everywhere on the sphere, so the flux should be positive, and it grows like because the field itself grows like while the area grows like .
Example 13.69 (The same integral, two theorems). Let and let be the circle in the plane , counterclockwise seen from above. Evaluate by Green's theorem and again by Stokes' theorem.
Solution.
- By Green's theorem, with and : , so
- By Stokes' theorem, span with the flat disc in the plane with upward normal . The curl is , so and the surface integral is again .
- The two agree because Green's theorem is Stokes' theorem for a flat surface. The negative sign is right: the field circulates clockwise, against the direction of travel.
Intuition. The five statements are five sizes of the same claim: what happens inside a region is completely accounted for by what crosses its edge. In one dimension the "edge" is two points and the bookkeeping is subtraction. In two it is a curve and the bookkeeping is a line integral. In three it is a surface and the bookkeeping is a flux. Each time the region gains a dimension, so does its boundary, and the derivative that appears on the inside changes to the one that matches.
- Confusing divergence with curl. is a scalar; is a vector. If your answer has the wrong shape, you used the wrong one.
- Dropping the factor in . The arc-length element is ; only in a unit-speed parametrisation does it reduce to .
- Assuming changes sign when the curve is reversed. It does not — but and do.
- Applying the test on a region with a hole. On the field passes the test and is still not conservative.
- Using Green's theorem when the field is undefined somewhere inside the curve. The hypotheses require continuous partials on the *whole* enclosed region, not just on the curve.
- Forgetting that Green's theorem assumes counterclockwise orientation. A clockwise curve gives the negative of the double integral.
- Mismatching orientations in Stokes' theorem. Fix the surface normal first, then let the right-hand rule determine the direction of the boundary curve — never choose both independently.
- Applying the Divergence theorem to a surface that is not closed. Close it with a lid, apply the theorem, then subtract the lid's flux.
- Using where the problem needs the vector . Scalar surface integrals take the length; flux integrals take the vector, whose direction carries the orientation.
- Letting a parameter range cover the surface more than once. Running from to on a cylinder doubles every area and every flux.
- Writing when was asked for, or vice versa. The first needs an oriented surface and a vector field; the second needs neither.
- Concluding from alone that a potential exists on any domain. The conclusion needs the domain to be simply connected.