Gradients
We must load the vector field plotting package
In[13]:=
Here is a simple function:
In[2]:=
In[3]:=
Out[3]=
Here are it's partial derivatives:
In[5]:=
Out[5]=
Out[6]=
In[7]:=
Here we define a function that gives us the gradient vector
In[9]:=
An example
In[12]:=
Out[12]=
Here we plot the vector field determined by the function
In[21]:=
Out[21]=
In[22]:=
Out[22]=
In[23]:=
Out[23]=
Here is a graph of our function
In[24]:=
Out[24]=
This is the norm of the gradient vector for this function. It is a cone.
In[25]:=
Out[25]=
Another view
In[32]:=
Out[32]=
Another example
In[34]:=
In[35]:=
Out[35]=
In[36]:=
Out[36]=
The partial derivatives
In[37]:=
Out[37]=
Out[38]=
A function defining the gradient
In[39]:=
Here is the gradient vector field
In[40]:=
Out[40]=
Here is the gradient vector field shown with more vectors plotted
In[44]:=
Out[44]=
Here is the countour plot of our surface
In[50]:=
Out[50]=
The gradient vector field and contour plot are shown together.
In[52]:=
Out[52]=
The norm of the gradient is graphed below
In[59]:=
Out[59]=
The graph of our function
In[60]:=
Out[60]=
Here they are shown together
In[61]:=
Out[61]=
Created by Mathematica (October 4, 2004)