# Stokes’ for work (in space)


My notes of the excellent lectures 31 and 32 by “Denis Auroux. 18.02 Multivariable Calculus. Fall 2007. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA.”

## Stokes’ Theorem

The curl measures the value of the vector field to be conservative. In the plane, curl also came up as Green’s theorem to convert line integrals into double integrals. The same thing in space, is called Stokes’ theorem.

Stokes’ Theorem

The work done by a vector field along a closed curve, can be replaced with a double integral $$\oint_C \vec F\cdot d\vec r = \iint \underbrace{\left(\nabla\times\vec F\right)}_{\rm{curl}\left(\vec F\right)}\cdot\hat n\,dS \nonumber$$
Where
• $$C$$ is a closed curve in space
• $$S$$ is any surface bounded by $$C$$
The catch is that we have to figure out what orientation convention to use.

### Orientation

For the orientation of $$C$$ and $$S$$ to be compatible, follow either rule in the table below

Walking Right-hand rule
If I walk along $$C$$ in the positive direction, with $$S$$ to my left, then $$\hat n$$ is pointing up Thumb goes along $$C$$ positively; index finger tanguent to $$S$$ (towards the interior of $$S$$); then the middle finger points parallel to $$\hat n$$.

#### Examples

It points up.

##### Two

Imagine you’re walking on the inside of the cone, following the boundary, then the surface is to your left. So the normal vector will be pointing up and slightly into the cone. Or using the rigt-hand rule, with the index finger pointing down along the cone, then the normal vector points up and in.

##### Three

The cylinder has two boundary curves. How should I choose the orientation of my curves?

• For $$C’$$: imagine you’re walking on the outside of the cylinder along $$C’$$. If you want to walk so, that the cylinder is to your left, then you have to go counterclockwise.
• For $$C$$: image walking along the outside of the cylinder. If you want to walk so, that the cylinder is to your left, then you have to go clockwise.

### Examples

#### One

Compute the line integral on the unit circle on the $$xy$$-plane.

You can choose any surface

Then calculate the flux of $$\rm{curl}(\vec F)$$

## Proof

### On a plane (comparing Stokes with Green)

Surface $$S$$ is a portion of $$xy$$-plane, bounded by a curve $$C$$ (counterclockwise). Let $$\vec F$$ be $$\left\langle P, Q, R\right\rangle$$.

The curve is only on the $$xy$$-plane $$\Rightarrow z=0 \Rightarrow dz=0$$ \begin{align*} \oint_C\vec F\cdot d\vec r &= \oint_C P\,dx + Q\,dy \\ &= \iint_S \left(\nabla\times\vec F\right)\cdot\hat n\,dS \tag{Stokes} \\ \end{align*} \nonumber

The normal vector $$\hat n$$ compatible with this $$C$$ and $$S$$ points up, $$\hat n=\hat k$$ \begin{align*} \oint_C\vec F\cdot d\vec r &= \iint_S \left(\nabla\times\vec F\right)\cdot\hat k\,dS \\ \end{align*} \nonumber

This means we will be integrating the $$z$$-component of $$\rm{curl}(\vec F)$$. Based on equation $$\eqref{eq:curl2}$$ \begin{align*} \left(\nabla\times\vec F\right)\cdot\hat k &= (Qx – Py) \end{align*}

In the plane $$dS=dx\,dy$$, so the double integral becomes \begin{align*} \oint_C\vec F\cdot d\vec r &= \iint_S (Q_x-Py)\,dx\,dy \\ \end{align*} \nonumber

This shows Green’s theorem is the special case of Stokes in the $$xy$$-plane.

### Generalizing

• We know it for $$C$$, $$S$$ in the $$xy$$-plane. (Green’s theorem)
• Also for $$C,S$$ in any plane (using that work, flux, curl make sense independently of the coordinate system!)
• Given any $$S$$: decompose the surface into tiny, almost flat, pieces

Any surface we can cut into tiny pieces, and these pieces are basically flat.

Then you can use Stokes’ theorem on each small flat piece. It says that the line integral along, say, this curve is equal to the flux of a curl through this tiny piece of surface. If I add all of the small contributions to flux I get the total flux.

All the little line integrals on the inside will cancel out. The only ones that I go through only once are on the outermost pieces. So, summed together, I get the work done along the outer boundary.

