Lab 7A - Stokes's Theorem
Math 2374 - University of Minnesota
http://www.math.umn.edu/math2374
Questions to: swenson@math.umn.edu

Integration in More than Two Dimensions

This semester, we have learned to use six new kinds of integrals.  Here's a quick review: as usual, vector-valued objects are in boldface.

Type Symbol Region Integrand How to Do It
double ∫∫_R^  u A R, a region scalar function u ∫ (∫u (x, y) dy) dx
triple ∫∫∫_S^ u V S, a solid scalar function u ∫ (∫ (∫u (x, y, z) dz) dy) dx
line (path) ∫_C^ u L   or   ∮_Cu L C, a curve withparametrizationf (t), a≤t≤b scalar function u ∫_a^bu (f (t)) ∥f ' (t) ∥ t
line (path) ∫_C^ F · x   or   ∮_CF · x C, a curve withparametrizationf (t), a≤t≤b vector field F ∫_a^bF (f (t)) · f ' (t) t
surface ∫∫_M^ uσ   or   ∯_Muσ M, a surface withparametrization f (s, t) and parameter range R scalar function u ∫∫_R^ u (f (s, t)) ∥∂f/∂s × ∂f/∂t∥A
surface (flux) ∫∫_MF · nσ   or   ∯_MF · nσ M, a surface withparametrization f (s, t) and parameter range R vector field F ∫∫_R^ F (f (s, t)) · (∂f/∂s × ∂f/∂t) A

Notice that each kind of integral has its own definition, and there is no obvious way to convert one kind to another.  Stokes's Theorem provides the missing link between surface integrals of vector fields and line integrals of vector fields.

Stokes's Theorem:  Suppose M is a smooth surface with a chosen orientation, and let F be a vector field which has continuous partial derivatives on and "near" M.  Then ∫_ (∂M)^ F · x = ∫∫_M^ curl F · nσ, where ∂M is the positively-oriented boundary of M.

Using Stokes's Theorem: Example 1

Applying Stokes's Theorem can be tricky: each problem has its own kind of challenge.  For example, we might want to calculate the surface integral of some vector field G over some complicated surface with a "nice" boundary.  We can use Stokes's Theorem to avoid working with the surface, if we can find a vector field F whose curl is G.  This can be hard.

Note: you might wish to add Live to some of the graphing commands if you're having trouble visualizing the surfaces.

Example 1

Calculate ∫∫_M^ G · nσ, where G(x,y,z)=(0,0,2), and M is the surface parametrized by f(r,θ)=(r cos θ, r sin θ, sin(4πr), with 0≤r≤1, 0≤θ≤2π.  [Use the upward-pointing normal vector.]

In[46]:=

f[r_, t_] = {r * Cos[t], r * Sin[t], Sin[4Pi * r]} ParametricPlot3D[f[r, t], {r, 0, 1}, {t, 0, 2Pi}, PlotPoints60, AxesLabel {X, Y, Z}] ; ShowLive[%] ;

Out[46]=

{r Cos[t], r Sin[t], Sin[4 π r]}

[Graphics:HTMLFiles/index_16.gif]

This surface is intimidating, but its boundary is very nice.  The boundary is just the part of the surface where r=1; we get its parametrization by substituting r=1 in f.

In[49]:=

g[t_] = {Cos[t], Sin[t], Sin[4Pi]} ParametricPlot3D[g[t], {t, 0, 2Pi}]

Out[49]=

{Cos[t], Sin[t], 0}

[Graphics:HTMLFiles/index_19.gif]

Out[50]=

⁃Graphics3D⁃

We need F so that curl F=G; then our integral will be the right-hand side of the equation in Stokes's Theorem.  One possible choice is F(x,y,z)=(-y,x,0).   (Check this!  Also note that, given G, there is no specific way for you to find an F such that curl F=G.  In this case we just "pulled it out of the hat.")  If we use this F, then the left-hand side of the equation in Stokes's Theorem is almost (not quite) easy enough to do in your head:

∫∫_M^ G · nσ = ∫_ (∂M)^ F · x = ∫_0^(2π ... 0;) (-sin t, cos t, 0) · (-sin t, cos t, 0) t = ∫_0^(2π) 1t = 2π .

Re-read this example to make sure you followed the process, and ask your TA if you have any questions about what we did or why.  These problems can be tricky!

Using Stokes's Theorem: Example 2

More often, we use Stokes's Theorem in the other direction: we have a tricky line integral, and try to replace it with an easy surface integral.  This means we don't have to invent a new vector field with a given curl; instead, we have to invent a surface with a given boundary.  Any surface with the right boundary will be good enough, just like in the last example, where any F with the right curl was good enough.

If you'd like to see an example of many different surfaces which have the same boundary, copy the following address and paste it into your web browser:

http://www.math.umn.edu/~rogness/multivar/multiple_surfaces.shtml

Example 2

Calculate ∫_C^ F · x , where F(x,y,z)=(x^2z, xy^2, z^2), and C is the intersection of the plane x+y+z=4 with the cylinder x^2 + y^2 = 16.

Here is a plot of the two surfaces intersecting.  Replace ShowLive with Show if you'd prefer not to have an interactive version.  (This has been done in the web version of the lab.)

In[51]:=

plane = Plot3D[4 - x - y, {x, -5, 5}, {y, -5, 5}] cyl = ContourPlot3D[x^2 + y^2 - 16, {x, -4,  ... plane, ,, cyl, ,, RowBox[{BoxRatios, , RowBox[{{, RowBox[{1, ,, 1, ,, 1.6}], }}]}]}], ]}]

