VC.04 2D Vector Fields and Their Trajectories
TUTORIALS

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

T.1) Flow across and flow along: Visual inspection

Here's a vector field:

\(Clear[Field, m, n, x, y]; 
m[x_, y_] = 1; 
\(n[x_, y_] = y - Sin[x]; 
    \)\)Field[x_, y_] = {m[x, y], n[x, y]}

Here's a curve:

\(Clear[t]; 
{x[t_], y[t_]} = {0.8\ Cos[t], 0.5\ Sin[t]}; 


    curveplot = 
      ParametricPlot[{x[t], y[t]}, {t, 0, 2\ π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        AxesLabel -> {"x", "y"}]; \)

T.1.a.i) Flow across

Give a visual analysis of the flow of this vector field across this curve.

First, plot the vector field on the curve:

jump = (π/12); \(fieldvectors = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 0, 
          2\ π - jump, jump}]; 


    outcome = Show[curveplot, fieldvectors]; \)

It looks like the net flow of this vector field across this curve is from inside to outside, but there is some flow from outside to inside on the left.  To get a more accurate picture of the flow of this vector field across this curve, look at the normal components of the field vectors plotted above.

Clear[normal];
normal[t_]={y'[t],-x'[t]};

Clear[normalcomponent];
normalcomponent[t_] = 
        Field[x[t], y[t]] . normal[t]/normal[t] . normal[t] normal[t];
actualflowacross = 
        Table[Arrow[normalcomponent[t], Tail -> {x[t], y[t]}], {t, 0, 
            2 π - jump, jump}];

flowacrossplot = Show[curveplot, actualflowacross];

Now there's no doubt about it; the net flow of this vector field across this curve is from inside to outside.

T.1.a.ii) Flow along

Give a visual analysis of the flow of this vector field along this curve.

First, plot the vector field on the curve:

jump = (π/12); \(fieldvectors = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 0, 
          2\ π - jump, jump}]; 


    outcome = Show[curveplot, fieldvectors]; \)

It looks like the net flow of this vector field along this curve is clockwise, but there is some counterclockwise flow along this curve at the bottom.  To get a more accurate picture of the flow of this vector field along this curve, look at the tangential components of the field vectors plotted above.

Clear[tangent];
tangent[t_]={x'[t],y'[t]};
Clear[tancomponent];
tancomponent[t_] = 
        Field[x[t], y[t]] . tangent[t]/tangent[t] . tangent[t] 
          tangent[t];
actualflowalong = 
        Table[Arrow[tancomponent[t], Tail -> {x[t], y[t]}], {t, 0, 
            2 π - jump, jump}];

flowalongplot = Show[curveplot, actualflowalong];

Now there's no doubt about it; clockwise flow along this curve overwhelms the counterclockwise flow.  The net flow of this vector field along this curve is clockwise.

T.1.a.iii)

Review what happened in the parts above.

Here's the vector field plotted on the curve:

Show[outcome];

Here are the normal components of the vectors in the plot above:

Show[outcome, actualflowacross];

You use these normal components to read off the net flow across the curve.
Here are the tangential components of the vectors in the plot above:

Show[outcome, actualflowalong];

You use these tangential components to read off the net flow across the curve.

T.2) Differential equations and and their associated vector fields

T.2.a)

When you have a differential equation like
       y'[x]=2  x -  y[x], 
you can make the associated vector field
       DEField[x, y] = {1, 2  x -  y}:

\(Clear[DEField, x, y]; 
DEField[x_, y_] = {1, 2\ x - y}; 

    \(scalefactor = 0.2; \)\)\(DEFieldplot = 
      Table[Arrow[DEField[x, y], Tail -> {x, y}, 
          ScaleFactor -> scalefactor], {x, \(-4\), 4, 8\/10}, {y, 
          \(-4\), 4, 8\/10}]; 


    Show[DEFieldplot, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}]; \)

The flow of this field pulls all the trajectories down from the upper left, turns them around, and spits them out at the upper right.
Try it:

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

    \({a, b} = {\(-3.6\), 4}; \)\)starterpoint = {a, b};

