VectorCalculus
Gradient
compute the gradient of a function from R^n to R
Del
Vector differential operator
Nabla
Calling Sequence
Parameters
Description
Examples
Gradient(f, c)
Del(f, c)
Nabla(f, c)
Gradient()
Del()
Nabla()
f
-
algebraic expression
c
(optional) list(name) or name[name, name, ...]; specify the list of variable names or coordinate system indexed by coordinate names
The Gradient(f, c) command computes the gradient of the expression f. The result is a vector field.
If c is a list of names, the gradient is taken in the current default coordinate system by using the names in c as the coordinate names. If the number of given names is not compatible with this coordinate system, an error is raised.
If c is a name indexed by other names, the gradient is computed in this coordinate system by using the indices as the coordinate names. If the number of names is not compatible with the coordinate system, an error is raised.
If c is not specified, the current default coordinates are used. The default coordinates must be indexed by coordinate names, otherwise an error is raised.
The command Del(f, c) is just a synonym for Gradient(f, c). However, Del is also recognized as the Vector differential operator that is used with DotProduct and CrossProduct as shortcuts for Curl, Divergence, Gradient, and Laplacian.
The Gradient() command returns the differential form of the gradient operator in the current coordinate system. For more information, see SetCoordinates.
Nabla is a synonym for Del.
with⁡VectorCalculus:
g1≔Gradient⁡x2+y2,x,y
g1≔2⁢xe_x+2⁢ye_y
attributes⁡g1
vectorfield,coords=cartesianx,y
g2≔Gradient⁡r2,polarr,θ
g2≔2⁢re_r+0e_θ
attributes⁡g2
vectorfield,coords=polarr,θ
SetCoordinates⁡sphericalr,φ,θ
sphericalr,φ,θ
g3≔Gradient⁡r2⁢φ
g3≔2⁢r⁢φe_r+re_φ+0e_θ
attributes⁡g3
vectorfield,coords=sphericalr,φ,θ
Del⁡r2⁢φ
2⁢r⁢φe_r+re_φ+0e_θ
Gradient⁡
∂∂rSF ⁡r,φ,θe_r+∂∂φSF ⁡r,φ,θre_φ+∂∂θSF ⁡r,φ,θr⁢sin⁡φe_θ
SetCoordinates⁡cartesianx,y,z
cartesianx,y,z
Del⁡x2+y2+z2
2⁢xe_x+2⁢ye_y+2⁢ze_z
n1≔∇⁡x2+y2+z2
n1≔2⁢xe_x+2⁢ye_y+2⁢ze_z
Del·n1
6
Del&xVectorField⁡y,−x,0
0e_x+0e_y+−2e_z
L≔VectorField⁡x,y,z&xDel
L≔e↦&x⁡xe_x+ye_y+ze_z,Gradient⁡e
L⁡sin⁡x⁢y⁢z
y2⁢x⁢cos⁡x⁢y⁢z−z2⁢x⁢cos⁡x⁢y⁢ze_x+−x2⁢y⁢cos⁡x⁢y⁢z+z2⁢y⁢cos⁡x⁢y⁢ze_y+x2⁢z⁢cos⁡x⁢y⁢z−y2⁢z⁢cos⁡x⁢y⁢ze_z
L≔Del&xDel
L≔Curl@Gradient
L⁡f⁡x,y,z
0e_x+0e_y+0e_z
See Also
attributes
convert/PhysicsVectors
Physics/Vectors
Physics/Vectors/Gradient
plots[gradplot3d]
plots[gradplot]
Student[MultivariateCalculus][Gradient]
Student[VectorCalculus][Gradient]
VectorCalculus[Curl]
VectorCalculus[Divergence]
VectorCalculus[Laplacian]
VectorCalculus[SetCoordinates]
VectorCalculus[Vector]
VectorCalculus[VectorField]
Download Help Document
What kind of issue would you like to report? (Optional)