In other words: sum of work around each little piece $$=$$ the work along $$C$$.

The sum of the flux through each piece $$=$$ flux through $$S$$.

## Examples

### One

Find the work of $$F=\left\langle z,x,y\right\rangle$$ around unit circle in $$xy$$-plane (counterclockwise).

#### Directly

Using the equation from \begin{align*} \oint_c \vec F\cdot d\vec r &= \oint_C\left( Pdx + Qdy + Rdz \right) \\ &= z\,dx + x\,dy + y\,dz \\ \end{align*}

On the circle $$z=0$$, and we can parametize $$x$$ and $$y$$ \left\{ \begin{align*} x = \cos t &\Rightarrow dx = -\sin t\,dt \\ y = \sin t &\Rightarrow dy = \cos t\,dt \\ z = 0 &\Rightarrow dz = 0 \end{align*} \right.

The range is counterclockwise around the circle \begin{align*} \oint_c \vec F\cdot d\vec r &= \int_0^{2\pi} 0\,dx + \overbrace{\cos t}^{x}\,\overbrace{\cos t\,dt}^{dy} + 0y \\ &= \int_0^{2\pi} \cos^2 t\,dt = \pi \end{align*}

#### Using Stokes’ theorem

The smart choice would be to use the flat unit disk. To convince you that we can take any surface, I am going to take a piece of paraboloid $$z = 1 – x^2 – y^2 \nonumber$$

With the normal vector pointing up

Compute \begin{align*} \iint_S\left(\nabla\times\vec F\right)\,\hat n\,dS \end{align*}

Let’s start with the curl \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} \nabla\times\vec F &= \left| \begin{array}{ccc} \hat\imath & \hat\jmath & \hat k \\ \pdv{}{x} & \pdv{}{y} & \pdv{}{z} \\ P & Q & R \end{array} \right| = \left| \begin{array}{ccc} \hat\imath & \hat\jmath & \hat k \\ \pdv{}{x} & \pdv{}{y} & \pdv{}{z} \\ z & x & y \end{array} \right| \\ &= \hat\imath \left| \begin{array}{cc} \pdv{}{y} & \pdv{}{z} \\ x & y \end{array} \right| – \hat\jmath \left| \begin{array}{cc} \pdv{}{x} & \pdv{}{z} \\ z & x \end{array} \right| + \hat k \left| \begin{array}{cc} \pdv{}{x} & \pdv{}{y} \\ z & x \end{array} \right| \\ &= (1-0)\hat\imath – (0-1)\hat\jmath + (1-0)\hat k = \left\langle 1, 1, 1\right\rangle \end{align*}

To find $$\hat n\,dS$$, let’s call $$z=1-x2-y^2=f(x,y)$$ and use the formula for the graph of a function \begin{align*} \hat n\,dS &= \left\langle -f_x,-f_y,1\right\rangle\,dx\,dy \\ &= \left\langle 2x, 2y, 1\right\rangle\,dx\,dy \\ \end{align*}

The flux over the shadow of the surface (the unit disk), and switch to polar coordinates \begin{align*} \iint_S\left(\nabla\times\vec F\right)\,\hat n\,dS &= \iint_S \left\langle 1, 1, 1\right\rangle \cdot \left\langle 2x, 2y, 1\right\rangle\,dx\,dy \\ &= \iint (2x + 2y + 1)\,dx\,dy \\ &= \int_0^1 \int_0^{2\pi} (2r\cos\theta + 2r\sin\theta + 1)\,r\,d\theta\,dr \\ &= \int_0^1 \int_0^{2\pi} (2r^2\cos\theta + 2r^2\sin\theta + r)\,d\theta\,dr \\ &= \int_0^1 \Big[ 2r^2\sin\theta – 2r^2\cos\theta + r\theta \Big]_0^{\theta=2\pi}\,dr \\ &= \int_0^1 2r\pi\,dr = \Big[ r^2\pi \Big]_0^{r=1} = \pi \end{align*}

## Path-independance

### Simply-connected

Define: a region is simply-connected if every closed loop inside it bounds a surface inside it.

Examples with a unit circle in the $$xy$$-plane

• A region is the space with the origin removed: this is simply-connected because we can avoid the origin by making a little dome over it.
• A region is the space with the $$z$$-axis removed: not simply-connected, because if I try to find a surface that is bounded by this curve, it has to cross the $$z$$-axis somewhere. There is no surface whose only boundary is the curve, that doesn’t intersect the $$z$$-axis anywhere.

