VC.03 The Gradient
 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."; 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]; \)

L.1)

Calculate the gradient, ∇f[x, y] = gradf[x, y], of 
       f[x, y] = (e^(-((x^2)/2  +  (y^2)/4))).
Calculate the gradient, ∇f[x, y] = gradf[x, y], of  
       f[x, y] = (e^(-3 x y)).
Calculate the gradient, ∇f[x, y] = gradf[x, y, z], of 
       f[x, y, z] = x Sin[x y z].

L.2)

Go with 
       f[x, y]=(0.6/(1  +  1.2 (x^2)  +  1.4 (y^2))), 
and look at a plot of gradf[x, y] with tails at {x, y} for some selected points {x, y} in the vicinity of {0, 0}:

\(Clear[x, y, f, gradf]; 

    f[x_, y_] = 0.6\/\(1 + 1.2\ x\^2 + 1.4\ y\^2\); 

    \(gradf[x_, y_] = {∂\_x f[x, y], ∂\_y f[x, y]}; 
    \)\)Show[
      Table[Arrow[gradf[x, y], Tail -> {x, y}], {x, -1, 1, 0.5}, {y, 
          -1, 1, 0.5}], Axes -> True, 
      AxesLabel -> {"x", "y"}];

Why are these gradient vectors so attracted to the point {0, 0}?

L.3)

Go with 
       f[x, y] = 0.6 (1 + 1.2  (x^2) +  1.4  (y^2)), 
and look at a plot of gradf[x, y] with tails at {x, y} for some selected points {x, y} in the vicinity of {0, 0}:

Clear[x, y, f, gradf]f[x_, y_] = 0.6 (1 + 1.2 (x^2) + 1.4 (y^2)); gradf[x_, y_] = {(∂_x) f[x, y], (∂_y) f[x, y]}; 
    Show[
      Table[Arrow[gradf[x, y], Tail -> {x, y}], {x, -1, 1, 0.5}, {y, 
          -1, 1, 0.5}], Axes -> True, 
      AxesLabel -> {"x", "y"}];

Why are these gradient vectors so repelled by the point {0, 0}?

L.4)

Given a certain function f[x, y], you find that the plot of gradf[x, y] with tails at {x, y} for some selected points {x, y} in the vicinity of {0, 0} looks like this:

\(Clear[x, y, f, gradf]; 

    f[x_, y_] = 0.2\ \((1 + 1.2\ x\^2 - 1.4\ y\^2)\); 

    \(gradf[x_, y_] = {∂\_x f[x, y], ∂\_y f[x, y]}; 
    \)\)Show[
      Table[Arrow[gradf[x, y], Tail -> {x, y}], {x, -1, 1, 0.5}, {y, 
          -1, 1, 0.5}], Axes -> True, 
      AxesLabel -> {"x", "y"}];

Explain why this plot suggests that when you go with a point {x, y} with -1 < x < 1 and -1 < y < 1, then you can expect that:
-> If x > 0, then increasing x results in increasing f[x, y].
-> If x < 0, then increasing x results in decreasing f[x, y].
-> If y > 0, then increasing y results in decreasing f[x, y].
-> If y < 0, then increasing y results in increasing f[x, y].

L.5)

You are at the point {1, 0}. 
In the direction of what vector should you step off {1, 0} in order to get the greatest initial increase in the function 
       f[x, y] = (x^2) + 7  x (e^y)?
In the direction of what vector should you step off {1, 0} in order to get the greatest initial decrease in the function 
       f[x, y] = (x^2) + 7  x (e^y)?

L.6)

Discuss the general idea behind Mathematica's FindMinimum instruction.

L.7)

Go with
       f[x, y, z] = x y Sin[z]. 
In which direction should you leave the point {1, 2, 0} to get the greatest possible initial increase of f[x, y, z]?
In which direction should you leave the point {1, 2, 0} to get the greatest possible initial decrease of f[x, y, z]?

L.8)

Here are side-by-side plots of the negative gradient field of a certain function f[x, y], and a contour plot of the same function.

