gives the gradient in the coordinates chart.

# Details

• Grad[f,x] can be input as xf. The character can be typed as del or \[Del]. The list of variables x is entered as a subscript.
• An empty template can be entered as grad, and moves the cursor from the subscript to the main body.
• All quantities that do not explicitly depend on the variables given are taken to have zero partial derivative.
• If f is an array of dimensions {n1,,nk}, then Grad[f,{x1,,xm}] yields an array of dimensions {n1,,nk,m}.
• If f is a scalar, Grad[f,{x1,x2,,xn},chart] returns a vector in the orthonormal basis associated with chart.
• In Grad[f,{x1,,xn},chart], if f is an array, it must have dimensions {n,,n}. The components of f are interpreted as being in the orthonormal basis associated with chart.
• Coordinate charts in the third argument of Grad can be specified as triples {coordsys,metric,dim} in the same way as in the first argument of CoordinateChartData. The short form in which dim is omitted may be used.
• Grad works with SparseArray and StructuredArray objects.

# Examples

open allclose all

## Basic Examples(4)

The gradient in three-dimensional Cartesian coordinates:

 In[1]:=
 Out[1]=

The gradient using an orthonormal basis for three-dimensional cylindrical coordinates:

 In[1]:=
 Out[1]=

 In[1]:=
 Out[1]=

Use del to enter and to enter the list of subscripted variables:

 In[1]:=
 Out[1]=

Use grad to enter the template ; press to move between inputs:

 In[2]:=
 Out[2]=