Clear[Derivative, x, y, t];
equationx=x'[t]==m[x[t], y[t]];
equationy=y'[t]==n[x[t], y[t]];starterx = x[0] == a; startery = y[0] == b; endtime = 7; \(approxsolutions = 
      NDSolve[{equationx, equationy, starterx, startery}, {x[t], y[t]}, {t, 
          0, endtime}]; 

Clear[trajectory]; 

    trajectory[t_] = {
        x[t] /. approxsolutions[[1]], 
        y[t] /. approxsolutions[[1]]}; 

    \(trajectoryplot = 
      ParametricPlot[trajectory[t], {t, 0, endtime}, 
        PlotStyle -> {{Red, Thickness[0.01]}}, 
        DisplayFunction -> Identity]; \)\)\(starterplot = Graphics[{Red, PointSize[0.06], Point[starterpoint]}]; 


    trajectory = 
      Show[DEFieldplot, starterplot, trajectoryplot, PlotRange -> All, 
        Axes -> Automatic, AxesLabel -> {"x", "y"}, 
        DisplayFunction -> $DisplayFunction]; \)

What's the significance of the trajectories in the DEField?

Answer:

The trajectory plotted above is nothing but a plot of a solution of the given differential equation 
       y'[x] = 2  x -  y[x] with y[-3.6] = 4.
To see why, look at the ingredients of the trajectory plotter above:

{a, b}

equationx=x'[t]==m[x[t], y[t]]

equationy=y'[t]==n[x[t], y[t]]

starterx = x[0] == a

startery = y[0] == b

These equations tell you that this trajectory is the same as the plot of solution of the differential equation
       y'[x] = 2  x -  y[x] with y[-3.6] = 4.
Here's the plot of the solution of the differential equation
       y'[x] = 2  x -  y[x] with y[-2] = 0.
as a trajectory in this vector field:

{a, b} = {-2, 0}; starterpoint = {a, b};

Clear[Derivative, x, y, t];
equationx=x'[t]==m[x[t], y[t]];
equationy=y'[t]==n[x[t], y[t]];starterx = x[0] == a; startery = y[0] == b; begintime = -1; \(endtime = 7; 

    approxsolutions = 
      NDSolve[{equationx, equationy, starterx, startery}, {x[t], y[t]}, {t, 
          begintime, endtime}]; 

Clear[trajectory]; 

    trajectory[t_] = {
        x[t] /. approxsolutions[[1]], 
        y[t] /. approxsolutions[[1]]}; 

    \(trajectoryplot = 
      ParametricPlot[trajectory[t], {t, begintime, endtime}, 
        PlotStyle -> {{Red, Thickness[0.01]}}, 
        DisplayFunction -> Identity]; \)\)\(starterplot = Graphics[{Red, PointSize[0.06], Point[starterpoint]}]; 


    trajectory = 
      Show[DEFieldplot, starterplot, trajectoryplot, PlotRange -> All, 
        Axes -> Automatic, AxesLabel -> {"x", "y"}, 
        DisplayFunction -> $DisplayFunction]; \)

Beautiful, darn beautiful.

T.2.b)

Here's another look at the vector field coming from the differential equation
       y'[x]=2  x -  y[x]:

\(Clear[DEField, x, y]; 
DEField[x_, y_] = {1, 2\ x - y}; 

    \(scalefactor = 0.2; \)\)\(DEFieldplot = 
      Table[Arrow[DEField[x, y], Tail -> {x, y}, 
          ScaleFactor -> scalefactor], {x, \(-4\), 4, 1}, {y, \(-4\), 4, 
          1}]; 

Show[DEFieldplot, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}]; \)

What does this plot tell you about the solutions of this differential equation?

Good question.
It tells you a lot.  It tells you that no matter how you set a and b so that {a, b} is within the plot range above, the solution of 
       y'[x]=2  x -  y[x] with y[a] = b 
will go down on the left and will turn itself around and go up on the right. 
This plot tells you one heckuva lot more than does the formula coming from:

