divergence of a vector function
diverge(f, v, co)
vector or list of expressions
vector or list (same length as f) of the variables of f
(optional), is either of type `=` or a list of three elements. This option is used to compute the divergence in orthogonally curvilinear coordinate systems.
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Divergence], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function diverge computes the divergence of f with respect to v, where f is a vector function of the variables given by v.
The divergence of f with respect to v is defined as the sum of ∂∂vifi as i ranges over the length of f.
In the case of three dimensions, where f is a three-dimensional function of three variables and v is a list or a vector of three variables:
If the optional third argument co is of the form coords = coords_name or coords = coords_name([const]), diverge will operate on commonly used orthogonally curvilinear coordinate systems. See ?coords for the list of the coordinate systems supported by Maple.
For orthogonally curvilinear coordinates v, v, v
with unit vectors a, a, a, and scale factors
h, h, h.
Let the rectangular coordinates x, y, z be defined in terms of the
specified orthogonally curvilinear coordinates. We have:
h[n]^2 = [diff(x,v[n])^2 + diff(y,v[n])^2 + diff(z,v[n])^2], n=1,2,3.
The formula for the divergence of f is:
diverge(f) = 1/(h*h*h)*sum(diff(h*h*h*
If the optional third argument co is a list of three elements which specify the scale factors, diverge will operate on orthogonally curvilinear coordinate systems.
To compute the divergence in other orthogonally curvilinear coordinate systems, use the addcoords routine.
The two dimensional case is similar to the three dimensional one.
The command with(linalg,diverge) allows the use of the abbreviated form of this command.
define the scale factors in spherical coordinates
Download Help Document
What kind of issue would you like to report? (Optional)