Gradient+Vector+Fields


 * Gradient Vector Fields**

[|Gradient YouTube Playlist]

[|GeoGebra 1D Gradient Field Applet]

These graphs can also be done using **FOSS Sage **: [|Ex1], [|Ex2], [|Ex3], [|Ex4]

Unless otherwise noted, @@@ number from gradient command D[]
 * Mathematica Commands **

g[x_,y_]:=x^2-4*x+y^2+2*y Plot3D[g[x,y],{x,-5,5},{y,-5,5},BoxRatios->{1,1,1}] Show[Plot3D[g[x,y],{x,-5,5},{y,-5,5}, BoxRatios->{1,1,1}], Graphics3D[{PointSize[.05],Red,Point[{2,-1,-5}]}]] ContourPlot[g[x,y],{x,-5,5},{y,-5,5}] D[g[x,y],] VectorPlot[Out[@@@],{x,-5,5},{y,-5,5}, GridLines->Automatic, GridLinesStyle->Directive[Gray,Dashed], VectorPoints->{11,11}, VectorScale->{.07,.6}, VectorStyle->Red]
 * [|Example 1 Paraboloid: 2D Gradient Field]**

g[x_,y_]:=Sqrt[x^2+y^2] Plot3D[g[x,y],{x,-5,5},{y,-5,5},BoxRatios->{1,1,1}] Show[Plot3D[g[x,y],{x,-5,5},{y,-5,5}, BoxRatios->{1,1,1}], Graphics3D[{PointSize[.05],Red,Point[{0,0,0}]}]] ContourPlot[g[x,y],{x,-5,5},{y,-5,5}] D[g[x,y],] VectorPlot[Out[@@@],{x,-5,5},{y,-5,5}, GridLines->Automatic, GridLinesStyle->Directive[Gray,Dashed], VectorPoints->{11,11}, VectorScale->{.07,.6}, VectorStyle->Red]
 * [|Example 2 Cone: 2D Gradient Field]**

g[x_,y_]:=4+x^3+y^3-3*x*y Show[Plot3D[g[x,y],{x,-1,2},{y,-1,2}, BoxRatios->{1,1,1}], Graphics3D[{PointSize[.05], Red,Point[{1,1,3}]}], Graphics3D[{PointSize[.05],Green,Point[{0,0,4}]}]] ContourPlot[g[x,y],{x,-1,2},{y,-1,2}] D[g[x,y],] VectorPlot[Out[@@@],{x,-1,2},{y,-1,2},VectorPoints->{13,13}, VectorScale->{.08,.7}, VectorStyle->Red, GridLines->Automatic, GridLinesStyle->Directive[LightGray,Dashed]] Show[Out[@@@],Out[@@@],Graphics[{PointSize[.05],Blue, Point[{1,1}]}], Graphics[{PointSize[.05],Green,Point[{0,0}]}]] @@@ numbers from ContourPlot and VectorPlot
 * [|Example 3: 2D Gradient Field]**

g[x_,y_]:=y/x Plot3D[g[x,y],{x,-3,3},{y,-3,3},BoxRatios->{1,1,1}] ContourPlot[g[x,y],{x,-3,3},{y,-3,3}] D[g[x,y],] VectorPlot[Out[@@@], {x, -1, -.5}, {y, -1, 1}, VectorPoints -> {11, 11}, VectorScale -> Small] VectorPlot[Out[@@@], {x,.5, 1}, {y, -1, 1}, VectorPoints -> {11, 11}, VectorScale -> Small]
 * [|Example 4: 2D Gradient Field]**

VectorPlot[{-y,x},{x,-2,2},{y,-2,2},VectorPoints->{13,13},VectorScale->{.1,.6},VectorStyle->Red,GridLines->Automatic,GridLinesStyle->Directive[LightGray,Dashed]]VectorPlot[{Sin[y],Cos[x]},{x,-2*Pi,2*Pi},{y,-2*Pi,2*Pi}] VectorPlot[{Sin[y],Cos[x]},{x, -Pi, Pi}, {y, -Pi, Pi},VectorPoints->{13,13},VectorScale->{.7,.6},VectorStyle->Red,GridLines->Automatic,GridLinesStyle->Directive[LightGray,Dashed]]
 * [|Vector Fields that are NOT Gradient Fields]**
 * VectorPlot[{-y,x},{x,-2,2},{y,-2,2}]**
 * VectorPlot[{Sin[y],Cos[x]},{x,-2*Pi,2*Pi},{y,-2*Pi,2*Pi}]**

g[x_,y_,z_]:=x^2-0.5*y^2*z^2, ContourPlot3D[g[x,y,z],{x,0,2}, {y,-2,2},{z,-3,3}, PlotPoints->{7,7,7}], D[g[x,y,z],], VectorPlot3D[Out[@@@], {x,0,2}, {y,-2,2}, {z,-3,3}, VectorPoints->{11,11,11}, VectorScale->{0.08,0.2}, VectorColorFunction->Hue] * *
 * [|3D Gradient Fields]:**