VC.06 Sources, Sinks, Swirls and Singularities
 LITERACY

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

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

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."; 

    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]; \)

L.1)

Go with
       Field[x, y] = {(e^x) Sin[y], (e^x) Cos[y]}
and calculate divField[x, y].
What does your result tell you about the net flow of Field[x, y] 
across the ellipse ((((x/3)))^2)+((((y/7)))^2)=1?

L.2)

Go with
       Field[x, y] = {-(e^x) Cos[y], (e^x) Sin[y]} 
and calculate rotField[x, y].
What does your result tell you about the net flow of Field[x, y] 
along the circle (((x -  1))^2) +  (((y -  6))^2) = 49?

L.3)

Given a point {x, y}, how does the sign of x tell you whether the given point {x, y} is a source or is a sink of the vector field
       Field[x, y] = {(x^2) + Sin[y], (e^x)} ?

L.4)

Is the flow of the vector field
     Field[x, y] = {(x^4) -  6  (x^2) (y^2) +  5  (y^4), 
          -4 (x^3) y +  4  x (y^3)}
suitable for modelling the flow of an incompressible fluid such as water?
Why or why not?

L.5)

Here's the rectang1e R with corners at 
       {-2, 0}, {3, 0}, {3, π} and {-2, π}:

Rplot = 
      Show[Graphics[{Thickness[0.01], 
            Line[{{-2, 0}, {3, 0}, {3, π}, {-2, π}, {-2, 
                  0}}]}], Axes -> True, 
        AxesLabel -> {"x", "y"}];

Use a 2D integral to measure the net flow of the vector field 
       Field[x, y] = {x Cos[y], (e^(-(x^2)/2)) +  (y^2)} 
across the boundary curve C of this rectangle.
Say why you are happy to make this measurement by calculating your 2D integral instead of making this measurement by calculating the path integral
       (∮_( C)) 
          -((e^(-(x^2)/2)) +  (y^2)) dx  +  
        x Cos[y] dy

L.6)

Take a look at divField[x, y] for the vector field
       Field[x, y] = {Sin[(y^2)] +  x, (e^Sin)[x] +  y}

\(Clear[x, y, m, n, Field, divField]; 
    
{m[x_, y_], n[x_, y_]} = {Sin[y\^2] + x, E\^Sin[x] + y}; 

    \(Field[x_, y_] = {m[x, y], n[x, y]}; \)\)divField[x_, y_] = D[m[x, y],  x] + D[n[x, y],  y]

You look at this and note that 
       divField[x, y] > 0 
no matter what {x, y} is. And then you say to yourself:
"Good, this tells me that the flow of this vector field across any closed curve is from inside to outside." 
Are you right?
Explain your response.

L.7)

Here's the rectang1e R with corners at 
     {-π, -2}, {-π, 2}, {π, 2}, and {π, -2}:

Rplot = 
      Show[Graphics[{Thickness[0.01], 
            Line[{{-π, -2}, {-π, 2}, {π, 2}, {π, 
                  -2}, {-π, -2}}]}], Axes -> True, 
        AxesLabel -> {"x", "y"}];

Use a 2D integral to measure the net flow of the vector field 
       Field[x, y] = {y Sin[2  x], (x^2) -  (e^(-y))} 
along the boundary curve C of this rectangle.
Say why you are happy to make this measurement by calculating your 2D integral instead of making this measuremnt by calculating the path integral
       (∮_( C)) y Sin[2  x] dx  +  
        ((x^2) -  (e^(-y))) dy.

L.8)

Take a look at rotField[x, y] for the vector field
       Field[x, y] = {Sin[x] -  y, Cos[y] - (e^(-2 x))}

\(Clear[x, y, m, n, Field, rotField]; 
    
{m[x_, y_], n[x_, y_]} = {Sin[x] - y, Cos[y] - E\^\(\(-2\)\ x\)}; 

    \(Field[x_, y_] = {m[x, y], n[x, y]}; \)\)rotField[x_, y_] = D[n[x, y],  x] - D[m[x, y],  y]

Remembering that 
       (2/(e^(2  x)))=2  (e^(-2 x))
can never be negative, you look at this and note that 
       rotField[x, y] > 0 
no matter what {x, y} is.  And then you say to yourself:
"Good, this tells me that the flow of this vector field along any closed curve is counterclockwise." 
Are you right?
Explain your response.