Clear[x, y, a, b];
DSolve[{y'[x]==2 x - y[x],y[a] == b},y[x],x]

But this formula does tell you that any solution of 
       y'[x]=2  x -  y[x] with y[a] = b
does get sucked onto the line 
       y = 2  x -  2 
when x is large and positive.
You can also see this fact in the DEField plot:

\(sucker = 
      Plot[2\ x - 2, {x, \(-1\), 4}, 
        PlotStyle -> {{Thickness[0.02], Red}}, 
        DisplayFunction -> Identity]; 


    Show[DEFieldplot, sucker, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}, 
      DisplayFunction -> $DisplayFunction]; \)

That's mathematics at work.

T.3) Flow across a curve and the sign of the dot product
            Field[x[t], y[t]].{y'[t],-x'[t]}
       Flow along a curve and the sign of the dot product
           Field[x[t], y[t]].{x'[t],y'[t]}

Given a two dimensional curve parameterized by 
        {x[t], y[t]} with a ≤ t ≤ b, 
you can get a tangent vector at {x[t], y[t]} that points in the direction of the parameterization by setting 
       tangent[t]={x'[t],y'[t]}.
You can also get a normal vector at {x[t], y[t]} by setting 
       normal[t]={y'[t],-x'[t]}.
Try them out:

Clear[x, y, t, tangent, normal];
{x[t_], y[t_]} = {2 Cos[t], Sin[t]};
tangent[t_]={x'[t],y'[t]};normal[t_]={y'[t],-x'[t]};curveplot = 
      ParametricPlot[{x[t], y[t]}, {t, 0, 2 π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        DisplayFunction -> Identity]; jump = (π/3); \(tangentvectors = 
      Table[Arrow[tangent[t], Tail -> {x[t], y[t]}], {t, 0, 
          2\ π - jump, jump}]; 

    normalvectors = 
      Table[Arrow[normal[t], Tail -> {x[t], y[t]}, 
          VectorColor -> SteelBlue], {t, 0, 2\ π - jump, jump}]; 


    Show[curveplot, tangentvectors, normalvectors, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic, 
      DisplayFunction -> $DisplayFunction]; \)

The tangent vectors, {x'[t],y'[t]}, tell you that the curve is parameterized in the counterclockwise way. 
The normal vectors, {y'[t],-x'[t]}, point to the outside of the curve.
Try another curve:

Clear[x, y, t, tangent, normal];
{x[t_], y[t_]} = {Cos[t] (1 - 0.5 Sin[3 t]), Sin[t]};
tangent[t_]={x'[t],y'[t]};normal[t_]={y'[t],-x'[t]};curveplot = 
      ParametricPlot[{x[t], y[t]}, {t, 0, 2 π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        DisplayFunction -> Identity]; jump = (π/3); \(tangentvectors = 
      Table[Arrow[tangent[t], Tail -> {x[t], y[t]}], {t, 0, 
          2\ π - jump, jump}]; 

    normalvectors = 
      Table[Arrow[normal[t], Tail -> {x[t], y[t]}, 
          VectorColor -> SteelBlue], {t, 0, 2\ π - jump, jump}]; 


    Show[curveplot, tangentvectors, normalvectors, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic, 
      DisplayFunction -> $DisplayFunction]; \)

Again, the tangent vectors {x'[t],y'[t]} tell you that the curve is parameterized in the counterclockwise way. 
The normal vectors {y'[t],-x'[t]} point to the outside of the curve.
Try another curve:

Clear[x, y, t, tangent, normal];
{x[t_], y[t_]} = {t (2 π - t), 2 Sin[t]};
tangent[t_]={x'[t],y'[t]};normal[t_]={y'[t],-x'[t]};curveplot = 
      ParametricPlot[{x[t], y[t]}, {t, 0, 2 π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        DisplayFunction -> Identity]; jump = (π/3); \(tangentvectors = 
      Table[Arrow[tangent[t], Tail -> {x[t], y[t]}], {t, 0, 
          2\ π - jump, jump}]; 

    normalvectors = 
      Table[Arrow[normal[t], Tail -> {x[t], y[t]}, 
          VectorColor -> SteelBlue], {t, 0, 2\ π - jump, jump}]; 


    Show[curveplot, tangentvectors, normalvectors, 
      AxesLabel -> {"x", "y"}, 
      DisplayFunction -> $DisplayFunction]; \)

This time, the tangent vectors {x'[t],y'[t]} tell you that the curve is parameterized in the clockwise way. 
This time, the normal vectors {y'[t],-x'[t]} point to the inside of the curve.

T.3.a.i) Counterclockwise versus clockwise

Is it true that:
-> When a closed curve is parameterized by {x[t], y[t]} in the counterclockwise way, then the normal vectors {y'[t],-x'[t]} always point to the outside of the curve?
-> When a closed curve is parameterized by {x[t], y[t]} in the clockwise way, then the normal vectors {y'[t],-x'[t]} always point to the inside of the curve?

Yes.
In fact, as you walk around the curve in the direction of the parameterization, the normal vector {y'[t],-x'[t]} always points to your right.

T.3.a.ii) Your choice of normals

Given a curve parameterized by 
       {x[t], y[t]} with a ≤ t ≤ b,
you have your choice of normal vectors at {x[t], y[t]}: 
You can opt for 
       {y'[t],-x'[t]},  
or you can go with  
       D[unittan[t], t]
where 
       unittan[t]=(({x'[t], y'[t]})/((Sqrt[(x^′)[t]^2  +  (y^′)[t]^2]))).
Discuss the merits of each.

For hand work, {y'[t],-x'[t]} is more easily calculated than is D[unittan[t], t].  The choice of which to use depends on what you want to do.
-> If you want a normal that always points to the right as you advance on the curve in the direction of the parameterization, go with {y'[t],-x'[t]}.
-> If you want a normal that always points with the curvature, go with D[unittan[t], t].
You probably know how handy D[unittan[t], t] can be.
If you want to see how handy {y'[t],-x'[t]} can be, go on to the next problem.

T.3.b) Flow across a curve and the sign of the dot product
           Field[x[t], y[t]].{y'[t],-x'[t]}

