differential_operators - Maple Help

Home : Support : Online Help : Physics : Vectors : differential_operators

Physics[Vectors][Curl] - compute the curl by using the nabla differential operator

Physics[Vectors][Divergence] - compute the divergence by using the nabla differential operator

Physics[Vectors][Laplacian] - compute the Laplacian by using the nabla differential operator

 Calling Sequence Curl(A) Divergence(A) Gradient(A) Laplacian(A) Remark: these calling sequences are also valid with the inert %Curl, %Divergence, %Gradient, %Laplacian commands

Parameters

 A - any algebraic (vector or scalar) expression

Description

 • Curl, Divergence, Gradient and Laplacian, respectively return the curl, the divergence, the gradient and the Laplacian of a given vectorial or scalar function. When the command's name is prefixed by $%$, an unevaluated representation for these operations is returned.
 • The %Curl, %Divergence, %Gradient and %Laplacian are the inert forms of Curl, Divergence, Gradient and Laplacian, that is: they represent the same mathematical operations while holding the operations unperformed. To activate the operations use value.
 • Curl, Divergence and Gradient check their arguments (for consistency) before sending the task to Nabla. So, if $\mathrm{A_}$ is a vector, then Gradient(A_) will interrupt the computation with an error message, as well as Divergence(A) and Curl(A) when $A$ is a scalar (not a vector). All these differential operations are realized just w.r.t the geometrical coordinates $\left\{\mathrm{\phi },r,\mathrm{\rho },\mathrm{\theta },x,y,z\right\}$. Therefore, if $A$ does not depend on these global geometrical coordinates, these commands (as well as Nabla) return 0.
 • For the conventions about the geometrical coordinates and vectors see ?conventions