L.9)

Here's a closed curve:

Cplot = 
      Graphics[{Thickness[0.01], 
          Line[{{3, 2}, {0, 0.7}, {-3, 2}, {-3, -2}, {0, 
                -0.7}, {3, -2}, {3, 2}}]}]; label = Graphics[Text["C", {2.7, 1.6}]]; Show[Cplot, label, Axes -> True, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic];

Measure the flow of
       Field[x, y] = {(e^x) Cos[y], -(e^x) Sin[y]} across this curve.

L.10)

Here's a curve:

Cplot = 
      Graphics[{Thickness[0.01], 
          Line[{{3, 2}, {0, 0.7}, {-3, 2}, {-2, 0}, {-3, 
                -2}, {0, -0.7}, {3, -2}, {2, 0}, {3, 2}}]}]; 
    label = Graphics[Text["C", {2.6, 1.6}]]; Show[Cplot, label, Axes -> True, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic];

Here's a vector field:

\(Clear[Field, x, y, m, n]; 
    
{m[x_, y_], n[x_, y_]} = {x\/\(x\^2 + y\^2\), y\/\(x\^2 + y\^2\)}; 

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

Here is its divergence, divField[x, y]:

Together[D[m[x, y],  x] + D[n[x, y],  y]]

When Calculus Cal saw this, he said, "Good, this tells me that the net flow of Field[x, y] across this curve is 0."
Tell Cal where he made his mistake and show him how to make the calculation correctly.

L.11)

Here's a closed curve:

ParametricPlot[{0, 0.3} + {Cos[t] (1 - 0.7 Sin[t]), 
          1.8 Sin[t] (Cos[t]^2 - (1/8) Cos[2 t])}, {t, 0, 2 π}, 
      PlotStyle -> Thickness[0.01], 
      AxesLabel -> {"x", "y"}, 
      Epilog -> Text["C", {2.7, 1.6}]];

Here is a vector field:

\(Clear[Field, x, y, m, n]; 
    
{m[x_, y_], n[x_, y_]} = {x\/\(x\^2 + y\^2\), y\/\(x\^2 + y\^2\)}; 

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

Here is its divergence, divField[x, y]:

Together[D[m[x, y],  x] + D[n[x, y],  y]]

When Calculus Cal saw this, he said, "Good, this tells me that the net flow of Field[x, y] across this curve is 0."
For once, Cal is right.  Why is he right?

L.12)

Here are two curves:

\(Clear[x1, y1, x2, y2, t]; 
tlow = 0; 
\(thigh = 2\ π; \)\){x1[t_], y1[t_]} = 2 {Cos[t], 0.6 Sin[t] + 0.2 Sin[4 t]^2}; 
    {x2[t_], y2[t_]} = {1, 0} + 0.5 {Cos[t], Sin[t]}; curves = 
      ParametricPlot[{{x1[t], y1[t]}, {x2[t], y2[t]}}, {t, tlow, thigh}, 
        PlotStyle -> {{Thickness[0.01]}, {Thickness[0.01]}}, 
        AxesLabel -> {"x", "y"}, PlotRange -> All, 
        Epilog -> {Text["C1", {-0.7, 1.4}], 
            Text["C2", {1.2, 0.35}]}];

Given functions m[x, y] and n[x, y], what do you check to be sure that
       (∮_( (Subscript[C, 1]))) m[x, y] dx  +  
          n[x, y] dy = 
        (∮_( (Subscript[C, 2]))) m[x, y] dx  +  
          n[x, y] dy
without going to all the trouble to make the individual calculations?

L.13)

Here are the same two curves:

\(Clear[x1, y1, x2, y2, t]; 
tlow = 0; 
\(thigh = 2\ π; \)\){x1[t_], y1[t_]} = 2 {Cos[t], 0.6 Sin[t] + 0.2 Sin[4 t]^2}; 
    {x2[t_], y2[t_]} = {1, 0} + 0.5 {Cos[t], Sin[t]}; curves = 
      ParametricPlot[{{x1[t], y1[t]}, {x2[t], y2[t]}}, {t, tlow, thigh}, 
        PlotStyle -> {{Thickness[0.01]}, {Thickness[0.01]}}, 
        AxesLabel -> {"x", "y"}, PlotRange -> All, 
        Epilog -> {Text["C1", {-0.7, 1.4}], 
            Text["C2", {1.2, 0.35}]}];