Here's a vector field:

\(Clear[Field, m, n, x, y]; 
m[x_, y_] = 1.4\ x\^2; 

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

Here's a curve:

\(Clear[t]; 
{x[t_], y[t_]} = {Cos[t], 0.5\ Sin[t]}; 


    curveplot = 
      ParametricPlot[{x[t], y[t]}, {t, 0, 2\ π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        AxesLabel -> {"x", "y"}]; \)

Look at this plot of some of the unit tangent vectors
       unittangent[t]=(({x'[t], y'[t]})/((Sqrt[(x^′)[t]^2  +  (y^′)[t]^2])))
pointing in the direction of the parameterization:

Clear[t, unittangent];
unittangent[t_]=(({x'[t],y'[t]})/(Sqrt[((x'[t])^2)+((y'[t])^2)]));
jump = (π/8); \(unittangents = 
      Table[Arrow[unittangent[t], Tail -> {x[t], y[t]}, 
          VectorColor -> Red], {t, 0, 2\ π - jump, jump}]; 


    Show[curveplot, unittangents]; \)

This plot tells you that the curve is parameterized in the counterclockwise way. 
And this tells you that the normal vector {y'[t],-x'[t]} at {x[t], y[t]} points to the outside of the curve.
Now look at this plot of 
     Field[x[t], y[t]].{y'[t],-x'[t]}:

dotplot=Plot[Field[x[t], y[t]].{y'[t],-x'[t]},{t, 0, 2 π},PlotStyle -> {{Thickness[0.01], Blue}},\(AxesLabel -> {"t", \*""""}\),AspectRatio -> (1/2),PlotLabel -> "Dot Plot"];

Interpret this plot.

This is a plot of
       Field[x[t], y[t]].{y'[t],-x'[t]}.
When 
       Field[x[t], y[t]].{y'[t],-x'[t]}>0, 
the flow of the vector field across the curve is in the direction of the outward normal vector {y'[t],-x'[t]}.
When 
       Field[x[t], y[t]].{y'[t],-x'[t]}<0, 
the flow of the vector field across the curve is opposite to the direction of the outward normal vector {y'[t],-x'[t]}.
Since the normals {y'[t],-x'[t]} point out from the curve, the upshot is this: 
At a point {x[t], y[t]} on the curve, the flow across the curve is:
-> from inside to outside when 
       Field[x[t], y[t]].{y'[t],-x'[t]}>0
-> from outside to inside when 
       Field[x[t], y[t]].{y'[t],-x'[t]}<0.
Armed with this insight, take another look at the plot of 
       Field[x[t], y[t]].{y'[t],-x'[t]}:

Show[dotplot];

Eye-ball estimates tell you that the flow of this vector field across this curve is 
-> from inside to outside at points {x[t], y[t]} with 
       0 ≤ t < 2.5 and 4.3 < t ≤ 2  π
-> from outside to inside at points {x[t], y[t]} with 
       2.7 < t < 4.1.

Check it out:

\(out1 = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 0, 2.5, 
          \(2.5 + 0\)\/6}]; 

    out2 = Table[
        Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 4.3, 
          2\ π, 1\/6\ \((2\ π - 4.3)\)}]; 

    in1 = Table[
        Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 2.7, 4.1, 
          \(4.1 - 2.7\)\/6}]; 
\(Show[curveplot, out1, out2]; \)\)

Outward flow across the curve at the plotted points on the curve.
This is a good representative plot of the part of this vector field that flows from inside to outside across this curve.
Now look at:

Show[curveplot, in1];

Inward flow across the curve at the plotted points on the curve.
This is a good representative plot of the part of this vector field that flows from outside to inside across this curve.
And you set up both plots by doing nothing more than eyeballing a plot of 
       Field[x[t], y[t]].{y'[t],-x'[t]}.
Math works.

T.3.c) Flow along a curve and the sign of the dot product
           Field[x[t], y[t]].{x'[t],y'[t]}

Here's a vector field:

\(Clear[Field, m, n, x, y]; 
m[x_, y_] = 3\ x - y\^2; 

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

Here's a curve:

\(Clear[t]; 
{x[t_], y[t_]} = {Cos[t]\ \((Cos[t]\^2 + 1)\), Sin[t]}; 


    curveplot = 
      ParametricPlot[{x[t], y[t]}, {t, 0, 2\ π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        AxesLabel -> {"x", "y"}]; \)

Look at this plot of some of the unit tangent vectors
       unittangent[t]=(({x'[t], y'[t]})/(Sqrt[((x'[t])^2) + ((y'[t])^2)]))
pointing in the direction of the parameterization:

Clear[t, unittangent];
unittangent[t_]=(({x'[t],y'[t]})/(Sqrt[((x'[t])^2)+((y'[t])^2)]));
jump = (π/3); \(unittangents = 
      Table[Arrow[unittangent[t], Tail -> {x[t], y[t]}], {t, 0, 
          2\ π - jump, jump}]; 

Show[curveplot, unittangents]; \)

This plot tells you that the curve is parameterized in the counterclockwise way. 
Now look at this plot of 
       Field[x[t], y[t]].{x'[t],y'[t]}:

dotplot=Plot[Field[x[t], y[t]].{x'[t],y'[t]},{t, 0, 2 π},PlotStyle -> {{Thickness[0.01], Blue}},\(AxesLabel -> {"t", \*""""}\),AspectRatio -> (1/2),PlotLabel -> "Dot Plot"];

Interpret this plot.

This is a plot of
       Field[x[t], y[t]].{x'[t],y'[t]}.
When 
       Field[x[t], y[t]].{x'[t],y'[t]}>0, 
the flow of the vector field along the curve is in the direction of the tangent vector {x'[t],y'[t]}.
When 
       Field[x[t], y[t]].{x'[t],y'[t]}<0, 
the flow of the vector field along the curve is opposite the direction of the tangent vector {x'[t],y'[t]}.
Because the tangents {x'[t],y'[t]} point in the counterclockwise direction, the upshot is:
At a point {x[t], y[t]} on the curve, the flow along the curve is:
-> counterclockwise when Field[x[t], y[t]].{x'[t],y'[t]}>0
-> clockwise when Field[x[t], y[t]].{x'[t],y'[t]}<0.
Armed with this insight, take another look at the plot of 
       Field[x[t], y[t]].{x'[t],y'[t]}
again:

Show[dotplot];

Eye-ball estimates tell you that the flow of this vector field along this curve is 
-> clockwise at points {x[t], y[t]} with 
       0 ≤ t ≤ 1 and 3.1 ≤ t ≤ 5.1
-> counterclockwise at points {x[t], y[t]} with 
            1.2 ≤ t ≤ 3 and 5.2 ≤ t ≤ 2  π.

Check it out:

\(clockwise1 = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 0, 1, 
          \(1 + 0\)\/6}]; 

    clockwise2 = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 3.1, 
          5.1, \(5.1 - 3.1\)\/6}]; 

    counterclockwise1 = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 1.2, 3, 
          \(3 - 1.2\)\/6}]; 

    counterclockwise2 = 
      Table[Arrow[Field[x[t], y[t]], Tail -> {x[t], y[t]}], {t, 5.2, 
          2\ π, 1\/6\ \((2\ π - 5.2)\)}]; 


    Show[curveplot, clockwise1, clockwise2]; \)

