Back to Problems

 

A brief discussions on derivative and the"Gradient"

H.Tahsiri

 

Vector Gradient

 

H.Tahsiri

<<Calculus`VectorAnalysis`
<<Graphics`PlotField3D`
<<Graphics`PlotField`
<<Graphics`Graphics3D`

 

u=y^2-x

           2
     -x + y

 

grd=Grad[u,Cartesian]


     {-1, 2 y, 0}

 

g1=PlotGradientField[u,{x,-3,3},{y,-3,3},PlotPoints->10];
[Graphics:gradientgr2.gif][Graphics:gradientgr1.gif]


 

g=Plot3D[u,{x,-3,3},{y,-3,3},Axes->Automatic,
PlotPoints->25,Shading->False]
[Graphics:gradientgr2.gif][Graphics:gradientgr3.gif]
c=ContourPlot[u,{x,-3,3},{y,-3,3},ContourShading->False,
Contours->10,PlotPoints->30];
[Graphics:gradientgr2.gif][Graphics:gradientgr4.gif]

 

Show[g1,c];
[Graphics:gradientgr2.gif][Graphics:gradientgr5.gif]

 

s=grd.grd

            2
     1 + 4 y

 

norm=grd/Sqrt[s]

              1               2 y
     {-(--------------), --------------, 0}
                    2                2
        Sqrt[1 + 4 y ]   Sqrt[1 + 4 y ]

 

Clear[x,y,z,u]

 

u2=17x-2x y/z+y^2 z^3

            2 x y    2  3
     17 x - ----- + y  z
              z

 

gradu2=Grad[u2,Cartesian]

           2 y  -2 x        3  2 x y      2  2
     {17 - ---, ---- + 2 y z , ----- + 3 y  z }
            z    z               2
                                z

 

g3=PlotGradientField3D[ u2,{x,-1,1},{y,-1,1},{z,1,2},
VectorHeads->True,PlotPoints->3,Axes->Automatic];

 

Show[g3,ViewPoint->{-4.000, -4.000, 4.000},Axes->Automatic]
[Graphics:gradientgr2.gif][Graphics:gradientgr6.gif]
PlotVectorField[{-x,y},{x,-1,1},{y,-1,1}];
[Graphics:gradientgr2.gif][Graphics:gradientgr7.gif]

 

PlotVectorField[{x,0},{x,-1,1},{y,-1,1},PlotPoints->7,
Axes->True];
[Graphics:gradientgr2.gif][Graphics:gradientgr8.gif]

 

PlotVectorField[{0,y},{x,-1,1},{y,-1,1},PlotPoints->7,
Axes->True];
[Graphics:gradientgr2.gif][Graphics:gradientgr9.gif]

 

PlotVectorField[{x,-y},{x,-1,1},{y,-1,1},PlotPoints->7,
Axes->True];
[Graphics:gradientgr2.gif][Graphics:gradientgr10.gif]

 

PlotVectorField[{-x,-y},{x,-1,1},{y,-1,1},PlotPoints->7,
Axes->True];
[Graphics:gradientgr2.gif][Graphics:gradientgr11.gif]

 

<<Graphics`PlotField3D`

 

PlotVectorField3D[{x,y,z},{x,-1,1},{y,-1,1},{z,-1,1},
VectorHeads->True,PlotPoints->4,Boxed->False,Axes->True];
[Graphics:gradientgr2.gif][Graphics:gradientgr12.gif]

Back to Problems