identify the vector character of an expression in the context of the Physics[Vectors] subpackage's conventions - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Physics : Vectors : Physics/Vectors/Identify

Physics[Vectors][Identify] - identify the vector character of an expression in the context of the Physics[Vectors] subpackage's conventions

 Calling Sequence Identify(A)

Parameters

 A - any algebraic (vectorial or scalar) expression

Description

 • Identify returns a number between 0 and 7, related to the vector classification of its argument: 0 = scalar, 1 = cartesian-vector, 2 = cylindrical-vector, 3 = spherical-vector, 5 = non-projected vector, 6 = can be cartesian or cylindrical (projected over the z axis), 7 = can be cylindrical or spherical (projected over the $\mathrm{_φ}$ direction). This command is used by the commands of the Physics[Vectors] subpackage before proceeding with the computations; it can be used to check how is the package interpreting an expression or as tool in the context of other programs using Physics[Vectors].
 • The %Identify is the inert form of Identify, that is: it represents the same mathematical operation while holding the operation unperformed. To activate the operation use value.
 • Note that the representation for a vector implemented in the Physics[Vectors] subpackage is not a matrix (list of components), but an algebraic expression, as either a first degree polynomial in the unit vectors with no independent term, or a symbol with a predefined postfix: the underscore, $_$ (to change this default postfix see Physics/Setup). The classification of a projected vector in this context is made taking into account the following conventions:

 ($\mathrm{_i},\mathrm{_j},\mathrm{_k}$) = cartesian unit vectors, ($\mathrm{_ρ},\mathrm{_φ},\mathrm{_k}$) = cylindrical unit vectors, ($\mathrm{_r},\mathrm{_θ},\mathrm{_φ}$) = spherical unit vectors

 • The classification of a non-projected vector or vector function depends entirely on its name, i.e., on whether it ends with _(a mimicry of the arrow over a letter), as in $\mathrm{f_}$ or $\mathrm{f_}\left(x,y,z\right)$
 • Concerning the coordinates, the conventions are:

 ($x,y,z$) = cartesian coordinates, ($\mathrm{\rho },\mathrm{\phi },z$) = cylindrical coordinates, ($r,\mathrm{\theta },\mathrm{\phi }$) = spherical coordinates

 NOTE: these variables x, y, z, $\mathrm{\rho },\mathrm{\phi },r$, and $\mathrm{\theta }$, as well as _i, _j, _k, $\mathrm{_ρ},\mathrm{_φ},\mathrm{_r}$, and $\mathrm{_θ}$, respectively used to represent the coordinates and the unit vectors, are automatically protected when the Physics[Vectors] subpackage is loaded.
 Mathematical vector notation: When the Physics[Vectors] subpackage is loaded in the Standard Graphical User Interface, and the Typesetting level is set to Extended (the default), non-projected vectors and unit vectors are respectively displayed with an arrow and a hat on top and the differential operators (Nabla, Laplacian, etc.) with an upside down triangle as in textbooks. You can also set this notation by entering Physics[Setup](mathematicalnotation = true). You can also set this notation from the Options Dialog: go to Tools > Options, select the Display tab, and set the Typesetting level to Extended.

Examples

 > $\mathrm{with}\left({\mathrm{Physics}}_{\mathrm{Vectors}}\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)

The input for Identify is an algebraic (vectorial or scalar) expression. The output is a related number.

"A" is a scalar and "A_" is a non-projected Vector.

 > $\mathrm{Identify}\left(A\right)$
 ${0}$ (3)
 > $\mathrm{Identify}\left(\mathrm{A_}\right)$
 ${5}$ (4)

A cartesian Vector.

 > $\mathrm{Identify}\left(x\mathrm{_i}+y\mathrm{_j}+z\mathrm{_k}\right)$
 ${1}$ (5)

A cylindrical Vector.

 > $\mathrm{Identify}\left(\mathrm{ρ}\mathrm{_ρ}+z\mathrm{_k}\right)$
 ${2}$ (6)

A spherical Vector.

 > $\mathrm{Identify}\left(\mathrm{_r}+f\left(r,\mathrm{θ}\right)\mathrm{_φ}\right)$
 ${3}$ (7)

A cartesian or cylindrical Vector.

 > $\mathrm{Identify}\left(\mathrm{_k}\right)$
 ${6}$ (8)

A cylindrical or spherical Vector.

 > $\mathrm{Identify}\left(\mathrm{_φ}\right)$
 ${7}$ (9)

The divergence of a Vector is a scalar.

 > $\mathrm{Identify}\left(∇·\mathrm{A_}\left(x,y,z\right)\right)$
 ${0}$ (10)

The curl of a Vector is a Vector.

 > $\mathrm{Identify}\left(∇×\mathrm{A_}\left(x,y,z\right)\right)$
 ${5}$ (11)

The Laplacian of a Vector is a Vector.

 > $\mathrm{Identify}\left(\mathrm{Laplacian}\left(\mathrm{A_}\left(x,y,z\right)\right)\right)$
 ${5}$ (12)
 >