Given a vector field 
       Field[x, y] = {m[x, y], n[x, y]}
what do you check to be sure that the net flow of Field[x, y] across (Subscript[C, 1]) is the same as the net flow of Field[x, y] across (Subscript[C, 2]) without going to all the trouble of making the individual calculations?

L.14)

Identify the points {x, y} of the vector field 
       Field[x, y] = {-(x^2) +  y, y +  2 Sin[π x]}
that are sources of new fluid. 
Identify the points {x, y} of the vector field 
       Field[x, y] = {-(x^2) +  y, y +  2 Sin[π x]}
that are sinks for old fluid.

L.15)

Given a vector field 
       Field[x, y] = {m[x, y], n[x, y]} 
with the extra property that 
       divField[x, y] = D[m[x, y], x] +  D[n[x, y], y] > 0 
for every x and y, explain how you know that the net flow of 
       Field[x, y] = {m[x, y], n[x, y]} 
across any closed curve without loops is from inside to outside.
What happens in the case that divField[x, y] < 0 for every x and y?
What happens in the case that divField[x, y] = 0 for every x and y?

L.16)

Given a vector field 
       Field[x, y] = {m[x, y], n[x, y]} 
with the extra property that 
       rotField[x, y] = D[n[x, y], x] -  D[m[x, y], y] > 0 
for every x and y, explain you know that the net flow of F[x, y] = {m[x, y], n[x, y]} along any closed curve without loops is counterclockwise.
What happens in the case that rotField[x, y] < 0 for every x and y?
What happens in the case that rotField[x, y] = 0 for every x and y?

L.17)

Here's a new curve:

Cplot = 
      Graphics[{Thickness[0.01], 
          Line[{{7, 0}, {2, 2}, {5, 5}, {-2, 2}, {-4, 1}, {-5, 
                -3}, {-3, -4}, {1, -2}, {4, -3}, {7, 
                0}}]}]; label = Graphics[Text["C", {2.5, 3.5}]]; Show[Cplot, label, Axes -> True, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic];

Here are two new functions m[x, y] and n[x, y]:

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

    m[x_, y_] = 
      \(3\ \((1 - y)\)\)\/\(\((x + 2)\)\^2 + \((y - 1)\)\^2\) + 
        \(y + 1\)\/\(\((x + 2)\)\^2 + \((y + 1)\)\^2\)\)

n[x_, y_] = 
      ((3 (x + 2))/((((x + 2))^2) + (((y - 1))^2))) - 
        ((x + 2)/((((x + 2))^2) + (((y + 1))^2)))

Note the singularities at {-2, 1} and {-2, -1}, and plot them:

singularity1 = {-2, 1}; singularity2 = {-2, -1}; singularityplot = {Graphics[{PointSize[0.02], Point[singularity1]}], 
        Graphics[{PointSize[0.02], Point[singularity2]}]}; Show[Cplot, singularityplot, label, Axes -> True, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic];

The singularities are inside the region enclosed by C.
Now check D[n[x, y], x] - D[m[x, y], y]:

Together[D[n[x, y],  x] - D[m[x, y],  y]]

If there were no singularities inside C, then this information would be enough to tell you that 
       (∮_( C)) m[x, y] dx  +  
        n[x, y] dy 
 is 0, but this does not tell you that
       (∮_( C)) m[x, y] dx  +  
          n[x, y] dy = 0
because of the nasty singularities inside the curve C. 
But this does tell you that you can express  
       (∮_( C)) m[x, y] dx  +  
        n[x, y] dy
in terms of  
       (∮_( (Subscript[C, 1]))) m[x, y] dx  +  
        n[x, y] dy
and  
       (∮_( (Subscript[C, 2]))) m[x, y] dx  +  
        n[x, y] dy
where (Subscript[C, 1]) and (Subscript[C, 2]) are the little circles plotted below:

