VC.11 3D Flow Along
GIVE IT A TRY!

\(Off[General::spell]; 
Off[General::spell1]; 

    \(Off[ParametricPlot3D::ppcom]; \)\)Off[ParametricPlot::ppcom]; Off[Plot::plnr]; SetOptions[Limit, Analytic -> True];

CMView = {2.7, 1.6, 1.2};

Vector Drawer

BeginPackage["Vector3D`", "Graphics`Colors`"];

\(Axes3D::"usage" = 
      "Axes3D[a, b] creates a Graphics3D object of cartesian axes with x, y, and z running from -a/3 to a, and with axes labels b units beyond the tips of the axes.  Axes3D[a] is Axes3D[a, a/8]."; 

    \(Perpend::"usage" = 
      "Perpend[a] returns a unit vector which is perpendicular to the vector a."; \)\)Arrow::"usage" = 
      "Arrow[a] produces a 2 or 3 dimensional vector from the origin to a. \
Arrow[a, Tail -> tail] gives a vector from tail to a."; Vector::"usage" = 
      "Vector[a, b] gives a 2D or 3D vector from a to b."; ArrowHead::"usage" = 
      "ArrowHead[a, vec] produces an arrowhead with its tip placed at the \
point a, pointing in the direction of the vector vec."; Tail::"usage" = 
      "Tail -> point puts the tail of the vector at point."; Norm::"usage" = 
      "Norm[vec] returns the Euclidean length of vec."; Normalize::"usage" = 
      "Normalize[vec] returns a unit vector in the direction of vec, \
provided vec is nonzero."; Aperture::"usage" = 
      "Aperture is the ratio of the radius of the base to the length of the \
head of a vector."; TipSize::"usage" = 
      "TipSize specifies an absolute size for the inner tip length of the \
head of a vector."; TipRatio::"usage" = 
      "TipRatio is the ratio of the inner length of the arrowhead to the \
length of the shaft of a vector."; HeadRatio::"usage" = 
      "HeadRatio is the ratio of the outer length of the arrowhead to the \
length of the shaft of a vector."; HeadSize::"usage" = 
      "HeadSize specifies an absolute size for the head of a vector."; 
    ScaleFactor::"usage" = 
      "ScaleFactor specifies the amount to scale a vector in length and may \
be either a number or a pure function."; ZeroVectorPointSize::"usage" = 
      "ZeroVectorPointSize is the size of the point used to represent a \
zero vector."; Options[Vector] = 
      Options[Arrow] = 
        Options[ArrowHead] = {HeadRatio -> 0.18, 
            TipRatio -> 0.14, Aperture -> 0.3, 
            ScaleFactor -> 1, HeadType -> Polygon, 
            ShaftQ -> True, EdgesQ -> True, 
            VectorColor -> RGBColor[0, 0, 1], ShaftWidth -> 0.005, 
            ZeroVectorPointSize -> 0.01}; Begin["`Private`"]; SetOptions[ParametricPlot, AspectRatio -> Automatic]; SetOptions[Plot, AspectRatio -> Automatic]; SetOptions[Graphics, AspectRatio -> Automatic]; Axes3D[u_, v_] := 
      Graphics3D[{{Blue, Line[{{-(u/3), 0, 0}, {u, 0, 0}}]}, 
          Text["x", {u + v, 0, 0}], {Blue, 
            Line[{{0, -(u/3), 0}, {0, u, 0}}]}, 
          Text["y", {0, u + v, 0}], {Blue, 
            Line[{{0, 0, -(u/3)}, {0, 0, u}}]}, 
          Text["z", {0, 0, u + v}]}]; Axes3D[u_] := Axes3D[u, (u/8)]; Norm[a_?VectorQ] := N[(Sqrt[a . a])]; Normalize[a_?VectorQ] := If[a . a == 0, a, (a/Norm)[a]]; Perpend[a_?VectorQ] := 
      Normalize[{a[[2]], 
            -a[[1]]}] /; 
        Length[a] == 2Perpend[a_?VectorQ] := 
      Normalize[
          If[a[[1]] == 0, {1, 0, 0}, {0, 
              a[[3]], 
              -a[[2]]}]] /; 
        Length[a] == 3Base3D = 
      Table[{Cos[((2 k π)/8.) ], Sin[((2 k π)/8.) ]}, {k, 0, 
          8}]; Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, sw, ht, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, sw, ht, hs, hr, ts, tr, ap, sf, vc, zvps} = 
            {ShaftQ, ShaftWidth, HeadType, HeadSize, HeadRatio, TipSize, 
                  TipRatio, Aperture, ScaleFactor, VectorColor, 
                  ZeroVectorPointSize} /. {opts} /. Options[Vector]; 
          If[from == to, 
            Return[Graphics[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]; tr = 0.75 hr]; 
          If[NumberQ[ts], tr = (ts/Norm)[diff]]; 
          Graphics[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              With[{trans = ap hr Norm[diff] Perpend[diff]}, {vc, 
                  Thickness[sw], 
                  ht[{tip, tip - hr diff + trans, tip - tr diff, 
                      tip - hr diff - trans, tip}]}]}]] /; 
        Length[from] == Length[to] == 2Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, eq, sw, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, eq, sw, hs, hr, ap, sf, vc, zvps} = 
            {ShaftQ, EdgesQ, ShaftWidth, HeadSize, HeadRatio, Aperture, 
                  ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts}
                   /. Options[Vector]; 
          If[from == to, 
            Return[Graphics3D[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]]; tr = (hr/2); 
          Graphics3D[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              If[eq, {}, EdgeForm[]], {SurfaceColor[vc], 
                With[{temp = Perpend[diff]}, 
                  (Polygon[Append[#1, tip]]&)/@
                    Partition[
                      (tip - hr diff + #1&)/@
                        ((ap hr Norm[diff] Base3D) . {temp, 
                              Normalize[temp\[Cross]diff]}), 2, 1]]}}]] /; 
        Length[from] == Length[to] == 3Arrow[a_, Tail -> b_, opts___] := Vector[b, a + b, opts]Arrow[a_, opts___] := Vector[Table[0, {Length[a]}], a, opts]\(ArrowHead[a_, b_, opts___] := 
      Vector[a - b, a, ShaftQ -> False, opts]; 

End[]; 

    \(EndPackage[]; \)\)

Graphics`Colors`GosiaGreen = RGBColor[0,  0.392187,  0];

Spherical Setup

\(Clear[polar]; 

    polar[{x_, y_, z_}] := {\@\(x\^2 + y\^2 + z\^2\), ArcTan[y\/x], 
        ArcCos[z\/\@\(x\^2 + y\^2 + z\^2\)]}; 
Clear[X, length]; 

    length[X_] := \@\(X . X\); 
\(rr = 3; \)\)R = 5; scale = 0.8; red = RGBColor[1, 0, 0]; blue = RGBColor[0, 0, 1]; color1 = RGBColor[0.8, 0.2, 0.8]; color2 = RGBColor[0.2, 0.8, 0.2]; black = RGBColor[0, 0, 0]; \(Clear[axes]; 

    axes := Graphics3D[{Line[{X, {1.5\ rr, 0, 0}}], 
          Line[{X, {0, 1.5\ rr, 0}}], Line[{X, {0, 0, 2\ rr}}]}]; 

    Clear[xyplane]; 

    xyplane := 
      Graphics3D[
        Polygon[{{\(-2\)\ rr, \(-2\)\ rr, 0}, {\(-2\)\ rr, 2\ rr, 0}, {2\ rr, 
              2\ rr, 0}, {2\ rr, \(-2\)\ rr, 0}}]]; 
\(X = {0, 0, 0}; \)\)origin = Graphics3D[{black, Point[X]}]; Z = {2, 3, 5}; \(Clear[point]; 

    point := Graphics3D[{red, PointSize[0.03], Point[scale\ Z]}]; 

    \(Z0 = {0, 0, length[0.8\ Z]}; \)\)\(Clear[zpoint]; 
zpoint = Graphics3D[{black, Point[Z0]}]; 

    \(XY = scale\ Z\ {1, 1, 0}; \)\)\(Clear[xypoint]; 
xypoint := Graphics3D[{black, Point[XY]}]; 

    \(X0 = {length[scale\ Z\ {1, 1, 0}], 0, 0}; \)\)xpoint = Graphics3D[{black, Point[X0]}]; Y0 = {0, length[scale Z {1, 1, 0}], 0}; ypoint = Graphics3D[{black, Point[Y0]}]; \(Clear[ray]; 
ray := Graphics3D[{blue, Line[{X, scale\ Z}]}]; 

    Clear[ray1]; 
ray1 := Graphics3D[{color1, Line[{scale\ Z, Z}]}]; 

    Clear[xyray]; 
xyray := Graphics3D[{red, Line[{X, Z\ {1, 1, 0}}]}]; 

    \(rays := {ray, xyray}; \)\)xyaux = 
      (length[0.8 Z] (0.8 Z {1, 1, 0}))/
        length[0.8 Z {1, 1, 0}]; \(Clear[zarc]; 

    zarc = Graphics3D[{blue, 
          Line[Table[
              \(Cos[t]\ \) {0, 0, length[0.8\ Z]} + Sin[t]\ xyaux, {t, 0, 
                \(polar[0.8\ Z]\)[[3
                  ]],  .1}]]}]; 
Clear[zarc1]; 

    zarc1 = Graphics3D[{color1, 
          Line[Table[
              \(Cos[t]\ \) {0, 0, length[0.8\ Z]} + Sin[t]\ xyaux, {t, 
                \(polar[0.8\ Z]\)[[3]], 
                1,  .1}]]}]; 
Clear[zarc2]; 

    zarc2 = Graphics3D[{color1, 
          Line[Table[
              \(Cos[t]\ \) {0, 0, length[0.8\ Z]} + Sin[t]\ xyaux, {t, 
                \(-0.8\), 0,  .1}]]}]; 
Clear[xyarc]; 

    xyarc = Graphics3D[{blue, 
          Line[Table[
              Cos[t]\ X0 + Sin[t]\ Y0, {t, 0, 
                \(polar[XY]\)[[2
                  ]],  .1}]]}]; 
Clear[xyarc1]; 

    xyarc1 = Graphics3D[{color1, 
          Line[Table[Cos[t]\ X0 + Sin[t]\ Y0, {t, \(- .5\), 0,  .1}]]}]; 

    Clear[xyarc2]; 

    xyarc2 = Graphics3D[{color1, 
          Line[Table[
              Cos[t]\ X0 + Sin[t]\ Y0, {t, 
                \(polar[XY]\)[[2]], 
                \(polar[XY]\)[[2]] + 
                  0.3,  .1}]]}]; 
Clear[stick]; 

    stick = Graphics3D[{red, Line[{scale\ Z, XY}]}]; 

    \(xaxislabel = Text["x", {0.363, 0.26}]; \)\)yaxislabel = Text["y", {0.73, 0.3}]; zaxislabel = Text["z", { .5, 0.67}]; stickplot = 
      Show[xyplane, axes, ray, point, Boxed -> False, 
        ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; rho = Text["r", {0.53, 0.45}]; rlabel = 
      Show[xyplane, axes, ray, point, Boxed -> False, 
        ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {rho, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; phi = Text["s", {0.55, 0.57}]; slabel = 
      Show[xyplane, zpoint, axes, ray, point, zarc, zarc1, zarc2, 
        Boxed -> False, ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {phi, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; theta = Text["t", { .5, 0.3}]; tlabel = 
      Show[xyplane, axes, xypoint, xpoint, ray, stick, point, xyarc, xyarc1, 
        xyarc2, Boxed -> False, ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {theta, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; all = 
      Show[xyplane, axes, ray, stick, point, zpoint, xpoint, xypoint, xyarc, 
        xyarc1, xyarc2, zarc, zarc1, zarc2, Boxed -> False, 
        ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {theta, phi, rho, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity];

Crisscross

\(Clear[x]; 

    crisscross = 
      Plot[{Cos[x], Sin[x]}, {x, π\/8, \(3\ π\)\/8}, 
        PlotStyle -> {{RGBColor[1, 0, 0], Thickness[0.02]}}, 
        Axes -> None, AspectRatio -> 1\/3, 
        DisplayFunction -> Identity]; \)

G.1)  Fingering a 3D vector field

G.1.a)

Here's a 3D vector field:

\(Clear[x, y, z, m, n, p, Field]; 

    Field[x_, y_, z_] = {\((y - z)\)\^2, \((z - x)\)\^2, \((x - y)\)\^2}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Stick the tail of the following unit vectors V at the indicated points {a, b, c}.  Push your finger onto V so that V spikes though the center of your finger and the tip of your finger is at {a, b, c}.
Use curlField[a, b, c] to help you report on whether the tip of your finger reveals a counterclockwise net swirl, a net clockwise swirl, or no swirl at all.
Illustrate your results with a plot.

G.1.a.i)

{a, b, c} = {1, 0, 3}; V = {-3, 2, 1}/(Sqrt[(3^2) + (2^2) + (1^2)]);

G.1.a.ii)

{a, b, c} = {1.13, -2.67, -1.58}; V = {2, 8, 1}/(Sqrt[(2^2) + (8^2) + (1^2)]);

G.1.a.iii)

{a, b, c} = {2.13, 1.38, 4.34}; V = {-6, 4.5, 1.5}/(Sqrt[(6^2) + (4.5^2) + (1.5^2)]);

G.1.a.iv)

For the vector field Field[x, y, z] as set above, there are many points at which your finger will feel no net clockwise or counterclockwise swirl no matter how you align your finger. Describe these points.

They all lie on a certain line. 
Your job is to say what this line is.

G.1.b)

Here is another three dimensional vector field:

\(Clear[x, y, z, m, n, p, Field]; 

    Field[x_, y_, z_] = {1.3\ \((y - z)\), 0.2\ \((z - x)\), 
        0.04\ \((x\^2 - y)\)}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Your job is to find the points at which this field rotates the very least.

At a point {x, y, z}, the axis of the greatest counterclockwise swirl is in the direction of the unit vector 
       Vbig=curlF[x, y, z]/(Sqrt[curlF[x, y, z] . curlF[x, y, z]]).
The strength of the counterclockwise swirl in this direction is
       curlF[x, y, z] . Vbig
       =curlF[x, y, z] . 
                curlF[x, y, z]/(Sqrt[curlF[x, y, z] . curlF[x, y, z]])
       
        = (Sqrt[curlF[x, y, z] . curlF[x, y, z]])
So the points at which the field rotates the very least are the points at which
       curlF[x, y, z] . curlF[x, y, z]
is as small as it can be.

G.1.c)

Here is a new 3D vector field:

\(Clear[x, y, z, m, n, p, Field]; 

    Field[x_, y_, z_] = {z\ x\^2, x\ \((y - 1)\)\^2, 3\ y\ z\^2}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Take any three dimensional unit vector 
       V = {a, b, 0} with a > 0 and b > 0,
and put the tail of V at any unspecified point {x, y, z} with 
       x ≠ 0 or z ≠ 0. 
Push your finger onto V so that V spikes though the center of your finger, and so the tip of your finger is at {x, y, z}.  How do you know in advance that the tip of your finger will feel a net counterclockwise swirl?

G.2)  Flow-along measurements and estimates

G.2.a)

Here are two 3D vector fields:

\(Clear[x, y, z, m1, n1, p1, m2, n2, p2, Field1, Field2]; 

    Field1[x_, y_, z_] = \(E\^\(-y\^2\)\ \) {x, y, z}; 
    
{m1[x_, y_, z_], n1[x_, y_, z_], p1[x_, y_, z_]} = Field1[x, y, z]\)

Field2[x_, y_, z_] = {y z, x z, x y}; {m2[x_, y_, z_], n2[x_, y_, z_], p2[x_, y_, z_]} = Field2[x, y, z]

Here's a closed curve C in three dimensions:

\(Clear[t, P]; 
    
{x[t_], y[t_], z[t_]} = {4\ Cos[t], 8\ Sin[t], 2\ Sin[2\ t] + 1}; 

    \(P[t_] = {x[t], y[t], z[t]}; \)\)Cplot = 
      ParametricPlot3D[Evaluate[P[t]], {t, 0, 2 π}, 
        ViewPoint -> CMView, Boxed -> False, 
        Axes -> Automatic, 
        AxesLabel -> {"x", "y", "z"}];

Measure the flow of Field1[x, y, z] along C, and then measure the flow of Field2[x, y, z] along C. 
Describe the direction of the net flow of each vector field along C.

G.2.b)

Take a 3D surface R with boundary curve C.  If you are given a vector field Field[x, y, z] with the extra property that curlField[x, y, z], with its tail at {x, y, z}, is tangent to the surface R at all points {x, y, z} on the surface R, then how does Stokes's formula tell you that the net flow of Field[x, y, z] along C is 0?

G.2.c.i)

Here's a surface shown with a selection of normal vectors:

\(Clear[x, y, z, s, t]; 
x[s_, t_] = 2\ s\ Cos[t]; 

    \(y[s_, t_] = 2\ s\ Sin[t]; \)\)z[s_, t_] = Cos[π s]; {{slow, shigh}, {tlow, thigh}} = {{0, 1}, {0, 2 π}}; surface = 
      ParametricPlot3D[
        Evaluate[{x[s, t], y[s, t], z[s, t]}], {s, slow, shigh}, {t, tlow, 
          thigh}, DisplayFunction -> Identity]; \(Clear[normal]; 

    normal[s_, t_] = 
      N[D[{x[s, t], y[s, t], z[s, t]}, s]
            \[Cross]D[{x[s, t], y[s, t], z[s, t]}, t]]; 
sjump = 0.2; 

    \(tjump = π\/4; \)\)scalefactor = 0.2; \(normals = 
      Table[Arrow[normal[s, t], Tail -> {x[s, t], y[s, t], z[s, t]}, 
          ScaleFactor -> scalefactor], {s, slow + sjump, shigh, sjump}, {
          t, tlow + tjump, thigh, tjump}]; 

    \(Show[surface, normals, ViewPoint -> CMView, Boxed -> False, 
      AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)\)

You come across a 3D vector field Field[x, y, z] and happen to realize that
       curlField[x[s, t], y[s, t], z[s, t]] . normal[s, t] > 0
no matter what s and t you go with.  This means that as you look down from the top of each normal, you see Field[x, y, z] swirling around the tail of each normal vector in the counterclockwise way.  Give a common-sense explanation of why this guarantees that the net flow of Field[x, y, z] along the boundary curve of this surface is in the direction indicated by the following plot:

\(Clear[P]; 
P[t_] = {x[shigh, t], y[shigh, t], z[shigh, t]}; 

    \(Cplot = 
      ParametricPlot3D[Evaluate[P[t]], {t, tlow, thigh}, 
        DisplayFunction -> Identity]; \)\)scalefactor = 1; tangents=Table[Arrow[scalefactor P'[t],Tail -> P[t],VectorColor -> Red],{t, 0, 2 π, (π/3)}];
Show[surface, Cplot, tangents, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView, 
        AxesLabel -> {"x", "y", "z"}, 
        DisplayFunction -> $DisplayFunction];

Back up your common-sense explanation with an explanation based on Stokes's formula.

G.2.c.ii)

Here's a surface shown with a selection of normal vectors:

\(Clear[x, y, z, s, t, normal]; 
x[s_, t_] = 2\ s\ Cos[t]; 

    \(y[s_, t_] = 2\ s\ Sin[t]; \)\)z[s_, t_] = 2 - x[s, t]; {{slow, shigh}, {tlow, thigh}} = {{0, 1}, {0, 2 π}}; surface = 
      ParametricPlot3D[
        Evaluate[{x[s, t], y[s, t], z[s, t]}], {s, slow, shigh}, {t, tlow, 
          thigh}, PlotPoints -> {2, Automatic}, 
        DisplayFunction -> Identity]; \(normal[s_, t_] = 
      N[D[{x[s, t], y[s, t], z[s, t]}, s]
            \[Cross]D[{x[s, t], y[s, t], z[s, t]}, t]]; 
sjump = 0.3; 

    \(tjump = π\/2; \)\)scalefactor = 0.5; \(normals = 
      Table[Arrow[normal[s, t], Tail -> {x[s, t], y[s, t], z[s, t]}, 
          ScaleFactor -> scalefactor], {s, slow + 0.1, shigh, sjump}, {
          t, tlow + tjump, thigh, tjump}]; 


    Show[surface, normals, ViewPoint -> CMView, Boxed -> False, 
      AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)

Here's a 3D vector field:

\(Clear[Field, m, n, p, x, y, z, curlField]; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = {z, x\^3 + 2\ x + y, 
        z\^2 + x}; 

    Field[x_, y_, z_] = {m[x, y, z], n[x, y, z], p[x, y, z]}\)

curlField[x_, y_, z_] = {D[p[x, y, z], y] - D[n[x, y, z], z], 
        D[m[x, y, z], z] - D[p[x, y, z], x], 
        D[n[x, y, z], x] - D[m[x, y, z], y]}

Now look at this:

curlField[x[s, t], y[s, t], z[s, t]] . normal[s, t]

Remembering that 0 = slow ≤ s ≤ 1 = shigh, use the information immediately above to say which direction is the direction of the net flow of the given vector field on the boundary curve of the surface.

G.3)  Work

G.3.a)

Here's a 3D force field:

\(Clear[x, y, z, m, n, p, Field]; 

    Field[x_, y_, z_] = {z\ \((x - 1)\)\^2, x\ \((y - 1)\)\^2, 3\ y\ z\^2}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Here's a space curve:

\(Clear[t, P]; 
    
{x[t_], y[t_], z[t_]} = {5\ Sin[t], 3\ Cos[t], 2\ Cos[t]\^2}; 

    \(P[t_] = {x[t], y[t], z[t]}; \)\)Cplot = 
      ParametricPlot3D[Evaluate[P[t]], {t, 0, 2 π}, 
        DisplayFunction -> Identity]; h = 2; \(coordinateaxes = {Graphics3D[Line[{{\(-h\), 0, 0}, {h, 0, 0}}]], 
        Graphics3D[Line[{{0, \(-h\), 0}, {0, h, 0}}]], 
        Graphics3D[Line[{{0, 0, \(-h\)}, {0, 0, h}}]]}; 


    Show[Cplot, coordinateaxes, ViewPoint -> CMView, 
      Boxed -> False, Axes -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)

An object starts at

P[0]

and makes one trip around the curve, ending the trip at:

P[2 π]

Which way should you send the object around C to make the force field do most of the work? Or does it matter?

G.3.b)

Here's another 3D force field:

\(Clear[x, y, z, m, n, p, Field]; 

    Field[x_, y_, z_] = 
      \(Sin[\((x - 2)\)\^2 + y\^2 + \((z - 1)\)\^2]\ \) {x - 2, y, z - 1}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Here's another space curve:

\(Clear[t, P]; 
    
{x[t_], y[t_], z[t_]} = {3\ Cos[t], 5\ Sin[t], Sin[t]\^2}; 

    \(P[t_] = {x[t], y[t], z[t]}; \)\)Cplot = 
      ParametricPlot3D[Evaluate[P[t]], {t, 0, 2 π}, 
        DisplayFunction -> Identity]; h = 2; \(coordinateaxes = {Graphics3D[Line[{{\(-h\), 0, 0}, {h, 0, 0}}]], 
        Graphics3D[Line[{{0, \(-h\), 0}, {0, h, 0}}]], 
        Graphics3D[Line[{{0, 0, \(-h\)}, {0, 0, h}}]]}; 


    Show[Cplot, coordinateaxes, ViewPoint -> CMView, 
      Boxed -> False, Axes -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)

An object starts at:

P[0]

And makes one trip around the curve, ending the trip at:

P[2 π]

Which way should you send the object around C to make the force field do most of the work? Or does it matter?

G.3.c)

Here is a cleared 3D gradient force field:

\(Clear[x, y, z, m, n, p, gradfF, f]; 

    gradf[x_, y_, z_] = {D[f[x, y, z], x], D[f[x, y, z], y], 
        D[f[x, y, z], z]}; 
Field[x_, y_, z_] = gradf[x, y, z]; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Here is a space curve:

\(Clear[t, P]; 
    
{x[t_], y[t_], z[t_]} = {3\ Cos[t], 5\ Sin[t], Sin[2\ t]\^2}; 

    \(P[t_] = {x[t], y[t], z[t]}; \)\)Cplot = 
      ParametricPlot3D[Evaluate[P[t]], {t, 0, 2 π}, 
        DisplayFunction -> Identity]; h = 2; \(coordinateaxes = {Graphics3D[Line[{{\(-h\), 0, 0}, {h, 0, 0}}]], 
        Graphics3D[Line[{{0, \(-h\), 0}, {0, h, 0}}]], 
        Graphics3D[Line[{{0, 0, \(-h\)}, {0, 0, h}}]]}; 


    Show[Cplot, coordinateaxes, ViewPoint -> CMView, 
      Boxed -> False, Axes -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)

An object starts at:

P[0]

And makes one trip around the curve, ending the trip at:

P[2 π]

Does it matter which way you send the object around C to make the force field do most of the work? Why?

G.4)  The gradient test in 3D

Here are two 3D vector fields.  One of these vector fields passes the gradient test and the other does not.

\(Clear[x, y, z, m1, n1, p1, m2, n2, p2, Field1, Field2]; 

    Field1[x_, y_, z_] = {y + z, x - 2\ z + 3, x - 2\ y - 4\ z + 3}; 
    
{m1[x_, y_, z_], n1[x_, y_, z_], p1[x_, y_, z_]} = Field1[x, y, z]\)

Field2[x_, y_, z_] = {y + 2 z, x - 2 z + 3, x - 2 y + 3 z + 3}; 
    {m2[x_, y_, z_], n2[x_, y_, z_], p2[x_, y_, z_]} = Field2[x, y, z]

G.4.a.i)

Which of these two vector fields passes the three-dimensional gradient test?

G.4.a.ii)

Come up with function f[x, y, z] whose gradient field is the same as the 3D vector field in part i) that passed the gradient test.

G.4.b) Voltage.

Here is the 3D electric field resulting from a single point charge of strength q placed at the point {a, b, c}

\(Clear[Field, m, n, p, x, y, z, q, a, b, c]; 
point = {a, b, c}; 

    \(Field[x_, y_, z_] = 
      \(q\ \(({x, y, z} - point)\)\)\/\((
            \((x - a)\)\^2 + \((y - b)\)\^2 + \((z - c)\)\^2)\)\^\(3/2\); 
    \)\){m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]

Confirm that Field[x, y, z] passes the gradient test, and try to come up a function f[x, y, z] with 
       gradf[x, y, z] = Field[x, y, z].

The function f[x, y, z] produces a measurement that is proportional to the voltage at {x, y, z} resulting from placing a point charge of strength q at the point {a, b, c} in the case that {a, b, c} ≠ {0, 0, 0}.

Make your fixed point = {0, 0, 0}.

G.5)  Path independence and path dependence

G.5.a)