Clear[f, gradf, x, y]f[x_, y_] = 1.2 (E^((x^2))) + 2.9 (E^((y^2))) - 8.2 x y; gradf[x_, y_] = {(∂_x) f[x, y], (∂_y) f[x, y]}; 
    minimizer = {0.989761, 0.771567}; min = Graphics[{PointSize[0.05], Point[minimizer]}]; Clear[neggradf]neggradf[x_, y_] = -gradf[x, y]; scalefactor = 0.013; h = 0.2; neggradfieldplot = 
      Table[Arrow[scalefactor neggradf[x, y], Tail -> {x, y}], {x, 
          0.9 - h, 0.9 + h, (h/4)}, {y, 0.7 - h, 0.7 + h, (h/4)}]; neggrads = 
      Show[min, neggradfieldplot, Axes -> Automatic, 
        AxesLabel -> {"x", "y"}, 
        DisplayFunction -> Identity]; contours = 
      ContourPlot[f[x, y], {x, 0.9 - h, 0.9 + h}, {y, 0.7 - h, 0.7 + h}, 
        Contours 
          -> {2.19, 2.195, 2.2, 2.25, 2.3, 2.35, 2.4, 2.45, 2.50, 2.55, 
            2.6, 2.7, 2.8, 2.9, 3.0}, DisplayFunction -> Identity]; 
    levels = 
      Show[min, contours, AxesLabel -> {"x", "y"}, 
        DisplayFunction -> Identity]; Show[GraphicsArray[{neggrads, contours}], 
      DisplayFunction -> $DisplayFunction];

And here's a plot of the surface z = f[x, y] (for the same function f[x, y]) with a pole planted at the deepest dip:

surface = 
      Plot3D[f[x, y], {x, 0.9 - h, 0.9 + h}, {y, 0.7 - h, 0.7 + h}, 
        ViewPoint -> CMView, Axes -> {Automatic, Automatic, None}, 
        AxesLabel -> {"x", "y", None}, Boxed -> False, 
        PlotRange -> All, DisplayFunction -> Identity]; lowpoint = 
      Graphics3D[{Thickness[0.01], 
          Line[{{0.989761, 0.771567, f[0.989761, 0.771567]}, {0.989761, 
                0.771567, 4}}]}]; Show[surface, lowpoint, DisplayFunction -> $DisplayFunction];

Explain why a literate person will say that all three plots are in total harmony.

L.9)

The point {1, 1} is on the level curve 
       (x^2) (y^3) (e^(x  +  y)) = 7.38906:
Here's a plot of part of this level curve with axes going through the point {1, 1}:

level = 
      Show[ContourPlot[
          (x^2) (y^3) (E^(x + y)), {x, 0.5, 1.5}, {y, 0.5, 1.5}, 
          Contours -> {7.38906}, ContourShading -> False, 
          DisplayFunction -> Identity]]; Show[Graphics[{PointSize[0.02], Point[{1, 1}]}], level, 
      DisplayFunction -> $DisplayFunction, Axes -> True, 
      AxesLabel -> {"x", "y"}];

Pencil in a vector with its tail at {1, 1} that points in the same direction as gradf[1, 1].

L.10)

Here is the level surface 
       f[x, y, z]=(x^2)+((((y/2)))^2)+ (z^2)=1 
together with a selection of gradient vectors of f[x, y, z] with tails at the points at which they are calculated:

\(Clear[f, gradf, x, y, z]; 

    f[x_, y_, z_] = x\^2 + \((y\/2)\)\^2 + z\^2; 

    \(gradf[x_, y_, z_] = {∂\_x f[x, y, z], 
        ∂\_y f[x, y, z], ∂\_z f[x, y, z]}; \)\)\(Clear[x, y, z, r, s, t]; 
    
{x[r_, s_, t_], y[r_, s_, t_], z[r_, s_, t_]} = {r\ Sin[s]\ Cos[t], 
        3\ r\ Sin[s]\ Sin[t], r\ Cos[s]}; 

    \({{slow, shigh}, {tlow, thigh}} = {{0, π}, {0, 2\ π}}; \)\)\(Clear[plotter]; 

    plotter[s_, t_] = {x[1, s, t], y[1, s, t], z[1, s, t]}; 

    \(levelplot = 
      ParametricPlot3D[
        Evaluate[plotter[s, t]], {s, slow, shigh}, {t, tlow, thigh}, 
        DisplayFunction -> Identity]; \)\)Show[levelplot, 
      Table[Arrow[gradf[x[1, s, t], y[1, s, t], z[1, s, t]], 
          Tail -> {x[1, s, t], y[1, s, t], z[1, s, t]}], {s, slow, 
          shigh, (π/4)}, {t, tlow, thigh, (π/4)}], Boxed -> False, 
      BoxRatios -> Automatic, Axes -> None, PlotRange -> All, 
      ViewPoint -> CMView, DisplayFunction -> $DisplayFunction];

Explain:
-> Why you are not surprised by the fact that the plotted gradient vectors are perpendicular to the level surface.
-> Why these gradient vectors point out away from the surface and not in toward the interior of the surface.

L.11)

Does 
       f[x, y] = (x^6) -  3  (x^2) y +  (y^4) -  6  x +  5  y 
have a maximizer or minimizer?  How do you know?

Does 
       f[x, y] = 
        (e^(-(x^2)/2  -  (y^2)/2)) ((x^6) +  7  (y^3) +  4) 
have a maximizer or a minimizer?  How do you know?

