Stokes' Theorem

Stokes' theorem relates the integral of a vector field around the boundary $\partial S$ of a surface to a vector surface integral over the surface.

By the boundary of a surface, I mean its "edge" --- like the edge of the bowl below. (A surface need not have a boundary; for example, the boundary of a sphere is empty.)

$$\hbox{\epsfysize=2 in \epsffile{stokes-theorem-1.eps}}$$

To state Stokes' theorem, I'll assume that a normal to the surface has been chosen at each point in a "smooth" way. Having done this, the boundary must be traversed in a way consistent with the choice of normal. Imagine walking along the surface near the boundary with your arms out so that your body points in the direction of the chosen normal. You should traverse the boundary in such a way that your right arm points "outside" the surface.

Now if $\vec{F}$ is a 3-dimensional vector field, Stokes' theorem says

$$\int_{\partial S} \vec{F} \cdot \bvec{ds} = \dint_S \curl \vec{F}\cdot \bvec{dS}.$$

As usual, a careful statement would include technical conditions on the field $\vec{F}$ (for instance, that it have continuous second partial derivatives) and the surface S (for instance, that it should be piecewise smooth).

Terminology. The line integral of a field $\vec{F}$ around a closed curve is sometimes referred to as the circulation of $\vec F$ . You will often see this written as

$$\oint_{\vec{\sigma}} \vec{F} \cdot \bvec{ds}.$$

The "o" on the integral sign merely means that the integral is being taken around a closed curve.


Example. Let S be the part of the plane $z = x + 2 y + 4$ lying above the square

$$\left\{\matrix{ 0 \le x \le 1 \cr 0 \le y \le 1 \cr}\right\}$$

Compute the integral of $\vec{F}
   = (y z - x z, -y z - x z, 1)$ counterclockwise around the boundary of S, viewed from above.

$$\hbox{\epsfysize=1.75in \epsffile{stokes-theorem-2.eps}}$$

The boundary of the region consists of 4 segements, so doing the line integral directly would be tedious. Instead, I'll use Stokes' Theorem.

$$\curl \vec{F} = \left|\matrix{ \ihat & \jhat & \khat \cr \noalign{\vskip2pt} \pder {} x & \pder {} y & \pder {} z \cr \noalign{\vskip2pt} y z - x z & -y z - x z & 1 \cr}\right| = (y + z, y - x, -2 z).$$

The normal vector to the plane is

$$\vec{N} = (-1, -2, 1).$$

Hence,

$$\curl \vec{F} \cdot \vec{N} = (y + z, y - x, -2 z) \cdot (-1, -2, 1) = x - 3 y - 2 z = x - 3 y - 2 (x + 2 y + 4) = -x - 7 y - 8.$$

So

$$\int_{\partial S} \vec{F} \cdot \bvec{ds} = \int_0^1 \int_0^1 (-x - 7 y - 8)\,dx\,dy = \int_0^1 \left[-\dfrac{1}{2} x^2 - 7 x y - 8 x\right]_0^1\,dy =$$

$$\int_0^1 \left(-7 y - \dfrac{17}{2}\right)\,dy = \left[-\dfrac{7}{2} y^2 - \dfrac{17}{2} y\right]_0^1 = -12.\quad\halmos$$


Example. Compute the integral of $\vec{F} = (y z^2 + 6 x z, x z^2 + 2
   x, 2 x y z)$ around the boundary of the surface $z = x^2 + y^2$ , $z \le 1$ , counterclockwise as viewed from above. Compute the integral directly, and by using Stokes' theorem.

$$\hbox{\epsfysize=1.75 in \epsffile{stokes-theorem-3.eps}}$$

The boundary of the region is $1
   = z = x^2 + y^2$ . I can parametrize it by

$$x = \cos t, \quad y = \sin t, \quad z = 1, \quad 0 \le t \le 2 \pi.$$

Note that the boundary is traversed counterclockwise (as viewed from above).

The velocity vector for the curve is

$$\vec{\sigma}\,'(t) = (-\sin t, \cos t, 0).$$

The vector field is

$$\vec f(t) = (\sin t + 6\cos t, 3\cos t, 2\sin t \cos t).$$

Hence,

$$\vec{F} \cdot \vec{\sigma}\,' = -(\sin t)^2 - 6\sin t \cos t + 3(\cos t)^2 = -\dfrac{1}{2}(1 - \cos 2 t) - 6\sin t \cos t + \dfrac{3}{2}(1 + \cos 2 t).$$

The integral around the boundary is

