|
Calling Sequence
|
|
diverge(f, v)
diverge(f, v, co)
|
|
Parameters
|
|
f
|
-
|
vector or list of expressions
|
v
|
-
|
vector or list (same length as f) of the variables of f
|
co
|
-
|
(optional), is either of type `=` or a list of three elements. This option is used to compute the divergence in orthogonally curvilinear coordinate systems.
|
|
|
|
|
Description
|
|
•
|
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 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[1], v[2], v[3]
|
with unit vectors a[1], a[2], a[3], and scale factors
|
h[1], h[2], h[3].
|
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[1]*h[2]*h[3])*sum(diff(h[1]*h[2]*h[3]*
|
f[n]/h[n],v[n]),n=1..3)
|
|
|
|
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.
|
|
|
Examples
|
|
Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[Divergence], instead.
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
| (3) |
define the scale factors in spherical coordinates
>
|
|
>
|
|
| (4) |
|
|
|