Divergence - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

VectorCalculus

 Divergence
 compute the divergence of a vector field

 Calling Sequence Divergence(F)

Parameters

 F - (optional) vector field or a Vector valued procedure; specify the components of the vector field

Description

 • The Divergence(F) command computes the divergence of the vector field F.  This is a synonym for $\mathrm{Del}·F$ or DotProduct(Del, F).
 • If F is a Vector valued procedure, the default coordinate system is used, and it must be indexed by the coordinate names.  Otherwise, F must be a Vector with the vectorfield attribute set, and it must have a coordinate system attribute that is indexed by the coordinate names.
 • If F is a procedure, the returned object is a procedure. Otherwise, the returned object is an expression.
 • The Divergence() command returns the differential form of the divergence operator in the current coordinate system.  For more information, see SetCoordinates.

Examples

 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$
 > $\mathrm{SetCoordinates}\left({'\mathrm{cartesian}'}_{x,y,z}\right)$
 ${{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$ (1)
 > $F≔\mathrm{VectorField}\left(⟨{x}^{2},{y}^{2},{z}^{2}⟩\right)$
 > $\mathrm{Divergence}\left(F\right)$
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (2)
 > $\mathrm{Divergence}\left(\right)$
 $\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{\mathrm{VF}}}_{{1}}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{\mathrm{VF}}}_{{2}}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{\partial }}{{\partial }{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{\mathrm{VF}}}_{{3}}{}\left({x}{,}{y}{,}{z}\right)$ (3)
 > $\mathrm{.}\left(\mathrm{Del},F\right)$
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (4)
 > $\mathrm{.}\left(\mathrm{Nabla},F\right)$
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (5)
 > $\mathrm{DotProduct}\left(\mathrm{Del},F\right)$
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (6)
 > $\mathrm{Divergence}\left(\left(x,y,z\right)→\mathrm{PositionVector}\left(\left[\mathrm{sin}\left(x\right),\mathrm{cos}\left(y\right),\mathrm{tan}\left(z\right)\right]\right)\right)$
 $\left({x}{,}{y}{,}{z}\right){↦}{\mathrm{cos}}{}\left({x}\right){-}{\mathrm{sin}}{}\left({y}\right){+}{1}{+}{{\mathrm{tan}}{}\left({z}\right)}^{{2}}$ (7)
 > $\mathrm{SetCoordinates}\left({'\mathrm{polar}'}_{r,\mathrm{θ}}\right)$
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}$ (8)
 > $\mathrm{Divergence}\left(\left(r,\mathrm{θ}\right)→⟨f\left(r,\mathrm{θ}\right),g\left(r,\mathrm{θ}\right)⟩\right)$
 $\left({r}{,}{\mathrm{θ}}\right){→}\frac{{f}{}\left({r}{,}{\mathrm{θ}}\right){+}{r}{}\left(\frac{{\partial }}{{\partial }{r}}{}{f}{}\left({r}{,}{\mathrm{θ}}\right)\right){+}\frac{{\partial }}{{\partial }{\mathrm{θ}}}{}{g}{}\left({r}{,}{\mathrm{θ}}\right)}{{r}}$ (9)