Recall: if $$\vec F = \nabla f$$ is a gradient field, then its curl $$=0$$.

### Theorem

Theorem: if $$\vec F$$ is defined in a simply-connected region, and $$\rm{curl}\vec F = 0$$, then $$\vec F$$ is a gradient field, and $$\int_C\vec F\cdot d\vec r$$ is path-independent.

#### Proof

Assume (\rm{curl}\vec F = 0\), and there are two curves that go from $$P_0$$ to $$P_1$$

We like to proof that the difference in line integrals in $$0$$ $$\int_{C_1} \vec F\cdot d\vec r – \int_{C_2} \vec F\cdot d\vec r \nonumber$$

Form a closed curve that is $$C_1$$ minus $$C_2$$.

$$C$$ is a closed curve, so we can use Stokes’ theorem To use Stoke’s theorem, we need to find a surface to apply it to. That is where the assumption of simply-connected is useful. We can find a surface, $$S$$, that bounds $$C$$ because the region is simply connected. \begin{align*} \int_{C_1} \vec F\cdot d\vec r – \int_{C_2} \vec F\cdot d\vec r &= \oint_C \vec F\cdot d\vec r \tag{Stokes’} \\ &= \iint_S \underbrace{\rm{curl}(\vec F)}_{=0} \cdot d\vec S \end{align*}

But now, the curl is zero. So, if I integrate zero, I will get zero. OK, so I proved that my two line integrals along C1 and C2 are equal. But for that, I needed to be able to find a surface which to apply Stokes theorem. And that required my region to be simply-connected.

If we had a vector field that was defined only outside of the $$z$$-axis and I took two paths that went on one side and the other side of the $$z$$-axis, I might have obtained, actually, different values of the line integral.

### Remark on simply-connected regions

Topology classifies surfaces in space, but trying to loop at loops.

#### Sphere

The surface of a sphere is simply-connected. Let’s take a closed curve $$C$$ on the surface of a sphere. You can always find a portion of the sphere’s surface that is bounded by it.

#### Torus

A torus (the surface of a doughnut), is not simply-connnected. If you look at the $$C_1$$ loop, it bounds a surface in space, but that surface cannot be made to be just a piece of the donut. You have to go through the hole. You have to leave the surface of a torus.

The $$C_2$$ loop does not bound anything that’s completely contained in the torus. It bounds a disc, but that is inside of a torus, and not not a part of the surface. So, an topologists would say: there’s two “independent” loops that don’t bound surfaces, that don’t bound anything.

### Orientability

Say, I want to apply Stokes’ theorem to simplify a line integral along the curve below on the left. This curve goes twice around the $$z$$-axis.

One way to find the surface that is bounded by this curve, is to take a Möbius strip. It’s a one sided strip, where when you go around, you flip one side becomes the other. So, if you want to take a band of paper and glue the two sides with a twist, so, it’s a one sided surface. And, that gives us, actually, serious trouble if we try to orient it to apply Stokes theorem.

If we use the outside edge to orient the normal vector, it points up. But when I follow the curve, I end up on the inside where the convention for the normal vectora says it has to point down on that same surface. There’s no way to consistently choose a normal vector for the Mobius strip. So, that’s what we call a non-orientable surface. That just means it has only one side.

If it has only one side, that we cannot speak of flux, because we have no way of saying that we’ll be counting things positively one way, negatively the other way, because there’s only one. There’s no notion of sides. So, you can’t define a side towards which things will be going positively. So, that’s actually a situation where flux cannot be defined.

So, if we really wanted to apply Stokes theorem, because space is simply-connected, and I will always be able to apply Stokes theorem to any curve, what would I do? Well, this curve actually bounds another surface that is orientable. You can take a hemisphere, and you can take a small thing and twist it around. That spherical thing with a little slit going twisting into it, will border my loop. And, that one is orientable.

### Surface-independance

For a surface in space, you can take e.g. an upper half sphere $$S_1$$. Based on the orientation convention, you wil need to make the normal vector upwards. We could also take $$S_2$$, with according to the convention the normal vector will be going into the thing.

