Stokes’ Theorem
Stokes’ theorem says the circulation of a vector field F around the boundary curve C of a surface S equals the flux of curl F through S: ∮ F · dr over C = ∬ (curl F) · n dS over S. C goes around S so that S stays on your left when your head points along n.
Before this lesson: Curl and Divergence, Surface Integrals, Line Integrals and Green’s Theorem
What Stokes’ theorem means
Cover the surface S with tiny paddle wheels. The flux of curl F through a small patch measures how much F circulates around the edge of that patch. Next to each other, two patches go along their shared edge in opposite directions, so those parts cancel.
When you add up all the patches, every inside edge cancels. Only the outer edge C is left. So the total spin of F over the surface equals the circulation of F around its boundary.
Stokes’ theorem formula
\oint_C \mathbf{F} \cdot d\mathbf{r} = \iint_S (\nabla \times \mathbf{F}) \cdot \mathbf{n} \, dSHere S is a smooth (or piecewise smooth) oriented surface, C is its boundary, a simple closed curve, and F has continuous partial derivatives on a region that contains S.
Matching the orientations
Use the right-hand rule. Curl the fingers of your right hand in the direction you travel along C. Your thumb points the way n must point. For a surface with the upward normal, C runs counterclockwise as seen from above.
Any surface with the same boundary works
The right side depends only on C. So if two surfaces have the same boundary curve and matching orientations, the flux of curl F through them is the same. You can swap a curved surface for a flat disk.
Stokes’ theorem examples
Example 1: Check Stokes’ theorem on a hemisphere
Let F = ⟨−2y, x, z⟩ and let S be the upper half of the sphere x² + y² + z² = 4 with the upward normal. Compute both sides of Stokes’ theorem.
\nabla \times \mathbf{F} = \langle 0 - 0,\; 0 - 0,\; 1 - (-2) \rangle = \langle 0, 0, 3 \rangleUse R_y − Q_z, P_z − R_x and Q_x − P_y (see curl and divergence).
\mathbf{r}(t) = \langle 2\cos t, 2\sin t, 0 \rangle, \quad 0 \le t \le 2\piC is the circle of radius 2 in the xy-plane, counterclockwise from above.
\mathbf{F}(\mathbf{r}(t)) \cdot \mathbf{r}'(t) = (-4\sin t)(-2\sin t) + (2\cos t)(2\cos t) + 0Use F = ⟨−4 sin t, 2 cos t, 0⟩ and r′(t) = ⟨−2 sin t, 2 cos t, 0⟩.
= 8\sin^2 t + 4\cos^2 t = 4 + 4\sin^2 t
Replace cos² t with 1 − sin² t.
\int_0^{2\pi} (4 + 4\sin^2 t) \, dt = 8\pi + 4\pi = 12\piIntegrate. Over a full turn, sin² t integrates to π.
\iint_S (\nabla \times \mathbf{F}) \cdot d\mathbf{S} = \iint_D (-0 \cdot g_x - 0 \cdot g_y + 3) \, dAUse the upward flux formula for a graph z = g(x, y) (see surface integrals).
= 3 \cdot \text{area}(D) = 3 \cdot 4\pi = 12\piD is the disk x² + y² ≤ 4.
Answer: both sides equal 12π ≈ 37.70.
Example 2: A line integral around a triangle
Use Stokes’ theorem to find ∮ F · dr for F = ⟨z², x², y²⟩, where C is the triangle with vertices (1, 0, 0), (0, 1, 0) and (0, 0, 1), traveled counterclockwise as seen from above.
\nabla \times \mathbf{F} = \langle 2y - 0,\; 2z - 0,\; 2x - 0 \rangle = \langle 2y, 2z, 2x \rangleR_y = 2y, P_z = 2z and Q_x = 2x; the other partials are 0.
z = g(x, y) = 1 - x - y
S is the flat triangle in the plane x + y + z = 1, with the upward normal.
-P g_x - Q g_y + R = -(2y)(-1) - (2z)(-1) + 2x
Use the components of curl F, with g_x = −1 and g_y = −1.
= 2x + 2y + 2z = 2(x + y + z) = 2
On S, x + y + z = 1.
\oint_C \mathbf{F} \cdot d\mathbf{r} = \iint_D 2 \, dA = 2 \cdot \dfrac{1}{2} = 1D is the triangle with vertices (0, 0), (1, 0) and (0, 1), with area 1/2.
Answer: 1. Working directly would take three separate line integrals, one for each side.
Example 3: Replace a surface integral with a line integral
Find the upward flux of curl F through the part of z = 4 − x² − y² above the xy-plane, where F = ⟨−y, x, xze^y⟩.
\mathbf{r}(t) = \langle 2\cos t, 2\sin t, 0 \rangle, \quad 0 \le t \le 2\piThe boundary is the circle x² + y² = 4 in the plane z = 0. With the upward normal, go counterclockwise.
\mathbf{F}(\mathbf{r}(t)) = \langle -2\sin t, 2\cos t, 0 \rangleOn C, z = 0, so the third component is 0.
\mathbf{F} \cdot \mathbf{r}'(t) = (-2\sin t)(-2\sin t) + (2\cos t)(2\cos t) = 4Use r′(t) = ⟨−2 sin t, 2 cos t, 0⟩ and sin² t + cos² t = 1.
\int_0^{2\pi} 4 \, dt = 8\piIntegrate.
Answer: 8π ≈ 25.13. The hard third component xze^y never had to be differentiated.
Example 4: A curve on a tilted plane
Let C be the curve where the cylinder x² + y² = 4 meets the plane z = 3 + x, traveled counterclockwise as seen from above. Find ∮ F · dr for F = ⟨z, x², 3y⟩.
\nabla \times \mathbf{F} = \langle 3 - 0,\; 1 - 0,\; 2x - 0 \rangle = \langle 3, 1, 2x \rangleR_y = 3, Q_z = 0; P_z = 1, R_x = 0; Q_x = 2x, P_y = 0.
g(x, y) = 3 + x, \quad g_x = 1, \quad g_y = 0
Take S to be the part of the plane inside the cylinder, with the upward normal.
-P g_x - Q g_y + R = -3(1) - 1(0) + 2x = 2x - 3
Use the components of curl F.
\iint_D (2x - 3) \, dA = \iint_D 2x \, dA - 3 \cdot \text{area}(D)Split the integral. D is the disk x² + y² ≤ 4.
= 0 - 3 \cdot 4\pi = -12\pi
The disk is symmetric about the y-axis, so 2x integrates to 0.
Answer: −12π ≈ −37.70.
Example 5: Circulation of wind around a ring
Air moves with velocity v = ⟨z − y, x − z, y − x⟩ m/s. A ring of radius 3 m, centered at the origin, lies in the plane x + y + z = 0. It is traveled counterclockwise as seen from the side that n = ⟨1, 1, 1⟩/√3 points toward. Find the circulation of v around the ring.
\nabla \times \mathbf{v} = \langle 1 - (-1),\; 1 - (-1),\; 1 - (-1) \rangle = \langle 2, 2, 2 \rangleR_y = 1, Q_z = −1; P_z = 1, R_x = −1; Q_x = 1, P_y = −1.
(\nabla \times \mathbf{v}) \cdot \mathbf{n} = \dfrac{2 + 2 + 2}{\sqrt{3}} = 2\sqrt{3}Take S to be the flat disk inside the ring, with unit normal n.
\iint_S 2\sqrt{3} \, dS = 2\sqrt{3} \cdot \pi(3)^2The integrand is constant, so multiply by the area of the disk.
= 18\sqrt{3}\,\pi \approx 97.9Simplify.
Answer: about 97.9 square meters per second.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Going around C the wrong way | Traveling clockwise with the upward normal and getting −12π in Example 1 | Use the right-hand rule: thumb along n, fingers along C. |
| Integrating F instead of curl F over S | Finding the flux of ⟨−2y, x, z⟩ through the hemisphere | The surface side of Stokes’ theorem uses curl F. |
| Swapping in a surface with a different boundary | Replacing the paraboloid in Example 3 with the disk x² + y² ≤ 1 | The new surface must have exactly the same boundary curve and orientation. |
| Using Stokes’ theorem on a closed surface | Looking for the boundary of a whole sphere | A closed surface has no boundary, so the flux of curl F through it is 0. |
| Forgetting to put the curve’s equation into F | Leaving z in F when z = 3 + x on C | On C, write every x, y and z in terms of the parameter. |
Related methods
Green’s theorem is the flat case
If S is a region D in the xy-plane with n = k, then (curl F) · k = Q_x − P_y and dS = dA. Stokes’ theorem becomes Green’s theorem.
Conservative fields
If curl F = 0 on a region without holes, Stokes’ theorem gives ∮ F · dr = 0 around every closed curve there. This matches the test in conservative vector fields.
Closed surfaces
For a closed surface, the flux of curl F is always 0. The divergence theorem, the next lesson, explains this another way: div(curl F) = 0.
Practice problems
- Check Stokes’ theorem for F = ⟨−y, x, 0⟩ on the upper half of the unit sphere x² + y² + z² = 1, with the upward normal.
- Use Stokes’ theorem to find ∮ F · dr for F = ⟨y, z, x⟩ around the triangle with vertices (1, 0, 0), (0, 1, 0) and (0, 0, 1), counterclockwise as seen from above.
- Find ∮ F · dr for F = ⟨x², y², z²⟩ around the circle x² + y² = 9, z = 4.
- Find the upward flux of curl F through the part of z = 9 − x² − y² above the xy-plane, where F = ⟨−2y, 2x, e^z⟩.
- Let C be where the cylinder x² + y² = 4 meets the plane z = 1 + y, counterclockwise as seen from above. Find ∮ F · dr for F = ⟨−3y, 0, x⟩.
- Show that the circulation of F = ⟨yz, xz, xy⟩ around every closed curve is 0.
- Find ∮ F · dr for F = ⟨z, x, y⟩ around the circle x² + y² = 4, z = 2, counterclockwise as seen from above.
- Use Problem 7 to find the upward flux of curl F, for the same F, through the upper half of the sphere x² + y² + (z − 2)² = 4.
- Find the outward flux of curl F through the sphere x² + y² + z² = 25, where F = ⟨xy, yz, zx⟩.
- Water in a tank moves with velocity v = ⟨z − y, x, x⟩ m/s. Find the circulation of v around a ring of radius 2 m in the plane z = 3, centered on the z-axis and traveled counterclockwise as seen from above.
Show answers
1.
\nabla \times \mathbf{F} = \langle 0, 0, 1 - (-1) \rangle = \langle 0, 0, 2 \rangleQ_x = 1 and P_y = −1; the other partials are 0.
\int_0^{2\pi} (\sin^2 t + \cos^2 t) \, dt = 2\piLine integral: r = ⟨cos t, sin t, 0⟩, F · r′ = (−sin t)(−sin t) + (cos t)(cos t).
\iint_D 2 \, dA = 2\pi
Surface integral: the upward graph formula gives 2 times the area π of the unit disk.
Answer: both sides equal 2π.
2.
\nabla \times \mathbf{F} = \langle 0 - 1,\; 0 - 1,\; 0 - 1 \rangle = \langle -1, -1, -1 \rangleR_y = 0, Q_z = 1; P_z = 0, R_x = 1; Q_x = 0, P_y = 1.
-P g_x - Q g_y + R = -(-1)(-1) - (-1)(-1) + (-1) = -3
Use g = 1 − x − y, so g_x = g_y = −1.
\iint_D (-3) \, dA = -3 \cdot \dfrac{1}{2} = -\dfrac{3}{2}D is the triangle with area 1/2.
Answer: −3/2
3.
\nabla \times \mathbf{F} = \langle 0 - 0,\; 0 - 0,\; 0 - 0 \rangle = \mathbf{0}Each component depends only on its own variable.
\oint_C \mathbf{F} \cdot d\mathbf{r} = \iint_S \mathbf{0} \cdot \mathbf{n} \, dS = 0Use the flat disk inside the circle as S.
Answer: 0
4.
\mathbf{F} \cdot \mathbf{r}'(t) = (-6\sin t)(-3\sin t) + (6\cos t)(3\cos t) = 18The boundary is x² + y² = 9 at z = 0: r = ⟨3 cos t, 3 sin t, 0⟩.
\int_0^{2\pi} 18 \, dt = 36\piIntegrate.
Answer: 36π ≈ 113.10
5.
\nabla \times \mathbf{F} = \langle 0 - 0,\; 0 - 1,\; 0 - (-3) \rangle = \langle 0, -1, 3 \rangleR_y = 0, Q_z = 0; P_z = 0, R_x = 1; Q_x = 0, P_y = −3.
-P g_x - Q g_y + R = -0(0) - (-1)(1) + 3 = 4
Use g = 1 + y, so g_x = 0 and g_y = 1.
\iint_D 4 \, dA = 4 \cdot 4\pi = 16\pi
D is the disk of radius 2.
Answer: 16π ≈ 50.27
6.
\nabla \times \mathbf{F} = \langle x - x,\; y - y,\; z - z \rangle = \mathbf{0}R_y = x, Q_z = x; P_z = y, R_x = y; Q_x = z, P_y = z.
Answer: curl F = 0 everywhere, so by Stokes’ theorem every circulation is 0. (F is the gradient of xyz.)
7.
\nabla \times \mathbf{F} = \langle 1 - 0,\; 1 - 0,\; 1 - 0 \rangle = \langle 1, 1, 1 \rangleR_y = 1, P_z = 1 and Q_x = 1.
(\nabla \times \mathbf{F}) \cdot \mathbf{k} = 1Use the flat disk x² + y² ≤ 4 at z = 2, with n = k.
\iint_S 1 \, dS = 4\pi
The flux is the area of the disk.
Answer: 4π ≈ 12.57
8.
Answer: 4π. The upper half of this sphere has the same boundary circle x² + y² = 4, z = 2 as the disk in Problem 7, with matching orientation, so the flux of curl F is the same.
9.
Answer: 0. Cut the sphere into upper and lower halves. Their boundaries are the same circle, traveled in opposite directions, so the two line integrals cancel.
10.
\nabla \times \mathbf{v} = \langle 0 - 0,\; 1 - 1,\; 1 - (-1) \rangle = \langle 0, 0, 2 \rangleR_y = 0, Q_z = 0; P_z = 1, R_x = 1; Q_x = 1, P_y = −1.
\iint_S 2 \, dS = 2 \cdot \pi(2)^2 = 8\pi
Use the flat disk inside the ring, with n = k.
Answer: 8π ≈ 25.1 square meters per second
Stokes’ theorem FAQ
What does Stokes’ theorem say?
It says the line integral of F around the boundary of a surface equals the flux of curl F through the surface, when the curve and the normal are oriented by the right-hand rule.
How is Stokes’ theorem related to Green’s theorem?
Green’s theorem is Stokes’ theorem for a flat region in the xy-plane with the normal k. Stokes’ theorem allows any curved surface in space.
How do you orient the boundary curve in Stokes’ theorem?
Point your right thumb along the normal n. Your fingers curl in the direction to travel along C. For an upward normal, that is counterclockwise as seen from above.
Why do different surfaces with the same boundary give the same answer?
Both flux integrals equal the same line integral around the shared boundary. That is why you can often replace a curved surface with a flat disk.
Summary
- Stokes’ theorem: ∮ F · dr over C = ∬ (curl F) · n dS over S, where C is the boundary of S.
- Orient C and n with the right-hand rule; an upward normal goes with counterclockwise travel seen from above.
- Use it to turn a hard line integral into an easier surface integral, or the reverse.
- Any surface with the same boundary and orientation gives the same flux of curl F.
- Green’s theorem is the flat case, and closed surfaces give a flux of curl F equal to 0.
Previous lesson: Surface Integrals
Next lesson: Divergence Theorem
Back to the Calculus 3 Index