VectorSpace - Maple Help

VectorCalculus

 VectorSpace
 create a tangent vector space at a given point in a given coordinate system

 Calling Sequence VectorSpace(c, origin)

Parameters

 c - (optional) symbol or symbol[name, name, ...]; specify the coordinate system, possibly indexed by the coordinate names origin - Vector or list; free or position Vector or list; specify the root point of the tangent vector space

Description

 • The VectorSpace(c, origin) command returns a module representing the tangent vector space rooted at point origin in c coordinates.
 • The order of the arguments may be reversed. If no coordinate system argument is present, the current coordinate system is used.
 • The root point origin can be specified as a free or position Vector or as a list of coordinates. If it is a free or position Vector, the coordinate system attribute is checked and conversion done accordingly. If it is a list, the components are expected to be in c coordinates.
 • Once coordinates c are specified, the unit basis vectors are evaluated at the point origin. If any of the unit basis vectors evaluate to zero an error is raised.
 • The returned module is a valid right hand side for the space attribute on Vectors. If this attribute is present, it qualifies the Vector as a rooted Vector, and determines its root point and coordinate system.
 • The module itself has 3 useful exports:

 GetRootPoint Return the root point of the vector space GetCoordinates Return the coordinate system of the vector space Vector(comps) Create a rooted Vector based on the vector space, with components comps. comps is expected to be of type list(algebraic).

Examples

 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$
 > $\mathrm{vs}≔\mathrm{VectorSpace}\left(\mathrm{spherical}\left[r,\mathrm{\phi },\mathrm{\theta }\right],\left[1,\frac{\mathrm{\pi }}{2},\frac{\mathrm{\pi }}{2}\right]\right)$
 ${\mathrm{vs}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{local}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{_origin}}{,}{\mathrm{_coords}}{,}{\mathrm{_coords_dim}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{export}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{GetCoordinates}}{,}{\mathrm{GetRootPoint}}{,}{\mathrm{Vector}}{,}{\mathrm{eval}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1)
 > $\mathrm{About}\left(\mathrm{vs}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Vector Space}}\\ {\mathrm{Coordinates:}}& {{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[{1}{,}\frac{{\mathrm{\pi }}}{{2}}{,}\frac{{\mathrm{\pi }}}{{2}}\right]\end{array}\right]$ (2)
 > $v≔\mathrm{vs}:-\mathrm{Vector}\left(\left[0,1,0\right]\right)$
 ${v}{≔}\left[\begin{array}{c}{0}\\ {1}\\ {0}\end{array}\right]$ (3)
 > $\mathrm{About}\left(v\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Rooted Vector}}\\ {\mathrm{Components:}}& \left[{0}{,}{1}{,}{0}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[{1}{,}\frac{{\mathrm{\pi }}}{{2}}{,}\frac{{\mathrm{\pi }}}{{2}}\right]\end{array}\right]$ (4)
 > $\mathrm{MapToBasis}\left(v,'\mathrm{cartesian}'\right)$
 $\left[\begin{array}{c}{0}\\ {0}\\ {-1}\end{array}\right]$ (5)
 > $v≔\mathrm{VectorSpace}\left(\mathrm{polar}\left[r,\mathrm{\theta }\right],⟨x,y⟩\right):-\mathrm{Vector}\left(\left[a,b\right]\right):$
 > $\mathrm{About}\left(v\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Rooted Vector}}\\ {\mathrm{Components:}}& \left[{a}{,}{b}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[\sqrt{{{x}}^{{2}}{+}{{y}}^{{2}}}{,}{\mathrm{arctan}}{}\left({y}{,}{x}\right)\right]\end{array}\right]$ (6)
 > $\mathrm{About}\left(\mathrm{GetSpace}\left(v\right)\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Vector Space}}\\ {\mathrm{Coordinates:}}& {{\mathrm{polar}}}_{{r}{,}{\mathrm{\theta }}}\\ {\mathrm{Root Point:}}& \left[\sqrt{{{x}}^{{2}}{+}{{y}}^{{2}}}{,}{\mathrm{arctan}}{}\left({y}{,}{x}\right)\right]\end{array}\right]$ (7)