$$\int_0^{2 \pi} \left(-\dfrac{1}{2}(1 - \cos 2 t) - 6\sin t \cos t + \dfrac{3}{2}(1 + \cos 2 t)\right)\,dt = 2 \pi.$$

Next, I'll compute the circulation using Stokes' theorem. The orientation of the boundary is consistent with the upward normal for the surface. A normal is given by

$$\vec N = \left(-\pder z x, -\pder z y, 1\right) = (-2 x, -2 y, 1).$$

The z component is positive, so this is the upward normal. (If the formula had given the downward normal, I would have multiplied the vector by -1.)

Next,

$$\curl \vec{F} = \left|\matrix{ \ihat & \jhat & \khat \cr \noalign{\vskip2pt} \pder {} x & \pder {} y & \pder {} z \cr \noalign{\vskip2pt} y z^2 + 6 x z & x z^2 + 2 x & 2 x y z \cr}\right| = (0, 6 x, 2).$$

So

$$\curl \vec{F} \cdot \vec N = -12 x y + 2.$$

The integral is an x-y integral, so I integrate over the projection of the surface into the x-y plane. The projection is the disk $x^2 + y^2 \le 1$ . I convert to polar; the disk is

$$0 \le r \le 1, \quad 0 \le \theta \le 2 \pi.$$

The integrand becomes

$$\curl \vec{F} \cdot \vec N = -12 r^2 \cos \theta \sin \theta + 2.$$

Stokes' theorem says that the circulation is

$$\int_0^1 \int_0^{2 \pi} (-12 r^2 \cos \theta \sin \theta + 2) r\,d\theta\,dr = 2 \pi.$$

This agrees with the direct computation.


Example. Compute the circulation of $\vec{F} = y \ihat - 2 z \jhat + x
   \khat$ around the curve of intersection of the plane $y =
   x$ and the hyperboloid $2 x^2 - y^2 + z^2 = 1$ , where the curve is traversed in a direction consistent with a surface normal having positive x component.

$$\hbox{\epsfysize=1.75 in \epsffile{stokes-theorem-4.eps}}$$

Set $y = x$ in $2 x^2 - y^2
   + z^2 = 1$ . I obtain $x^2 + z^2 = 1$ . Thus, the projection of the curve into the x-z plane is a circle of radius 1. (Make a note of this, because I will use it later!) To compute the line integral directly, I could use the parametrization

$$x = \cos t, \quad y = \cos t, \quad z = \sin t, \quad 0 \le t \le 2 \pi.$$

If you do the computation, you discover that you need to integrate $-\sin t \cos t + (\sin t)^2 +
   1$ . This is not too bad ...

Instead, I will use Stokes' theorem. Note that

$$\curl \vec{F} = \left|\matrix{ \ihat & \jhat & \khat \cr \noalign{\vskip2pt} \pder {} x & \pder {} y & \pder {} z \cr \noalign{\vskip2pt} y & -2 z & x \cr}\right| = (2, -1, -1).$$

This looks fairly simple. What about the surface normal?

Your first thought might be to parametrize the hyperboloid $2 x^2 - y^2 + z^2 = 1$ . But Stokes' theorem allows you to use any surface which has the given curve as its boundary. Obviously, you should pick the simplest surface with this property, and in this case, it is $y = x$ . That is, the surface is the part of $y = x$ which satisfies $x^2 + z^2 \le 1$ .

You know that if the surface is $z = f(x, y)$ , the normal is

$$\vec N = \left(-\pder z x, -\pder z y, 1\right).$$

By swapping the variables, it follows that if the surface has the form $y = f(x, z)$ , the normal is

$$\vec N = \left(-\pder y x, 1, -\pder y z\right).$$

Now apply this formula to $y =
   x$ . I get $\vec N = (-1, 1, 0)$ , but the x component is negative. So multiply the vector by -1: I get the normal $\vec N = (1, -1, 0)$ .

Hence,

$$\curl \vec{F} \cdot \vec N = 3.$$

What about the limits of integration? Well, I had the surface $y = x$ in $y = f(x,
   z)$ form. So I should integrate over the projection into the x-z plane. But the projection is just the disk $x^2 + z^2 \le 1$ .

$$\hbox{\epsfysize=1.75 in \epsffile{stokes-theorem-5.eps}}$$

Therefore, Stokes' theorem gives

$$\int_{\vec{\sigma}} \vec{F} \cdot \bvec{ds} = \dint_{x^2 + z^2 \le 1} 3\,dx\,dz = 3 \cdot (\hbox{the area of $x^2 + z^2 \le 1$}) = 3 \pi.\quad\halmos$$