The curve (Subscript[C, 1])  is parameterized to run on a straight line starting at {0, 0, 0} and ending at {1, 2, 1} as the parameter t runs from 0 to 1:

\(Clear[x1, y1, z1, t]; 
    
{x1[t_], y1[t_], z1[t_]} = {0, 0, 0} + t\ {1, 2, 1}\)

startC1 = {x1[0], y1[0], z1[0]}

endC1 = {x1[1], y1[1], z1[1]}

The curve (Subscript[C, 2])  is also parameterized to run on a parabolic arc starting at {0, 0, 0} and ending at {1, 2, 1} as the parameter t runs from 0 to 1:

\(Clear[x2, y2, z2, t]; 
    
{x2[t_], y2[t_], z2[t_]} = {6\ t\^2 - 5\ t, 2\ t\^2, t\^2}\)

startC2 = {x2[0], y2[0], z2[0]}

endC2 = {x2[1], y2[1], z2[1]}

The curve (Subscript[C, 3])  is also parameterized to run on another curve starting at {0, 0, 0} and ending at {1, 2, 1} as the parameter t runs from 0 to 1:

\(Clear[x3, y3, z3, t]; 
    
{x3[t_], y3[t_], z3[t_]} = {t, 2\ Sin[\(π\ t\)\/2]\^2, t\^2}\)