[Graphics:HTMLFiles/index_28.gif]

Out[51]=

⁃SurfaceGraphics⁃

[Graphics:HTMLFiles/index_30.gif]

Out[52]=

⁃Graphics3D⁃

[Graphics:HTMLFiles/index_32.gif]

Out[53]=

⁃Graphics3D⁃

Let's parametrize the curve C, so we can graph it.  Thinking in cylindrical coordinates, every point on C is on the cylinder, so has r=4.  Also, every point on C is on the plane, so has z=4-x-y.  Letting θ range from 0 to 2π, we get the following parametrization.

In[54]:=

f[t_] = {4Cos[t], 4Sin[t], 4 - 4Cos[t] - 4Sin[t]} ; curve = ParametricPlot3D[f[t], {t, 0, 2Pi}]

[Graphics:HTMLFiles/index_35.gif]

Out[55]=

⁃Graphics3D⁃

What is the orientation of this curve -- "clockwise" or "counterclockwise"?  Check your answer using PathAnimate3D or PathTangentAnimate3D from Lab 4.

To use Stokes's Theorem, we need a surface whose boundary is C.  We have an ideal surface available: it's just the part of the plane which lies inside the cylinder.  [Check: does C have the right orientation to be the boundary of this surface?]  We can parametrize this surface just as we did C; the only difference is that instead of r=4, we have 0≤r≤4.  

In[56]:=

g[r_, t_] = {r * Cos[t], r * Sin[t], 4 - r * Cos[t] - r * Sin[t]} ; surface = ParametricPlot3D[g[r, t], {r, 0, 4}, {t, 0, 2Pi}]

[Graphics:HTMLFiles/index_38.gif]

Out[57]=

⁃Graphics3D⁃

Mathematica gives us an oblique view of this surface; you should evaluate the following cell to get an interactive version of it.  Rotate it and compare to the earlier picture (with the plane and the cylinder) and convince yourself that our surface is exactly the part of the plane contained within the cylinder.

In[58]:=

Show[surface]

[Graphics:HTMLFiles/index_41.gif]

Out[58]=

⁃Graphics3D⁃

Finally, we can use Mathematica to calculate our integral:  ∫_C^ F · x = ∫∫_M^ curl F · nσ = ∫∫_R^ (curl F) (g (r, t)) · (∂g/∂r × ∂g/∂t) A, so we need the following calculations.  First, we define F, take its curl, and plug in the parametrization of our surface:

In[59]:=

F[x_, y_, z_] = {x^2 * z, x * y^2, z^2} curlF[x_, y_, z_] = Curl[F[x, y, z]] v1[r_, t_] = Apply[curlF, g[r, t]]

Out[59]=

{x^2 z, x y^2, z^2}

Out[60]=

{0, x^2, y^2}

Out[61]=