Does 
       f[x, y]=(((x^5)  +   3 (y^2))/(1  +   (x^4)  +   (y^6))) 
have a maximizer or a minimizer?  How do you know?

L.12)

You are sitting at a given point {(Subscript[x, 0]), (Subscript[y, 0]), (Subscript[z, 0])}, and are trying to study a function f[x, y, z].  As you leave this point in the direction of a vector U, is it true that the function f[x, y, z] initially goes up if U . gradf[(Subscript[x, 0]), (Subscript[y, 0]), (Subscript[z, 0])] > 0 and intially goes down if U . gradf[(Subscript[x, 0]), (Subscript[y, 0]), (Subscript[z, 0])] < 0?

L.13)

You are trying to minimize a function f[x, y, z] subject to the constraint that {x, y, z} must lie on a given line in 3D.  Explain why you want to become very interested in points on the line at which 
       ∇f[x, y, z] = gradf[x, y, z] 
is perpendicular to the line.

L.14)

When you are trying to find the highest crest or the deepest dip on the plot of a surface z = f[x, y], why do you become interested in solving gradf[x, y] = {0, 0} for x and y?

L.15)

Use the total differential of f[x, y] = x y to give a quick hand derivation of the "product rule" formula
       D[x[t] y[t], t]=x'[t] y[t]+ x[t] y'[t].
Use the total differential of f[x, y]=(x/y) to give a quick hand derivation of the "quotient rule" formula
       D[x[t]/y[t],t]=((x'[t])/(y[t]))- ((x[t] y'[t])/(y[t]^2)) 
       
       =((x'[t] y[t] - x[t] y'[t])/(y[t]^2)).

L.16)

How is the total differential related to this: 
       ∇f[x, y] . {dx, dy} = {
            ∂f[x, y]/∂x, 
            ∂f[x, y]/∂y} . {dx, 
            dy}?

L.17)

The chain rule formulas say:
-> D[f[x[t]], t]=f'[x[t]] x'[t].
-> (D[f[x[t], y[t]], t]=gradf[x[t], y[t]].{x'[t],y'[t]}).
-> D[f[x[t], y[t], z[t]], t]=
	    gradf[x[t], y[t], z[t]].{x'[t],y'[t],z'[t]}.
The fundamental formula of calculus and the chain rule for functions of one variable give you the clean formula
       (∫_a^b) g'[x[t]] x'[t]dt=g[x[b]] -  g[x[a]].
Use the fundamental formula of calculus and the chain rule
       D[f[x[t], y[t]], t]=gradf[x[t], y[t]].{x'[t],y'[t]} 
 to give a clean formula for
       (∫_a^b) gradf[x[t], y[t]].{x'[t],y'[t]}dt.
If you are given that a = 0, and b = 2  π, and 
       x[t] = Cos[t], and 
       y[t] = Sin[t], 
explain why you also know
       (∫_a^b) gradf[x[t], y[t]].{x'[t],y'[t]}dt=0.

L.18)

Lots of folks like to use the notations   
       (f^((1, 0)))[x, y]=∂f[x, y]/∂x=D[f[x, y], x] 
and 
       (f^((0, 1)))[x, y]=∂f[x, y]/∂y=D[f[x, y], y]
Calculate 
       ∂f[x, y]/∂x=(f^((1, 0)))[x, y]
and calculate
       ∂f[x, y]/∂y=(f^((0, 1)))[x, y]
for 
     f[x, y] = (e^((x^2)/2  -  3  (y^2)))

L.19)

Calculate 
       ∂f[x, y, z]/∂z=(f^((0, 0, 1)))[x, y, z]
by hand for 
     f[x, y, z] = Sin[(x^2) (y^3) (z^4)].

L.20)

Here is 
       ∂f[x, y]/∂x=(f^((1, 0)))[x, y]
for
       f[x, y] = (e^Sin)[x y -  x]:

\(Clear[f, x, y]; 
f[x_, y_] = E\^Sin[x\ y - x]; 
D[f[x, y], \ x]\)

And here is
       ∂f[2.3,  8.4]/∂x=(f^((1, 0)))[2.3, 8.4]
for the same function:

D[f[x, y],  x] /. {x -> 2.3, y -> 8.4}

What does this calculation tell you about what happens to f[x, y] when you hold y at 8.4, but make x just a teensy-weensy bit bigger than 2.3?

L.21)

Put 
       f[x, y] = Sin[2  x -  3  y],
and say what
       3∂f[x, y]/∂x+ 2 ∂f[x, y]/∂y 
calculates out to.
When you go with any function g[x], and you put 
       f[x, y] = g[2  x - 3  y], 
then what does 
       3∂f[x, y]/∂x+ 2 ∂f[x, y]/∂y
calculate out to?