startC3 = {x3[0], y3[0], z3[0]}

endC3 = {x3[1], y3[1], z3[1]}

Here is how they look:

\(Clear[P1, P2, P3]; 
P1[t_] = {x1[t], y1[t], z1[t]}; 

    \(C1plot = 
      ParametricPlot3D[Evaluate[P1[t]], {t, 0, 1}, 
        DisplayFunction -> Identity]; \)\)P2[t_] = {x2[t], y2[t], z2[t]}; C2plot = 
      ParametricPlot3D[Evaluate[P2[t]], {t, 0, 1}, 
        DisplayFunction -> Identity]; P3[t_] = {x3[t], y3[t], z3[t]}; C3plot = 
      ParametricPlot3D[Evaluate[P3[t]], {t, 0, 1}, 
        DisplayFunction -> Identity]; \(points = {Graphics3D[{Red, PointSize[0.02], Point[P1[0]]}], 
        Graphics3D[{Red, PointSize[0.02], Point[P1[1]]}]}; 


    Show[C1plot, C2plot, C3plot, points, ViewPoint -> CMView, 
      Boxed -> False, AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)

All three run from {0, 0, 0} to {1, 2, 1}.
Here are calculations of the three path integrals
       (∫_( (Subscript[C, 1]))^) 
          (6  x -  4  y +  3  z) dx -  
        (4  x +  4  z) dy +  
        (3  x -  4  y) dz
       (∫_( (Subscript[C, 2]))^) 
          (6  x -  4  y +  3  z) dx -  
        (4  x +  4  z) dy +  
        (3  x -  4  y) dz
       (∫_( (Subscript[C, 3]))^) 
          (6  x -  4  y +  3  z) dx -  
        (4  x +  4  z) dy +  
        (3  x -  4  y) dz
in order:

\(Clear[m, n, p, x, y, z]; 
m[x_, y_, z_] = 6\ x - 4\ y + 3\ z; 

    \(n[x_, y_, z_] = \(-\((4\ x + 4\ z)\)\); \)\)p[x_, y_, z_] = 3 x - 4 y; Chop[NIntegrate[m[x1[t], y1[t], z1[t]] x1'[t]+n[x1[t], y1[t], z1[t]] y1'[t]+p[x1[t], y1[t], z1[t]] z1'[t],{t, 0, 1}]]

Chop[NIntegrate[m[x2[t], y2[t], z2[t]] x2'[t]+n[x2[t], y2[t], z2[t]] y2'[t]+p[x2[t], y2[t], z2[t]] z2'[t],{t, 0, 1}]]

Chop[NIntegrate[m[x3[t], y3[t], z3[t]] x3'[t]+n[x3[t], y3[t], z3[t]] y3'[t]+p[x3[t], y3[t], z3[t]] z3'[t],{t, 0, 1}]]

Keep the same curves, but tweak the integrals slightly by putting in a little minus sign on the middle term.
Here are the resulting calculations: 
       (∫_( (Subscript[C, 1]))^) 
          (6  x -  4  y +  3  z) dx +  
        (4  x +  4  z) dy +  
        (3  x -  4  y) dz
       (∫_( (Subscript[C, 2]))^) 
          (6  x -  4  y +  3  z) dx +  
        (4  x +  4  z) dy +  
        (3  x -  4  y) dz
       (∫_( (Subscript[C, 3]))^) 
          (6  x -  4  y +  3  z) dx +  
        (4  x +  4  z) dy +  
        (3  x -  4  y) dz
in order:

\(Clear[mm, nn, pp, x, y, z]; 
mm[x_, y_, z_] = 6\ x - 4\ y + 3\ z; 

    \(nn[x_, y_, z_] = \(+\((4\ x + 4\ z)\)\); \)\)pp[x_, y_, z_] = 3 x - 4 y; NIntegrate[mm[x1[t], y1[t], z1[t]] x1'[t]+nn[x1[t], y1[t], z1[t]] y1'[t]+pp[x1[t], y1[t], z1[t]] z1'[t],{t, 0, 1}]

NIntegrate[mm[x2[t], y2[t], z2[t]] x2'[t]+nn[x2[t], y2[t], z2[t]] y2'[t]+pp[x2[t], y2[t], z2[t]] z2'[t],{t, 0, 1}]

NIntegrate[mm[x3[t], y3[t], z3[t]] x3'[t]+nn[x3[t], y3[t], z3[t]] y3'[t]+pp[x3[t], y3[t], z3[t]] z3'[t],{t, 0, 1}]

Explain how you could have predicted in advance that the first group of three integrals would have calculated out to the same value.
Explain why it would have been quite a surprise if the second group of three path integrals had all calculated out to be equal.

G.5.b)

(Subscript[C, 1]) is a line segment parameterized to start at {1, -3, 5} and to end at {-8, 7, 4}.
C is any other curve parameterized to start at {1, -3, 5} and to end at {-8, 7, 4}.
Explain how you know that
       (∫_( C)^) 
          (-18 (x^2) +  24  y +  2  x z) dx  +  
        (24  x  -  4  z) dy +  
        ((x^2) -  4  y) dz
        = 
        (∫_( (Subscript[C, 1]))^) 
            (-18 (x^2) +  24  y +  2  x z) dx  +  
          (24  x  -  4  z) dy +  
          ((x^2) -  4  y) dz.
Then use this fact to help calculate
       (∫_( C)^) 
          (-18 (x^2) +  24  y +  2  x z) dx  +  
        (24  x  -  4  z) dy +  
        ((x^2) -  4  y) dz
for ANY curve C parameterized to start at {1, -3, 5} and end at {-8, 7, 4}.

G.5.c.i)

You are given a 3D vector field 
       Field[x, y, z] = {m[x, y, z], n[x, y, z], p[x, y, z]} 
and a closed curve C ( like a deformed circle).  You are also given the additional information that:
-> Field[x, y, z] has only a couple of singularities and none of them lie on C, and
-> curlField[x, y, z] = {0, 0, 0} at all points {x, y, z} that are not singularities.
Parameterize C, and call the direction of your parameterization counterclockwise.  Use Stokes's formula to explain why you are guaranteed that the path integral 
       (∮_( C)^) m[x, y, z] dx + 
           n[x, y, z] dy +  p[x, y, z] dz = 0
        .

Tip:

Think of a surface R whose boundary curve is C with the extra property that none of the singularities is on the surface R.

G.5.c.ii)

Agree or disagree with each of the following statements:
-> In 2D, if you go with a vector field 
       Field[x, y] = {m[x, y], n[x, y]} 
with the property that rotField[x, y] = 0 at all {x, y}'s that are not singularities, then it is possible that
       (∮_( C)^) m[x, y] dx +  
          n[x, y] dy ≠ 0
for a closed curve C that does not pass through any of the singularities.
-> In 3D, if you go with a vector field 
       Field[x, y, z] = {m[x, y, z], n[x, y, z], p[x, y, z]} 
with the property that curlField[x, y, z] = {0, 0, 0} at all {x, y, z} that are not singularities, then it is possible that
       (∮_( C)^) m[x, y, z] dx + 
           n[x, y, z] dy +  p[x, y, z] dz 
        ≠ 0
for a closed curve C that does not pass through any of the singularities.

G.6)  Parallel flow and irrotational flow

G.6.a.i)

Here is a 3D vector field consisting of equal parallel vectors:

\(Clear[Field1, m1, n1, p1, x, y, z]; 

    Field1[x_, y_, z_] = {\(-1\), 1, 0}; 

    \({m1[x_, y_, z_], n1[x_, y_, z_], p1[x_, y_, z_]} = Field1[x, y, z]; 
    \)\)\(Field1plot = 
      Table[Arrow[Field1[x, y, z], Tail -> {x, y, z}, 
          VectorColor -> Blue], {x, \(-2\), 2, 2}, {y, \(-2\), 2, 2}, {
          z, \(-1\), 1, 1}]; 


    Show[Field1plot, ViewPoint -> CMView, Axes -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, PlotRange -> All]; 
    \)

A calming, steady flow. 
Here's another 3D vector field flowing in the same direction.

\(Clear[Field2, m2, n2, p2]; 

    Field2[x_, y_, z_] = 0.3\ \((\@\(x\^2 + y\^2\) + 1)\)\ {\(-1\), 1, 0}; 

    \({m2[x_, y_, z_], n2[x_, y_, z_], p2[x_, y_, z_]} = Field2[x, y, z]; 
    \)\)\(Field2plot = 
      Table[Arrow[Field2[x, y, z], Tail -> {x, y, z}, 
          VectorColor -> Blue], {x, \(-2\), 2, 2}, {y, \(-2\), 2, 2}, {
          z, \(-1\), 1, 1}]; 


    Show[Field2plot, ViewPoint -> CMView, Axes -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, PlotRange -> All]; 
    \)

Looks rather calm.
The farther {x, y, 0} is from {0, 0, 0}, the faster the flow of Field2[x, y, z] at {x, y, z}.  
Both fields represent parallel flows. 
Field1[x, y, z] represents flow at a steady speed, but the flow represented by Field2[x, y, z] is of variable speed.  
The question here is, "Are both flows irrotational?"

A flow described by a vector field Field[x, y, z] is irrotational if curlField[x, y, z] = {0, 0, 0}.

G.6.a.ii)

Continue with the same vector fields Field1[x, y, z] and Field2[x, y, z] as in part i).
Is it possible to make a paddle wheel rotate by sticking the paddle wheel into the flow described Field1[x, y, z]? If so, then how would you align the paddle wheel to get the most action?
Is it possible to make a paddle wheel rotate by sticking the paddle wheel into the flow described Field2[x, y, z]? If so, then how would you align the paddle wheel to get the most action?

G.6.a.iii)

Continue with the same vector fields Field1[x, y, z] and Field2[x, y, z] as in part i).
Does either field have any sources or sinks?
Why is it sort of natural that Field2[x, y, z] should have lots of sources and lots of sinks?

G.6.b.i)