\(Clear[x1, y1, x2, y2, t]; 
    
{x1[t_], y1[t_]} = singularity1 + 0.5\ {Cos[t], Sin[t]}; 

    \({x2[t_], y2[t_]} = singularity2 + 0.5\ {Cos[t], Sin[t]}; \)\)littles = 
      ParametricPlot[{{x1[t], y1[t]}, {x2[t], y2[t]}}, {t, 0, 2 π}, 
        PlotStyle -> {{Thickness[0.01]}}, 
        DisplayFunction -> Identity]; singularityplot = {Graphics[{PointSize[0.02], Point[singularity1]}], 
        Graphics[{PointSize[0.02], Point[singularity2]}]}; extralabels = {Graphics[Text["C1", {-1.2, 1}]], 
        Graphics[Text["C2", {-1.2, -1}]]}; Show[Cplot, littles, singularityplot, label, extralabels, 
      PlotRange -> All, Axes -> True, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic, 
      DisplayFunction -> $DisplayFunction];

Just how do you express
       (∮_( C)) m[x, y] dx  +  
        n[x, y] dy
in terms of 
       (∮_( (Subscript[C, 1]))) m[x, y] dx  +  
        n[x, y] dy,  and   
       (∮_( (Subscript[C, 2]))) m[x, y] dx  +  
        n[x, y] dy?
 No calculation of any of these three integrals is asked for here.

L.18)

Gauss's law in physics says that if you take n different points 
       {(Subscript[a, 1]), (Subscript[b, 1])}, {(Subscript[a, 2]), (Subscript[b, 2])}, …, {(Subscript[a, n]), (Subscript[b, n])} 
inside a closed curve C, and you place electrical charges of strength 
       (Subscript[q, 1])  at {(Subscript[a, 1]), (Subscript[b, 1])},
       (Subscript[q, 2])  at {(Subscript[a, 2]), (Subscript[b, 2])},
          ...
       (Subscript[q, n])  at {(Subscript[a, n]), (Subscript[b, n])},
then the flux (= flow) of the resulting electric field across C is simply
       2  π ((Subscript[q, 1]) +  (Subscript[q, 2]) +  … +  (Subscript[q, n])).
Explain where Gauss's law comes from.

L.19)

Suppose Field[x, y] is a gradient field of a function f[x, y], and calculate rotField[x, y], and then say what the net flow of any gradient field along any closed curve is.

L.20)

Here's the gradient field of a cleared function f[x, y]:

\(Clear[gradField, f, x, y, m, n]; 
    
{m[x_, y_], n[x_, y_]} = {D[f[x, y], \ x], D[f[x, y], \ y]}; 

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

The gradient field is such a big deal in science that there are many commonly use notations for it. Here are some:
       ∇f[x, y] = gradf[x, y] 
                        = {D[f[x, y], x], D[f[x, y], y]} 
                        = {(f^((1, 0)))[x, y], (f^((0, 1)))[x, y]} 
                       ={∂f[x ,  y]/∂x,∂f[x ,  y]/∂y}.
Folks use these notations interchangably.
The Laplacian Δf[x, y] of f[x, y] is defined by  
       Δf[x, y]=(∂^2)f[x, y]/∂(x^2)+(∂^2)f[x, y]/∂(y^2).
The Laplacian of f[x, y] is also a big deal in science.
Here is Mathematica's calculation of the Laplacian, Δf[x, y], of a cleared function f[x, y]:

\(Clear[laplacianf]; 

    laplacianf[x_, y_] = D[f[x, y], \ {x, 2}] + D[f[x, y], \ {y, 2}]\)

One of the reasons that the Laplacian is a big deal is that the Laplacian is related to the gradient field.
Just what is the exact nature of the relationship between the divergence of the gradient field of f[x, y] and the Laplacian of f[x, y]?

L.21)

Suppose you are going with a function f[x, y] and you know that its Laplacian
       Δf[x, y]=(∂^2)f[x, y]/∂(x^2)+(∂^2)f[x, y]/∂(y^2)=0 
no matter what x and y you go with.
Suppose also that f[x, y] has no singularities. 
Say why the net flow of gradf[x, y] across any closed curve C is 0.

L.22)

Suppose you are going with a function f[x, y] and you know that its Laplacian
       Δf[x, y]=(∂^2)f[x, y]/∂(x^2)+(∂^2)f[x, y]/∂(y^2)=0 
no matter what x and y you go with.
Suppose also that f[x, y] has no singularities. 
Explain why it is impossible to find a point {(Subscript[x, 0]), (Subscript[y, 0])} with the property that
       f[(Subscript[x, 0]), (Subscript[y, 0])] > f[x, y] 