Clockwise flow along the curve at the plotted points on the curve.
This is a good representative plot of the part of this vector field that flows in the clockwise direction along this curve.
Now look at:

Show[curveplot, counterclockwise1, counterclockwise2];

Counterclockwise flow along the curve at the plotted points on the curve.
This is a good representative plot of the part of this vector field that flows in the counterclockwise direction along this curve.
And you set up both plots by doing nothing more than eyeballing a plot of  
       Field[x[t], y[t]].{x'[t],y'[t]}.
Math works again.

T.4) The 2D electric field

In the electric interpretation, a vector field
       ElectricField[x, y] = {m[x, y], n[x, y]}
is a vector such that
       ElectricField[x, y] . U
measures the instantaneous voltage drop when you leave {x, y} in the direction of a unit vector U.  
This is the same as saying ElectricField[x, y] represents the force the field places on a unit charge at the point {x, y}.

T.4.a)

Here's a plot of the electric field resulting from a point charge of size 2 at {0.50, 1.50}:

\(Clear[ElectricField, x, y]; 
q = 2; 
\({a, b} = {0.50, 1.50}; \)\)ElectricField[x_, y_] = 
      ((q {x - a, y - b})/((((x - a))^2) + (((y - b))^2)))

Here's how this electric field looks:

\(\(Show[Graphics[{Red, PointSize[0.08], Point[{a, b}]}], 
	\ \ \ \ \ \ 
      \ \ \ \ Table[Arrow[ElectricField[x, y], Tail -> {x, y}], 
		\ 
        \ \ \ \ \ \ \ \ \ \ \ \ {x, \(-1\), 3}, {y, 0, 4}], 
      Axes -> Automatic]; \)\)

