## Gradient(function, [varlist], [mode])

function
This is defined by the mode parameter as cartesian coordinates (mode=0), cylindrical coordinates (mode=1) or spherical coordinates (mode=2).

[varlist]
This parameter is optional and when not defined uses the following values.
mode=0 : [x, y, z]
mode=1 : [r, Φ, z]
mode=2 : [r, θ, Φ]

When other variables are used these have to be declared in the varlist as [ var1 , var2 , var3 , ...].

[mode]
The default value is 0.

## Description

Returns the Gradient of the function.

This is normally denoted as Grad(F) = ∇F

## Examples

Gradient(x+y^2, [x, y])
Gradient(x^2*y^3, [x, y])
Gradient(1/sqrt(x^2+y^2+z^2))
Gradient(sin(x)*exp(y)*ln(z))
Gradient([a/b, c*d^2, a^2*c], [d, c])
Gradient([x*y/z, y*z^2, z^2*x])

## Cartesian coordinate system

Gradient(f(x, y, z))

## Cylindrical coordinate system

Gradient(f(r, @phi, z), [r, @phi, z], 1)

## Spherical coordinate system

Gradient(f(r, @theta, @phi), [r, @theta, @phi], 2)

## References

http://mathworld.wolfram.com/Gradient.html
http://en.wikipedia.org/wiki/Gradient

## Related Functions

Curl, Duf, Hessian, Jacobian, Laplacian, SurfaceNormal, Divergence