Examples

 > $\mathrm{with}\left(\mathrm{Physics}\left[\mathrm{Vectors}\right]\right)$
 $\left[{\mathrm{&x}}{,}{\mathrm{+}}{,}{\mathrm{.}}{,}{\mathrm{ChangeBasis}}{,}{\mathrm{ChangeCoordinates}}{,}{\mathrm{Component}}{,}{\mathrm{Curl}}{,}{\mathrm{DirectionalDiff}}{,}{\mathrm{Divergence}}{,}{\mathrm{Gradient}}{,}{\mathrm{Identify}}{,}{\mathrm{Laplacian}}{,}{\nabla }{,}{\mathrm{Norm}}{,}{\mathrm{Setup}}{,}{\mathrm{diff}}\right]$ (1)
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (2)

 > $\mathrm{Gradient}\left(f\left(x,y,z\right)\right)$
 $\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right)\right){}\stackrel{{\wedge }}{{i}}{+}\left(\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right)\right){}\stackrel{{\wedge }}{{j}}{+}\left(\frac{{\partial }}{{\partial }{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right)\right){}\stackrel{{\wedge }}{{k}}$ (3)

The Divergence of a Gradient is equal to the Laplacian

 > $\mathrm{Divergence}\left(\mathrm{Gradient}\left(f\left(x,y,z\right)\right)\right)$
 $\frac{{{\partial }}^{{2}}}{{\partial }{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{{\partial }}^{{2}}}{{\partial }{{y}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{{\partial }}^{{2}}}{{\partial }{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right)$ (4)
 > $\mathrm{Laplacian}\left(f\left(x,y,z\right)\right)$
 $\frac{{{\partial }}^{{2}}}{{\partial }{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{{\partial }}^{{2}}}{{\partial }{{y}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right){+}\frac{{{\partial }}^{{2}}}{{\partial }{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}\right)$ (5)

The Laplacian of a vector function in spherical coordinates

 > $\mathrm{Laplacian}\left(\mathrm{A_}\left(r,\mathrm{\theta },\mathrm{\phi }\right)\right)$
 $\frac{\left(\frac{{{\partial }}^{{2}}}{{\partial }{{r}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\stackrel{{\to }}{{A}}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}{r}{+}{2}{}\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\stackrel{{\to }}{{A}}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)}{{r}}{+}\frac{\left(\frac{{{\partial }}^{{2}}}{{\partial }{{\mathrm{\theta }}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\stackrel{{\to }}{{A}}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}\left(\frac{{\partial }}{{\partial }{\mathrm{\theta }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\stackrel{{\to }}{{A}}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{+}\frac{\frac{{{\partial }}^{{2}}}{{\partial }{{\mathrm{\phi }}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\stackrel{{\to }}{{A}}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)}{{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}$ (6)

The Curl of a Gradient is identically zero

 > $\mathrm{eq}≔\mathrm{Gradient}\left(A\left(r,\mathrm{\theta },\mathrm{\phi }\right)\right)$
 ${\mathrm{eq}}{≔}\left(\frac{{\partial }}{{\partial }{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{A}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}\stackrel{{\wedge }}{{r}}{+}\frac{\left(\frac{{\partial }}{{\partial }{\mathrm{\theta }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{A}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}\stackrel{{\wedge }}{{\mathrm{\theta }}}}{{r}}{+}\frac{\left(\frac{{\partial }}{{\partial }{\mathrm{\phi }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{A}{}\left({r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}\stackrel{{\wedge }}{{\mathrm{\phi }}}}{{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}$ (7)
 > $\mathrm{Curl}\left(\mathrm{eq}\right)$
 ${0}$ (8)

Depending on the context the inert representations of these commands, obtained by prefixing the command's name with %, serve better the purpose of representing the mathematical objects

 > $\mathrm{%Gradient}\left(A\left(r,\mathrm{\theta },\mathrm{\phi }\right)\right)$
 ${\mathrm{%Gradient}}{}\left({A}{}\left({r}{,}{\mathrm{θ}}{,}{\mathrm{φ}}\right)\right)$ (9)
 > $\mathrm{Curl}\left(\right)$
 ${0}$ (10)

The Curl of non-projected vector function (note the underscore in 'V_' to represent vectors)

 > $\mathrm{eq}≔\mathrm{Curl}\left(\mathrm{V_}\left(r,\mathrm{\theta },\mathrm{\phi }\right)\right)$
 ${\mathrm{Curl}}{}\left({\mathrm{V_}}{}\left({r}{,}{\mathrm{θ}}{,}{\mathrm{φ}}\right)\right)$ (11)

The Divergence of a Curl is identically zero

 > $\mathrm{Divergence}\left(\mathrm{eq}\right)$
 ${0}$ (12)

The Divergence and Curl of a projected vector function (projected vectors don't need an "arrow"  - the underscore "_" mentioned in the previous example to be represented)

 > $V≔\mathrm{_r}+\mathrm{f1}\left(\mathrm{\theta },\mathrm{\phi }\right)\mathrm{_θ}+\mathrm{f2}\left(\mathrm{\theta },\mathrm{\phi }\right)\mathrm{_φ}$
 ${V}{≔}\stackrel{{\wedge }}{{r}}{+}{\mathrm{f1}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right){}\stackrel{{\wedge }}{{\mathrm{\theta }}}{+}{\mathrm{f2}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right){}\stackrel{{\wedge }}{{\mathrm{\phi }}}$ (13)
 > $\mathrm{Divergence}\left(V\right)$
 $\frac{{2}}{{r}}{+}\frac{\left(\frac{{\partial }}{{\partial }{\mathrm{\theta }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{f1}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}{\mathrm{f1}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}{{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{+}\frac{\frac{{\partial }}{{\partial }{\mathrm{\phi }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{f2}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right)}{{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}$ (14)
 > $\mathrm{Curl}\left(V\right)$
 $\frac{\left(\left(\frac{{\partial }}{{\partial }{\mathrm{\theta }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{f2}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}{\mathrm{f2}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){-}\frac{{\partial }}{{\partial }{\mathrm{\phi }}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{f1}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right)\right){}\stackrel{{\wedge }}{{r}}}{{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{-}\frac{{\mathrm{f2}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right){}\stackrel{{\wedge }}{{\mathrm{\theta }}}}{{r}}{+}\frac{{\mathrm{f1}}{}\left({\mathrm{\theta }}{,}{\mathrm{\phi }}\right){}\stackrel{{\wedge }}{{\mathrm{\phi }}}}{{r}}$ (15)
 >