Here is a general 3D vector field flowing in the direction of {1, 1, 0} with speed of the flow at {x, y, z} determined by the x and y entries in {x, y, z}:

\(Clear[Field, m, n, p, x, y, z, s]; 

    Field[x_, y_, z_] = \(s[x, y]\ \) {1, 1, 0}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

How must D[s[x, y], x] and D[s[x, y], y] be related to ensure that the flow represented by this vector field is irrotational?

G.6.b.ii)

Here again is a general 3D vector field flowing in the direction of {1, 1, 0} with speed of the flow at {x, y, z} determined by the x and y entries in {x, y, z}:

\(Clear[Field, m, n, p, x, y, z, s]; 

    Field[x_, y_, z_] = \(s[x, y]\ \) {1, 1, 0}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

How must D[s[x, y], x] and D[s[x, y], y] be related to ensure that the flow represented by this vector field has no sources or sinks?

G.6.b.iii)

Continue with the same set-up as in parts b.i) and b.ii).

\(Clear[Field, m, n, p, x, y, z, s]; 

    Field[x_, y_, z_] = \(s[x, y]\ \) {1, 1, 0}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

Look at:

\(Clear[curlField]; 

    curlField[x_, y_, z_] = {D[p[x, y, z], y] - D[n[x, y, z], z], 
        D[m[x, y, z], z] - D[p[x, y, z], x], 
        D[n[x, y, z], x] - D[m[x, y, z], y]}\)

And look at:

\(Clear[divField]; 

    divField[x_, y_, z_] = 
      D[m[x, y, z], x] + D[n[x, y, z], y] + D[p[x, y, z], z]\)

Use what you see to say why it is impossible to build a non-constant function s[x, y] so that the parallel flow represented by 
       Field[x, y, z] = s[x, y] {1, 1, 0} 
is both irrotational and is without sources or sinks.

s[x, y] is constant if 
       D[s[x, y], x] = (s^((1, 0)))[x, y] = 0 
and
       D[s[x, y], y] = (s^((0, 1)))[x, y] = 0
no matter what x and y are.

G.7)  Clockwise or counterclockwise?