Example. Let S be the union of all the faces of the cube

$$0 \le x \le 1, \quad 0 \le y \le 1, \quad 0 \le z \le 1 \quad\hbox{except the bottom}.$$

Let $\vec{F} = (x^2 y, 2 x z -
   y^2, x y z)$ . Compute the flux of $\curl \vec{F}$ out through S.

$$\hbox{\epsfysize=1.75 in \epsffile{stokes-theorem-6.eps}}$$

S is made up of 5 faces. While the faces are very simple surface --- for example, the top is $z = 1$ for $0 \le x \le 1$ and $0 \le y \le
   1$ --- I'd rather not do five surface integrals, even if they are easy.

What about Stokes' theorem? Well, Stokes says that the flux of $\curl \vec{F}$ is equal to the circulation of $\vec{F}$ around the boundary. The boundary is the bottom square edge, traversed counterclockwise as viewed from above. To compute the line integral of $\vec{F}$ around the boundary, I'd need to parametrize each segment, then compute the integral along each segment.

Four line integrals still sounds like too much ...

I'll use the "cap trick": The circulation of $\vec{F}$ equals the flux of $\curl \vec{F}$ through any surface having the bottom square edge as its boundary. Instead of using the original surface S, I'll use the (missing) bottom face of the cube!

First,

$$\curl \vec{F} = \left|\matrix{ \ihat & \jhat & \khat \cr \noalign{\vskip2pt} \pder {} x & \pder {} y & \pder {} z \cr \noalign{\vskip2pt} x^2 y & 2 x z - y^2 & x y z \cr}\right| = (x z - 2 x, -y z, 2 z - x^2).$$

The bottom face is $z = 0$ for $0 \le x \le 1$ and $0 \le y \le
   1$ . I need the upward normal; it is $\vec N = (0, 0, 1)$ . So

$$\curl \vec{F} \cdot \vec N = 2 z - x^2 = -x^2.$$

The flux of $\curl \vec{F}$ is

$$\int_0^1 \int_0^1 -x^2\,dx\,dy = -\dfrac{1}{3}.\quad\halmos$$


The idea used in the last example is worth highlighting:

Stokes' Theorem allows you to compute the line integral around the boundary of a surface by computing the flux of $\curl \vec{F}$ through any surface with the same boundary.

$$\hbox{\epsfysize=1.75in \epsffile{stokes-theorem-7.eps}}$$

Example. Let

$$\vec{F} = (-6 x^2 y - 2 y^3 - z^2, -z^2, z).$$

Let S be the part of the cone $z
   = 1 - \sqrt{x^2 + y^2}$ lying above the x-y-plane. Compute

$$\int_{\partial S} \vec{F} \cdot \bvec{ds}.$$

The boundary of S is traversed counterclockwise as viewed from above.

The boundary of the cone is the same as the boundary of the surface T consisting of the disk $x^2 +
   y^2 \le 1$ .

$$\hbox{\epsfysize=1.75in \epsffile{stokes-theorem-8.eps}}$$

Therefore,

$$\int_{\partial S} \vec{F} \cdot \bvec{ds} = \int_{\partial T} \vec{F} \cdot \bvec{ds} = \dint_S \curl \vec{F} \cdot \bvec{dS}.$$

I have

$$\curl \vec{F} =\left|\matrix{ \ihat & \jhat & \khat \cr \noalign{\vskip2pt} \pder {} x & \pder {} y & \pder {} z \cr \noalign{\vskip2pt} -6 x^2 y - 2 y^3 - z^2 & -z^2 & z \cr}\right| = (2 z, -2 z, 6 x^2 + 6 y^2).$$

I will do the double integral in polar. The region inside the disk is

$$\left\{\matrix{ 0 \le \theta \le 2 \pi \cr 0 \le r \le 1 \cr}\right\}$$

The normal vector is $\vec{N} =
   (0, 0, 1)$ , so

$$\curl \vec{F} \cdot \vec{N} = (2 z, -2 z, 6 x^2 + 6 y^2) \cdot (0, 0, 1) = 6 x^2 + 6 y^2 = 6 r^2.$$

Hence, the integral is

$$\int_0^{2 \pi} \int_0^1 6 r^2 \cdot r\,dr\,d\theta = 12 \pi \int_0^1 r^3\,dr = 12 \pi \left[\dfrac{1}{4} r^4\right]_0^1 = 3 \pi = 9.42477 \ldots.\quad\halmos$$


Contact information

Bruce Ikenaga's Home Page

Copyright 2018 by Bruce Ikenaga