{0, r^2 Cos[t]^2, r^2 Sin[t]^2}

Remember the Apply command?  We've used it a few times now; ask your TA for help if you don't remember it.

Next, we take the partial derivatives of our parametrization and take the cross product:

In[62]:=

dgdr[r_, t_] = D[g[r, t], r] dgdt[r_, t_] = D[g[r, t], t] v2[r_, t_] = Cross[dgdr[r, t], dgdt[r, t]] Simplify[%]

Out[62]=

{Cos[t], Sin[t], -Cos[t] - Sin[t]}

Out[63]=

{-r Sin[t], r Cos[t], -r Cos[t] + r Sin[t]}

Out[64]=

{r Cos[t]^2 + r Sin[t]^2, r Cos[t]^2 + r Sin[t]^2, r Cos[t]^2 + r Sin[t]^2}

Out[65]=

{r, r, r}

Finally, we take the dot product of our results, and integrate the result.

In[66]:=

v1[r, t] . v2[r, t] Integrate[%, {r, 0, 4}, {t, 0, 2Pi}]

Out[66]=

r^2 Cos[t]^2 (r Cos[t]^2 + r Sin[t]^2) + r^2 Sin[t]^2 (r Cos[t]^2 + r Sin[t]^2)

Out[67]=

128 π

It's probably good to check our answer by calculating the line integral directly: ∫_C^ F · x = ∫_0^(2π) F (f (t)) · f ' (t) t, so we get:

In[68]:=

w1[t_] = Apply[F, f[t]] w2[t_] = D[f[t], t] w1[t] . w2[t] Simplify[%] Integrate[%, {t, 0, 2Pi}]

Out[68]=

{16 Cos[t]^2 (4 - 4 Cos[t] - 4 Sin[t]), 64 Cos[t] Sin[t]^2, (4 - 4 Cos[t] - 4 Sin[t])^2}

Out[69]=

{-4 Sin[t], 4 Cos[t], -4 Cos[t] + 4 Sin[t]}

Out[70]=

-64 Cos[t]^2 (4 - 4 Cos[t] - 4 Sin[t]) Sin[t] + 256 Cos[t]^2 Sin[t]^2 + (4 - 4 Cos[t] - 4 Sin[t])^2 (-4 Cos[t] + 4 Sin[t])

Out[71]=

64 (-1 + Cos[t] + Sin[t])^2 (3 + 3 Cos[t] + Cos[2 t] + 3 Sin[t] + 2 Sin[2 t])

Out[72]=

128 π

If this looks easier to you than the surface integral, take a careful look at the functions you're integrating.  If the line integral still looks easier, you should try doing both by hand!

Exercises

1) Graph the cylinder x^2 + y^2 = 1and the hyperbolic paraboloid z = y^2 - x^2on the same set of axes, and parametrize the curve C where they intersect.  Verify Stokes's Theorem for the vector field F(x,y,z)=(x^2y, 1/3x^3, xy) and the curve C.  [i.e. Show that the line integral of F along C equals the appropriate surface integral.  You will need to produce your own surface.]

2) Now consider the vector field F(x,y,z)=(x^2y, x, xy).
a) Calculate the line integral of F along the circle parametrized by f_1(t) = (cos(t), sin(t), 1), for 0<t<2π .
b) Calculate the line integral of F along the circle parametrized by f_2(t) = (cos(t), sin(t), 0), for 0<t<2π .
c) Calculate the surface integral of curl(F) over the surface parametrized by g(s,t)=(cos(t),sin(t),s), for 0<t<2 π and 0<s<1.
d) Explain your answers in terms of Stokes's Theorem.

3) Use Stokes's Theorem to evaluate the line integral of the vector field F(x,y,z)=(y + sin(x), z^2 + cos(y), x^3), where C is the curve parametrized by f(t)=(sin t, cos t, sin(2t)), for 0≤t≤2π.

4) Consider the vector field G(x,y,z)=(x,y,z).  Use Stokes's Theorem to prove, by contradiction, that G is not the curl of any smooth vector field F.  [Hint: Let M be the unit sphere centered at the origin. The path integral over ∂M of every smooth vector field F equals 0 -- explain why!]

Credits


Created by Mathematica  (November 6, 2004)