G.7.a)

Here's a surface R:

\(Clear[x, y, z, s, t]; 
x[s_, t_] = 2\ s\ Sin[t]; 

    \(y[s_, t_] = 4\ s\ Cos[t]; \)\)z[s_, t_] = y[s, t] x[s, t]; {{slow, shigh}, {tlow, thigh}} = {{0, 1}, {0, 2 π}}; surface = 
      ParametricPlot3D[
        Evaluate[{x[s, t], y[s, t], z[s, t]}], {s, slow, shigh}, {t, tlow, 
          thigh}, PlotPoints -> {Automatic, 24}, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView, 
        AxesLabel -> {"x", "y", "z"}];

A parameterization of the boundary curve C is:

\(Clear[P]; 
P[t_] = {x[shigh, t], y[shigh, t], z[shigh, t]}\)

Here are the surface R, its boundary curve C, and a few tangent vectors reflecting the direction of this parameterization of C:

Cplot = 
      ParametricPlot3D[Evaluate[P[t]], {t, tlow, thigh}, 
        PlotPoints -> 24, DisplayFunction -> Identity]; scalefactor = 0.5; tangents=Table[Arrow[P'[t],Tail -> P[t],VectorColor -> Red,ScaleFactor -> scalefactor],{t, 0, 2 π, (π/3)}];

Show[surface, Cplot, tangents, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView, 
        AxesLabel -> {"x", "y", "z"}];

If you want to call this parameterization counterclockwise in accordance with the agreement made with regard to Stokes's formula, then which side of the surface must you designate as the top side?

G.7.b)

Here is a surface together with some of its normal vectors:

\(Clear[x, y, z, s, t, normal]; 
x[s_, t_] = 5\ s\ Sin[t]; 

    \(y[s_, t_] = 4\ s\ Cos[t]; \)\)z[s_, t_] = 3 (E^(s Sin[t])); {{slow, shigh}, {tlow, thigh}} = {{0, 1}, {0, 2 π}}; surface = 
      ParametricPlot3D[
        Evaluate[{x[s, t], y[s, t], z[s, t]}], {s, slow, shigh}, {t, tlow, 
          thigh}, DisplayFunction -> Identity]; \(normal[s_, t_] = 
      TrigExpand[
        D[{x[s, t], y[s, t], z[s, t]}, s]
            \[Cross]D[{x[s, t], y[s, t], z[s, t]}, t]]; 
scalefactor = 0.2; 
    
normals = 
      Table[Arrow[normal[s, t], Tail -> {x[s, t], y[s, t], z[s, t]}, 
          ScaleFactor -> scalefactor], {s, slow + 0.2, shigh - 0.2, 
          0.3}, {t, tlow, thigh, π\/2}]; 

    \(setup = 
      Show[surface, normals, ViewPoint -> CMView, Boxed -> False, 
        AxesLabel -> {"x", "y", "z"}, 
        DisplayFunction -> $DisplayFunction]; \)\)

Here is a parameterization of the boundary curve of this surface:

\(Clear[P]; 
P[t_] = {x[shigh, t], y[shigh, t], z[shigh, t]}\)

If you decree that the normals plotted above are top normals, then are you forced to say that the parameterization P[t] above is counterclockwise, or are you forced to say that it is clockwise?

G.8)  The symbols △(nabla) and ∇ (del)