for all points {x, y} near {(Subscript[x, 0]), (Subscript[y, 0])} but not the same as {(Subscript[x, 0]), (Subscript[y, 0])}.
Think of it this way:
If there is a point {(Subscript[x, 0]), (Subscript[y, 0])} with the property that
       f[(Subscript[x, 0]), (Subscript[y, 0])] > f[x, y] 
for all points {x, y} near but not the same as {(Subscript[x, 0]), (Subscript[y, 0])}, 
then what is the net flow of gradf[x, y] across small circles centered at {(Subscript[x, 0]), (Subscript[y, 0])}?

L.23)

What is it about each of the following plots that tells you that none of the plots are plots of functions f[x, y] with the extra property that
       Δf[x, y]=(∂^2)f[x, y]/∂(x^2)+(∂^2)f[x, y]/∂(y^2)=0 
no matter what x and y you go with?

Plot 1:

CMView = {2.7, 1.6, 1.2}; \(Clear[f, x, y]; 

    Plot3D[4\ E\^\(\(-x\^2\) - 0.4\ y\^2\), {x, \(-2\), 2}, {y, \(-2\), 2}, 
      PlotPoints -> {30, 30}, ViewPoint -> CMView, 
      Boxed -> False, AxesLabel -> {"x", "y", "z"}, 
      Ticks -> None]; \)

Plot 2:

CMView = {2.7, 1.6, 1.2}; \(Clear[f, x, y]; 

    Plot3D[Sin[2\ x]\^2 + Cos[4\ y]\^2, {x, \(-1\), 1}, {y, \(-1\), 1}, 
      PlotPoints -> {30, 30}, ViewPoint -> CMView, 
      Boxed -> False, AxesLabel -> {"x", "y", "z"}, 
      Ticks -> None]; \)

Plot 3:

\(Clear[x, y]; 

    Plot3D[4 + \(0.4\ \((x\^2 + y\^2)\)\)\/\(1 + x\^2 + y\^2\), {x, \(-2\), 
        2}, {y, \(-2\), 2}, PlotPoints -> {30, 30}, 
      ViewPoint -> {2.7, 1.6, 1.2}, Boxed -> False, 
      AxesLabel -> {"x", "y", "z"}, Ticks -> None]; 
    \)

L.24)

Go with 
       f[x, y] = (e^(-x)) Sin[y] 
and note that its its Laplacian,
       Δf[x, y]=(∂^2)f[x, y]/∂(x^2)+(∂^2)f[x, y]/∂(y^2)=0,
no matter what {x, y} you go with.

\(Clear[f, x, y]; 

    f[x_, y_] = 1 + 0.4 \( E\^\(-x\)\) \((Cos[y] + Sin[y])\); 


    TrigExpand[D[f[x, y], {x, 2}] + D[f[x, y], {y, 2}]]\)

Here's a plot of the surface 
       z = f[x, y]
over (or under) the region R in the xy-plane consisting of all points {x, y, 0} with {x, y} inside the 2D circle (x^2) + (y^2) = 1:

{x[r_, t_], y[r_, t_], z[r_, t_]} = r {Cos[t], Sin[t], 0}; Rplot = 
      ParametricPlot3D[{x[r, t], y[r, t], z[r, t]}, {r, 0, 1}, {t, 0, 
          2 π}, PlotPoints -> {2, 30}, 
        DisplayFunction -> Identity]; surfaceplot = 
      ParametricPlot3D[{x[r, t], y[r, t], f[x[r, t], y[r, t]]}, {r, 0, 1}, {
          t, 0, 2 π}, PlotPoints -> {20, 30}, 
        DisplayFunction -> Identity]; CMView = {2.7, 1.6, 1.2}; label = Graphics3D[Text["R", {0.4, 0.6, 0}]]; threeDplot = 
      Show[surfaceplot, Rplot, label, ViewPoint -> CMView, 
        PlotRange -> All, AxesLabel -> {"x", "y", "z"}, 
        Boxed -> False, DisplayFunction -> $DisplayFunction];

Notice that the highest and lowest plotted points on the surface z = f[x, y] sit directly above the boundary curve of R. 
When you take any other function f[x, y] with the extra property that its Laplacian
       Δf[x, y]=(∂^2)f[x, y]/∂(x^2)+(∂^2)f[x, y]/∂(y^2)=0 
no matter what {x, y} you go with, then why do you also know in advance that the highest and lowest plotted points on the surface z = f[x, y] will sit directly above the boundary curve of R?