Divergence - Maple Help

DifferentialGeometry[Tools]

 Divergence

 Calling Sequence Divergence(X)

Parameters

 X - a vector

Description

 • The divergence of a vector, as defined by the usual formula in vector calculus, is not an intrinsic operator which can be defined in a coordinate independent manner. Still, for a number of purposes it is helpful to have this simple procedure.
 • The command Divergence is part of the DifferentialGeometry:-Tools package, and so can be used in the form Divergence(...) only after executing the commands with(DifferentialGeometry) and with(Tools) in that order.  It can always be used in the long form DifferentialGeometry:-Tools:-Divergence.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{Tools}\right):$

Example 1.

First initialize a 3-dimensional manifold M with coordinates [x, y, z].

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $X≔\mathrm{DGzip}\left(\left[a,b,c\right]\left(x,y,z\right),\left[\mathrm{D_x},\mathrm{D_y},\mathrm{D_z}\right],"plus"\right)$
 ${X}{≔}{a}{}\left({x}{,}{y}{,}{z}\right){}{\mathrm{D_x}}{+}{b}{}\left({x}{,}{y}{,}{z}\right){}{\mathrm{D_y}}{+}{c}{}\left({x}{,}{y}{,}{z}\right){}{\mathrm{D_z}}$ (1)
 > $\mathrm{Divergence}\left(X\right)$
 $\frac{{\partial }}{{\partial }{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{c}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{b}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{a}{}\left({x}{,}{y}{,}{z}\right)$ (2)