G.8.a) ∇×Field[x, y, z] = curlField[x, y, z].

Most reasonable folks agree that calculating the curl of a 3D vector field by hand is a loathsome chore, but calculating it by machine is not much trouble:

\(Clear[Field, m, n, p, x, y, z, curlField]; 

    Field[x_, y_, z_] = {m[x, y, z], n[x, y, z], p[x, y, z]}; 

    curlField[x_, y_, z_] = {D[p[x, y, z], y] - D[n[x, y, z], z], 
        D[m[x, y, z], z] - D[p[x, y, z], x], 
        D[n[x, y, z], x] - D[m[x, y, z], y]}\)

Nevertheless if your back is pressed to the wall, you can do this calculation by hand.  Here's how to remember how to do it:
Letting Dx mean differentiation with repect to x,
letting Dy mean differentiation with repect to y, and 
letting Dz mean differentiation with repect to z, form the matrix:

\(Clear[Dx, Dy, Dz]; 

    MatrixForm[{{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {Dx, Dy, Dz}, {m[x, y, z], 
          n[x, y, z], p[x, y, z]}}]\)

For 
       Field[x, y, z] = {m[x, y, z], n[x, y, z], p[x, y, z]}, 
you can calculate curlField[x, y, z] by hand by taking the determinant of this matrix by expanding across the top row. 
This means that curlField[x, y, z] is given by
       {1, 0, 0} (Dy (p[x, y, z]) -  Dz (n[x, y, z])) - 
         {0, 1, 0} 
          ((Dx (p[x, y, z]) -  Dz (m[x, y, z])) + 
               {0, 0, 1} 
                (Dx (n[x, y, z]) -  Dy (m[x, y, z]))

Check:

\(Clear[handcurlField]; 

    handcurlField[x_, y_, 
        z_] = {1, 0, 0}\ 
          \((D[p[x, y, z], y] - D[n[x, y, z], z])\) - {0, 1, 0}\ 
          \((D[p[x, y, z], x] - D[m[x, y, z], z])\) + {0, 0, 1}\ 
          \((D[n[x, y, z], x] - D[m[x, y, z], y])\); 

    handcurlField[x, y, z] == curlField[x, y, z]\)

Yes ma'am.
Another way to do the hand calculation is to put
       ∇ = {Dx, Dy, Dz}:
(Most folks call the upside down triangle ∇ by the name of "del.")

del = {Dx, Dy, Dz};

And calculating curlField[x, y, z] by taking the cross product 
       ∇×Field[x, y, z]:

del\[Cross]Field[x, y, z]

Still interpreting Dx, Dy, and Dz as above, this agrees with:

curlField[x, y, z]

Give a hand calculation of 
       curlField[x, y, z] = ∇×Field[x, y, z] 
for
       Field[x, y, z] = {x -  y, y -  2  z, z -  3  x}.
Use the machine to check yourself.

G.8.a.ii)  ∇ . Field[x, y, z] = divField[x, y, z]

Look at:

\(Clear[Field, m, n, p, x, y, z]; 

    Field[x_, y_, z_] = {m[x, y, z], n[x, y, z], p[x, y, z]}\)

del = {Dx, Dy, Dz}

Here is ∇ . Field[x, y, z]:

del . Field[x, y, z]

Why do a lot of folks say
       divField[x, y, z] = ∇ . Field[x, y, z]?

G.8.a.iii)         △f[x, y, z]=∇ . ∇f[x, y, z]=(∂^2)f[x, y, z]/∂(x^2)+ (∂^2)f[x, y, z]/∂(y^2)+ (∂^2)f[x, y, z]/∂(z^2)