Stokes’ says $$\int_C \vec F\cdot d\vec r = \iint_{S_1} (\nabla\times\vec F)\cdot\hat n\,dS = \iint_{S_2} (\nabla\times\vec F)\cdot\hat n\,dS \nonumber$$

That means that curl $$\vec F$$, $$\nabla\times\vec F$$ has some soft of surface independent property for as long as the boundary is curve $$C$$. Why is that?

To compare the flux through $$S_1$$ and $$S_2$$ we subtract them and call it $$\iint_S$$ $$\iint_{S_1} (\nabla\times\vec F)\cdot\hat n\,dS – \iint_{S_2} (\nabla\times\vec F)\cdot\hat n\,dS = \iint_{S} (\nabla\times\vec F)\cdot\hat n\,dS \nonumber$$

Here $$S$$ is $$S_1$$ with its orientation minus $$S_2$$ with its reversed orientation. So $$S$$, is the whole closed surface, with the normal vector pointing out everywhere.

To find the flux through closed surface $$S$$, we can replace it with a tripple integral. That is the divergence theorem. Let’s call the region $$D$$ $$\iint_{S_1} (\nabla\times\vec F)\cdot\hat n\,dS – \iint_{S_2} (\nabla\times\vec F)\cdot\hat n\,dS = \iiint_D \rm{div}\left( \nabla\times\vec F \right)\,dV \nonumber$$

We can check: if you take the divergence of the curl of a vector field, you always get $$0$$ $$\rm{div\left(\nabla\times\vec F\right)} = 0 \nonumber$$

So $$\iint_{S_1} (\nabla\times\vec F)\cdot\hat n\,dS – \iint_{S_2} (\nabla\times\vec F)\cdot\hat n\,dS = \iiint_D 0\,dV = 0 \nonumber$$

That is why the flux for $$S_1$$ and $$S_2$$ were the same, and we could choice either surface for Stokes’.

#### Let’s check that $$\nabla\cdot\left(\nabla\times\vec F\right) = 0$$

Let vector field $$\vec F=\left\langle P,Q,R\right\rangle$$, where $$P(x,y,z), Q(x,y,z)$$ and $$Q(x,y,z)$$

Remember the curl

Let’s try to do the cross-product using the pseudo-determinant \begin{align*} \rm{curl}\left(\vec F\right) &= \nabla\times\vec F \\ &= \left| \begin{array}{ccc} \hat\imath & \hat\jmath & \hat k \\ \pdv{}{x} & \pdv{}{y} & \pdv{}{z} \\ P & Q & R \end{array} \right| \\ &= \left\langle R_y – Q_z, P_z-R_x, Q_x-P_y\right\rangle \end{align*}

The divergence of this, $$\nabla \cdot (\nabla\times\vec F)$$ \newcommand{pdv}[1]{\tfrac{\partial}{\partial #1}} \begin{align*} \nabla \cdot (\nabla\times\vec F) &= \left\langle \pdv{x}, \pdv{y}, \pdv{z} \right\rangle \cdot \left\langle R_y – Q_z, P_z-R_x, Q_x-P_y \right\rangle \\ &= \pdv{x}(R_y – Q_z) + \pdv{y}(P_z-R_x) + \pdv{z}(Q_x-P_y) \\ &= (R_y – Q_z)_x + (P_z-R_x)_y + (Q_x-P_y)_z \\ &= R_{yx} – Q_{zx} + P_{zy} – R_{xy} + Q_{xz} – P_{yz} \end{align*}

The mixed second derivatives are the same, no matter what order you take them \newcommand{pdv}[1]{\tfrac{\partial}{\partial #1}} \begin{align*} \nabla \cdot \nabla\times\vec F &= \xcancel{R_{yx}} – \cancel{Q_{zx}} + \bcancel{P_{zy}} – \xcancel{R_{xy}} + \cancel{Q_{xz}} – \bcancel{P_{yz}} \\ &= 0 \end{align*}

Note: if we had “real” vectors (not using the $$\nabla$$-operator) $$u \cdot \left( u \times v\right) \nonumber$$ $$u\times v$$ is $$\perp$$ to $$u$$ and $$v$$, so its dot-product will be $$0$$.

Embedded software developer
Passionately curious and stubbornly persistent. Enjoys to inspire and consult with others to exchange the poetry of logical ideas.

This site uses Akismet to reduce spam. Learn how your comment data is processed.