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
attributes⁡g1
vectorfield,coords=cartesianx,y
g2≔Gradient⁡r2,polarr,θ
attributes⁡g2
vectorfield,coords=polarr,θ
SetCoordinates⁡sphericalr,φ,θ
sphericalr,φ,θ
g3≔Gradient⁡r2⁢φ
attributes⁡g3
vectorfield,coords=sphericalr,φ,θ
Del⁡r2⁢φ
Gradient⁡
SetCoordinates⁡cartesianx,y,z
cartesianx,y,z
Del⁡x2+y2+z2
n1≔∇⁡x2+y2+z2
Del·n1
6
Del&xVectorField⁡y,−x,0
L≔VectorField⁡x,y,z&xDel
L⁡sin⁡x⁢y⁢z
L≔Del&xDel
L≔Curl@Gradient
L⁡f⁡x,y,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