Now you know the neat formulas
       divField[x, y, z] = ∇ . Field[x, y, z]
and
       curlField[x, y, z] = ∇×Field[x, y, z]
for hand calculation of the divergence and the curl.
Here's another formula you sometimes see:
For a function f[x, y, z], put 
       △f[x, y, z]=(∂^2)f[x, y, z]/∂(x^2)+((  (∂^2)f[x, y, z])/∂)(y^2)+ (∂^2)f[x, y, z]/∂(z^2).
(Most folks call the triangle △ by the name of "nabla" and they call △f[x, y, z] the "Laplacian" of f[x, y, z].)
What do these same folks mean when they write
       △f[x, y, z] = ∇ . ∇f[x, y, z]?
And what do these same folks mean when they write
       gradf[x, y, z] = ∇f[x, y, z]?

Look at:

\(Clear[x, y, z, f, Dx, Dy, Dz]; 
del = {Dx, Dy, Dz}\)del . (del f[x, y, z])

del f[x, y, z]

G.8.b.i)

When you start with a given 3D vector field Field[x, y, z], then
       curlField[x, y, z] = ∇×Field[x, y, z] 
is a new 3D vector field.  Try it out:

\(Clear[Field, m, n, p, x, y, z]; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = {x\^2 + 2\ y\^2, 
        2\ y\^2 - z\^2, 3\ z\^2 - x\^2}; 

    Field[x_, y_, z_] = {m[x, y, z], n[x, y, z], p[x, y, z]}\)

