Student[VectorCalculus] - Maple Programming Help

Home : Support : Online Help : Education : Student Package : Vector Calculus : Computation Commands : Student/VectorCalculus/Vector

Student[VectorCalculus]

 Vector
 create a Vector with a coordinate system attribute

 Calling Sequence Vector(arguments)

Parameters

 a, b, c - algebraic; the entries in the Vector arguments - same parameters as the top-level Vector command

Description

 • The Vector command in the Student[VectorCalculus] package constructs a free Vector and attaches additional information about the coordinate system in which the Vector is to be interpreted. This additional information is stored in the form of an attribute on the Vector, and is used by most of the other commands of the package.
 • The free Vector is one of the four principal Vector data structures in the Student[VectorCalculus] package. Note that the Student[VectorCalculus] and the VectorCalculus packages share the same Vector data structures.
 • For details on the differences between the four principal Vector data structures, namely, free Vectors, position Vectors, rooted Vectors, and vector fields, see "VectorCalculus,Details".
 • The simplest way to construct a Vector for use with commands in this package is to first load the package, for example by calling with(Student[VectorCalculus]), and then use one of the first four calling sequences shown above, which illustrate the short-cut, "angle bracket" notation for Vectors in Maple. This will construct either a column Vector (the first two forms) or a row Vector (the next two forms), with the default coordinate system, which is cartesian.
 • To create Vectors in a different coordinate system but still use the angle bracket command form, you can either create the Vector as above and then call SetCoordinates, passing the newly created Vector and the target coordinate system, or you can call SetCoordinates first, thus changing the default coordinate system, and then create the Vector. Note that the Student[VectorCalculus] package only supports cartesian, polar, spherical and cylindrical coordinate systems.
 Note: Changing the coordinate system of a Vector just changes how the components are interpreted. It does not "map" the Vector into the new system. See MapToBasis.
 • The command Vector(arguments) provides the same functionality as the top-level Vector command, thus providing more fine-grained control over how the Vector is to be built. To set the coordinate system to something other than the default system, use the $\mathrm{attributes}=[\mathrm{coordinates}=\mathrm{...}]]$ option.
 • If you either set the default coordinate system passing only the name of that system to $\mathrm{SetCoordinates}$ (for example, SetCoordinates(polar)), or pass only that coordinate system name in the attributes option of a Vector command, Maple will choose default names for the coordinates of that system.
 Note: A Vector that is not a vector field is not interpreted as a constant vector field by the Student[VectorCalculus] package commands. Vector fields and other Vectors cannot be used interchangeably.
 • By default, vector fields, free Vectors and rooted Vectors created by commands from the Student[VectorCalculus] package are displayed using basis format, that is, as a sum of scalar multiples of basis vectors.  Vector Fields are visually distinguished in this format by displaying an overbar above each basis vector. For more information on Vector display formats, see BasisFormat.

Examples

If no coordinate system is specified, then current default coordinate system is used.

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{VectorCalculus}]\right):$
 > $v≔⟨a,b,c⟩$
 ${v}{≔}\left({a}\right){{e}}_{{x}}{+}\left({b}\right){{e}}_{{y}}{+}\left({c}\right){{e}}_{{z}}$ (1)
 > $\mathrm{GetCoordinates}\left(v\right)$
 ${\mathrm{cartesian}}$ (2)

If you specify a coordinate system, the Vector is defined with respect to the coordinate system.

 > $\mathrm{SetCoordinates}\left(\mathrm{polar}\right)$
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{θ}}}$ (3)
 > $v≔⟨1,2⟩$
 ${v}{≔}{{e}}_{{r}}{+}{2}{{e}}_{{\mathrm{θ}}}$ (4)
 > $\mathrm{GetCoordinates}\left(v\right)$
 ${{\mathrm{polar}}}_{{r}{,}{\mathrm{θ}}}$ (5)
 > $\mathrm{SetCoordinates}\left({\mathrm{cylindrical}}_{r,\mathrm{θ},z}\right)$
 ${{\mathrm{cylindrical}}}_{{r}{,}{\mathrm{θ}}{,}{z}}$ (6)
 > $u≔⟨r|0|0⟩$
 ${u}{≔}\left({r}\right){{e}}_{{r}}$ (7)
 > $v≔⟨1,2,3⟩$
 ${v}{≔}{{e}}_{{r}}{+}{2}{{e}}_{{\mathrm{θ}}}{+}{3}{{e}}_{{z}}$ (8)
 > $w≔\mathrm{copy}\left(v\right)$
 ${w}{≔}{{e}}_{{r}}{+}{2}{{e}}_{{\mathrm{θ}}}{+}{3}{{e}}_{{z}}$ (9)
 > $\mathrm{SetCoordinates}\left(v,\mathrm{cartesian}\right)$
 ${{e}}_{{x}}{+}{2}{{e}}_{{y}}{+}{3}{{e}}_{{z}}$ (10)
 > $\mathrm{MapToBasis}\left(w,\mathrm{cartesian}\right)$
 $\left({\mathrm{cos}}{}\left({2}\right)\right){{e}}_{{x}}{+}\left({\mathrm{sin}}{}\left({2}\right)\right){{e}}_{{y}}{+}{3}{{e}}_{{z}}$ (11)