Ta-Da.
How do you interpret this plot?

The electric field vector, ElectricField[x, y], plotted as above, with tail at {x, y} points in the direction of biggest voltage drop, and the length of the vector represents the size of the voltage drop in that direction.
Reason: If you leave {x, y} in the direction of a unit vector U, then the instantaneous voltage drop is
       ElectricField[x, y] . U 
        = 
        ‖ElectricField[x, y]
              ‖ 
          ‖U‖ 
          Cos[angle between]
        = 
        ‖ElectricField[x, y]
              ‖ Cos[angle between]
because ‖U‖ = 1.
This tells you that the instantaneous voltage drop is as big as possible when
       ElectricField[x, y] . U
        = 
        ‖ElectricField[x, y]
              ‖ Cos[angle between]
is as big as possible.  This happens when 
       Cos[angle between] = 1, 
which is the same as saying that angle between = 0.
The upshot:
To get the biggest instantaneous voltage drop, you take
       U=ElectricField[x, y]
                /‖ElectricField[x, y]
                  ‖.
The direction of the biggest instantaneous voltage drop is the direction of 
       ElectricField[x, y].
The size of the biggest instantaneous voltage drop is
       ElectricField[x, y].ElectricField[x, y]
                /‖ElectricField[x, y]
                  ‖
       =‖ElectricField[x, y]
                    ((‖^2)
                /‖)ElectricField[x, y]
                  ‖
        = 
        ‖ElectricField[x, y]
            ‖.
        