Here comes the new 3D vector field:

\(Clear[curlField, newm, newn, newp]; 

    curlField[x_, y_, z_] = {D[p[x, y, z], y] - D[n[x, y, z], z], 
        D[m[x, y, z], z] - D[p[x, y, z], x], 
        D[n[x, y, z], x] - D[m[x, y, z], y]}; 
    
{newm[x_, y_, z_], newn[x_, y_, z_], newp[x_, y_, z_]} = 
      curlField[x, y, z]\)

Does this new vector field have any sources or sinks?

G.8.b.ii)

Try it again with a new vector field:

\(Clear[Field, m, n, p, x, y, z]; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = {Sin[x]\ Cos[3\ y], 
        Cos[y]\ Sin[3\ z], Sin[y]\ Cos[3\ z]}; 

    Field[x_, y_, z_] = {m[x, y, z], n[x, y, z], p[x, y, z]}\)

Here comes the new 3D vector field:

\(Clear[curlField, newm, newn, newp]; 

    curlField[x_, y_, z_] = {D[p[x, y, z], y] - D[n[x, y, z], z], 
        D[m[x, y, z], z] - D[p[x, y, z], x], 
        D[n[x, y, z], x] - D[m[x, y, z], y]}; 
    
{newm[x_, y_, z_], newn[x_, y_, z_], newp[x_, y_, z_]} = 
      curlField[x, y, z]\)

Does this new vector field have any sources or sinks?

G.8.b.iii)

Try it again starting with a cleared vector field:

\(Clear[Field, m, n, p, x, y, z]; 

    Field[x_, y_, z_] = {m[x, y, z], n[x, y, z], p[x, y, z]}\)

Here comes the new 3D vector field:

\(Clear[curlField, newm, newn, newp]; 

    curlField[x_, y_, z_] = {D[p[x, y, z], y] - D[n[x, y, z], z], 
        D[m[x, y, z], z] - D[p[x, y, z], x], 
        D[n[x, y, z], x] - D[m[x, y, z], y]}; 
    
{newm[x_, y_, z_], newn[x_, y_, z_], newp[x_, y_, z_]} = 
      curlField[x, y, z]\)

Does this new vector field have any sources or sinks other than possibly at singularities?

G.8.b.iv)

Lots of folks like to write
       divcurlField[x, y, z] = 
        ∇ . (∇×Field[x, y, z]) = 0
for all {x, y, z}'s other than singularities.
Why do they like to do this?

If you think of ∇ as a vector, then you can take a lot of poetic license and say that ∇ . (∇×Field[x, y, z]) = 0 because you can say ∇ is perpendicular to ∇×Field[x, y, z].

G.8.b.v)

Does anything worth writing up happen when you start with a 3D vector field Field[x, y, z] and calculate the curl of curlField[x, y, z] which is given by
       curlcurlField[x, y, z] = 
        ∇×(∇×Field[x, y, z])?

G.9)  Windpower

G.9.a)

An electrical generator is driven by the wind.  When you put the unit into the field, and the wind swirls in the clockwise way along the front of the unit, the generator charges a battery.  If the wind swirls in the clockwise way, the generator discharges the battery.
You are looking at a wind flow given by the vector field:

\(Clear[Field, x, y, z, m, n, p]; 

    Field[x_, y_, z_] = {2\ x\^2 - 3\ y\^2, 4\ y - 6\ z, z - 2\ y}; 
    
{m[x_, y_, z_], n[x_, y_, z_], p[x_, y_, z_]} = Field[x, y, z]\)

If you stick the generator into this flow at the point {1, 1, 2}, then how should you align the unit (front to back) to make the generator charge the battery as much as possible?

G.10) How 2D rotField[x, y] is related to 3D curlField[x, y, z]

G.10.a)

Look at this cleared 2D vector field:

\(Clear[m, n, x, y, Field, rotField]; 

    Field[x_, y_] = {m[x, y], n[x, y]}\)

Here is rotField[x, y]:

rotField[x_, y_] = D[n[x, y], x] - D[m[x, y], y]

Now make this 2D vector field into a 3D field as follows:

\(Clear[Field3D, z]; 
Field3D = Append[Field[x, y], 0]\)

Calculate curlField3D[x, y, z], and say how it is related to rotField[x, y].