 linalg(deprecated)/curl - Help

linalg(deprecated)

 curl
 curl of a vector

 Calling Sequence curl(f, v) curl(f, v, co)

Parameters

 f - list or vector of three expressions v - list or vector of three variables co - (optional), is either of type = or a list of three elements. This option is used to compute the curl in orthogonally curvilinear coordinate systems.

Description

 • Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[Curl], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • curl(f, v) computes the curl of f with respect to v, where f is a three-dimensional function of the three variables v.  When the third argument is not given, the curl of f is computed in the Cartesian coordinate system.
 • If the optional third argument co is of the form coords = coords_name or coords = coords_name([const]), curl 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 curl of f is: curl(f) = [1/(h*h)*(diff(h*f,v)-diff(h*f,v)), 1/(h*h)*(diff(h*f,v)-diff(h*f,v)), 1/(h*h)*(diff(h*f,v)-diff(h*f,v))];

 If co is a list of three elements which specify the scale factors, curl will operate on orthogonally curvilinear coordinate systems.
 • To compute the curl in other orthogonally curvilinear coordinate systems, use the addcoords routine.
 • The command with(linalg,curl) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[Curl], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $f≔\left[{x}^{2},xz,{y}^{2}z\right]:$$v≔\left[x,y,z\right]:$
 > $\mathrm{curl}\left(f,v\right)$
 $\left[\begin{array}{ccc}{2}{}{y}{}{z}{-}{x}& {0}& {z}\end{array}\right]$ (1)
 > $g≔\left[r,\mathrm{sin}\left(\mathrm{\theta }\right),z\right]:$$v≔\left[r,\mathrm{\theta },z\right]:$
 > $\mathrm{curl}\left(g,v,\mathrm{coords}=\mathrm{cylindrical}\right)$
 $\left[\begin{array}{ccc}{0}& {0}& \frac{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{{r}}\end{array}\right]$ (2)

define the scale factors in cylindrical coordinates

 > $h≔\left[1,r,1\right]:$
 > $\mathrm{curl}\left(g,v,h\right)$
 $\left[\begin{array}{ccc}{0}& {0}& \frac{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{{r}}\end{array}\right]$ (3)
 > $i≔\left[r,\mathrm{sin}\left(\mathrm{\theta }\right)r,\mathrm{cos}\left(\mathrm{\phi }\right)r\right]:$$v≔\left[r,\mathrm{\theta },\mathrm{\phi }\right]:$
 > $\mathrm{curl}\left(i,v,\mathrm{coords}=\mathrm{spherical}\right)$
 $\left[\begin{array}{ccc}\frac{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\phi }}\right)}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}& {-}{2}{}{\mathrm{cos}}{}\left({\mathrm{\phi }}\right)& {2}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\end{array}\right]$ (4)