Grad
Grad[f]
gives the gradient,
, of the scalar function f in the default coordinate system.
Grad[f,coordsys]
gives the gradient of f in the coordinate system coordsys.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
VectorAnalysis`
VectorAnalysis`
Grad
As of Version 9.0, vector analysis functionality is built into the Wolfram Language »
Grad[f]
gives the gradient,
, of the scalar function f in the default coordinate system.
Grad[f,coordsys]
gives the gradient of f in the coordinate system coordsys.
Details and Options
- To use Grad, you first need to load the Vector Analysis Package using Needs["VectorAnalysis`"].
Examples
Basic Examples (1)
Needs["VectorAnalysis`"]Gradient of a function in Cartesian coordinates:
f = Xx ^ 2 + Yy E ^ (Zz);{v1, v2, v3} = Grad[f]Clear[f]Recover the original function using DSolve:
sol = DSolve[{D[f[Xx, Yy, Zz], Xx] == v1, D[f[Xx, Yy, Zz], Yy] == v2, D[f[Xx, Yy, Zz], Zz] == v3}, f, {Xx, Yy, Zz}]f[Xx, Yy, Zz] /. sol[[1]] /. {C[1] -> 0}