This means that ElectricField[x, y] points in the direction of the biggest instantaneous voltage drop, and that the instantaneous voltage drop in this direction is ‖ElectricField[x, y]
          ‖.

T.4.b)

What do you get when you put a charge of size 
       1.5 at {-0.875, 0.375}, 
and a charge of size 
       -1.5 at {0.875, 0.375}?

Answer:

You get something pretty interesting.
Start by adding the electric fields resulting from the two point charges:

\(Clear[ElectricField1, ElectricFieldF2, CombinedElectricField, x, y]; 

    q1 = 1.5; 
\({a1, b1} = {\(-0.875\), 0.375}; \)\)ElectricField1[x_, y_] = 
      ((q1 {x - a1, y - b1})/((((x - a1))^2) + (((y - b1))^2))); q2 = -1.5; {a2, b2} = {0.875, 0.375}; ElectricField2[x_, y_] = 
      ((q2 {x - a2, y - b2})/((((x - a2))^2) + (((y - b2))^2))); \(CombinedElectricField[x_, y_] = 
      ElectricField1[x, y] + ElectricField2[x, y]; 


    Show[Graphics[{Red, PointSize[0.08], Point[{a1, b1}]}], 
      Graphics[{Blue, PointSize[0.08], Point[{a2, b2}]}], 
      Table[Arrow[CombinedElectricField[x, y], Tail -> {x, y}], {x, 
          \(-3\), 3}, {y, \(-2\), 4}], Axes -> Automatic]; \)

That's a little hard to interpret.  To get a better idea, look at the unit electric field, which shows the direction of the greatest instantaneous voltage drop but does not show the size of the drop.

\(Clear[unitfieldvector]; 

    unitfieldvector[x_, y_] = 
      CombinedElectricField[x, y]/
        \((√\((
              CombinedElectricField[x, y] . CombinedElectricField[x, y])\))
          \); 
\(Show[Graphics[{Red, PointSize[0.08], Point[{a1, b1}]}], 
      Graphics[{Blue, PointSize[0.08], Point[{a2, b2}]}], 
      Table[Arrow[unitfieldvector[x, y], Tail -> {x, y}], {x, \(-3\), 3, 
          0.5}, {y, \(-2\), 4, 0.5}], Axes -> Automatic]; \)\)

Hot plot.  
Well worth waiting for.
The juice is pouring away from the positive charge toward the negative charge just like it does in the movies.

T.5) Troubleshooting plots of vector fields

To get a good visualization of a vector field, you can plot the field as it comes:

\(Clear[Field, x, y]; 
Field[x_, y_] = {x\^2 + 1, y\^2}; 

    fieldplot = 
      Table[Arrow[Field[x, y], Tail -> {x, y}], {x, \(-3\), 3, 0.5}, {y, 
          \(-3\), 3, 0.5}]; 


    Show[fieldplot, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}]; \)

In some cases, such as this one, the vectors plot out so long that you have a hard time visualizing the flow of the field.
Other times, the field vectors might plot out so short that you can't see them clearly.
In such cases, you might want to apply a scale factor:

scalefactor = 0.1; \(scaledfieldplot = 
      Table[Arrow[Field[x, y], Tail -> {x, y}, 
          ScaleFactor -> scalefactor], {x, \(-3\), 3, 0.5}, {y, \(-3\), 
          3, 0.5}]; 


    Show[scaledfieldplot, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}]; \)

In a scaled plot such as this one, the lengths of the vectors are proportional to the speed of the flow, just as they were in the unscaled plot.
Sometimes you can't get any satisfactory scaled plot.  In this case you might want to try the unit field plot.

\(Clear[unitField]; 

    unitField[x_, y_] = Field[x, y]\/\@\(Field[x, y] . Field[x, y]\); 

    unitfieldplot = 
      Table[Arrow[unitField[x, y], Tail -> {x, y}], {x, \(-3\), 3, 
          0.5}, {y, \(-3\), 3, 0.5}]; 


    Show[unitfieldplot, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}]; \)

This plot of unitField[x, y] shows only direction and not speed of the flow.  You can also get the unitfieldplot with the option ScaleFactor -> Normalize:

\(unitfieldplot = 
      Table[Arrow[Field[x, y], Tail -> {x, y}, 
          ScaleFactor -> Normalize], {x, \(-3\), 3, 0.5}, {y, \(-3\), 3, 
          0.5}]; 


    Show[unitfieldplot, Axes -> Automatic, 
      AxesLabel -> {"x", "y"}]; \)

There's one more neat trick that folks like to do:  You can plot a scaled unit field plot, and color the vectors according to their magnitudes.  It's not too hard to do, but does require a little work first.

\(Clear[colorfieldplot, max, color]; 

    max = Max[
        Flatten[Table[
            Norm[N[Field[x, y]]], {x, \(-3\), 3,  .5}, {y, \(-3\), 
              3,  .5}]]]; 

    color[x_, y_] := 
      RGBColor[N[Norm[Field[x, y]]]\/max, 0, 
        1.  - N[Norm[Field[x, y]]]\/max]; 

    colorfieldplot = 
      Table[Arrow[unitField[x, y], Tail -> {x, y}, 
          VectorColor -> Evaluate[color[x, y]], 
          ScaleFactor -> 0.5], {x, \(-3\), 3,  .5}, {y, \(-3\), 
          3,  .5}]; 

Show[colorfieldplot, Axes -> Automatic]; \)

The hottest vectors are red and the coolest are blue.  
Not bad, huh?

T.5.a)

Plots of unit fields like the plot above are usually a joy to view but producing them has some inherent drawbacks. 
What are these drawbacks?

-> Because all the vectors are the same length, you are not able to use this plot to visualize the speed of the flow.  All you see is the direction.
-> If Field[x, y] has a complicated formula, then making the table of unit field vectors can burn a heck of a lot of computer time.
Still, when the conditions are right, unit field plots can be irresistible.
As always in Calculus&Mathematica, the choice is yours.

T.5.b)

Here's an unsuccessful attempt to plot unitField[x, y] for 
       Field[x, y] = {x, y}:

\(Clear[Field, x, y]; 
Field[x_, y_] = {x, y}; 
Clear[unitField]; 

    unitField[x_, y_] = Field[x, y]\/\@\(Field[x, y] . Field[x, y]\); 

    \(unitfieldplot = 
      Table[Arrow[unitField[x, y], Tail -> {x, y}], {x, \(-3\), 3, 
          0.5}, {y, \(-3\), 3, 0.5}]; 

    \(Show[unitfieldplot, Axes -> Automatic]; \)\)\)

Your job is to say why the plot didn't run successfully, and to replace it with a workable plot.

This plot went with Field[x, y] = {x, y}. 
It didn't run because it attempted to plot 
       unitField[x, y]={x,  y}/(Sqrt[(x^2)  +  (y^2)])   when {x, y} = {0, 0}.
This turned out to be garbage because
       unitField[0, 0] computes out to be {0,  0}/(Sqrt[(0^2)  +  (0^2)]),
and neither Mathematica nor anything else can make sense of this.
You can fix this by jiggling the plotting limits so the point {x, y} = {0, 0} doesn't come up in the plot:

\(unitfieldplot = 
      Table[Arrow[unitField[x, y], Tail -> {x, y}], {x, \(-3.1\), 2.9, 
          0.5}, {y, \(-3\), 3, 0.5}]; 

    \(Show[unitfieldplot, Axes -> Automatic]; \)\)

All right.