Student[VectorCalculus] - Maple Programming Help

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

Student[VectorCalculus]

 MapToBasis
 convert a Vector or vector field to a different coordinate system

 Calling Sequence MapToBasis(V, c)

Parameters

 V - Vector or Vector-valued procedure; specify the Vector or vector field c - (optional) name or name[name, name, ...]; specify the new coordinate system

Description

 • The MapToBasis(V, c) calling sequence converts the Vector or vector field V to the coordinate system c.
 • If V is a Vector-valued procedure, it is interpreted as a vector field.
 • If c is not specified, the current default coordinate system is used as the new coordinate system.
 If c is specified and V represents a vector field, the new coordinate system must be indexed with the names of the new coordinates.  Otherwise, an error is raised.  If V represents a Vector, no coordinate names are required.
 • If a coordinate system attribute is specified on V, V is interpreted in this coordinate system.
 If a coordinate system attribute is not specified on V, V is interpreted as a Vector or vector field in the current default coordinate system.  If the default coordinate system is not compatible with the new coordinate system, an error is raised.

Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{VectorCalculus}}\right):$
 > $\mathrm{GetCoordinates}\left(\right)$
 ${\mathrm{cartesian}}$ (1)
 > $\mathrm{MapToBasis}\left(⟨1,1⟩,'\mathrm{polar}'\right)$
 $\left(\sqrt{{2}}\right){{e}}_{{r}}{+}\left(\frac{{\mathrm{\pi }}}{{4}}\right){{e}}_{{\mathrm{θ}}}$ (2)
 > 
 $\left({1}\right){{e}}_{{x}}{+}\left({1}\right){{e}}_{{y}}$ (3)
 > $v≔⟨r,\mathrm{θ}⟩$
 ${v}{≔}\left({r}\right){{e}}_{{x}}{+}\left({\mathrm{\theta }}\right){{e}}_{{y}}$ (4)
 > $\mathrm{SetCoordinates}\left(v,'\mathrm{polar}'\right)$
 $\left({r}\right){{e}}_{{r}}{+}\left({\mathrm{\theta }}\right){{e}}_{{\mathrm{θ}}}$ (5)
 > $\mathrm{MapToBasis}\left(v\right)$
 $\left({r}{}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\right){{e}}_{{x}}{+}\left({r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\right){{e}}_{{y}}$ (6)

When transforming vector fields, you must specify coordinate names for the new coordinate system.

 > $\mathrm{SetCoordinates}\left({\mathrm{spherical}}_{r,\mathrm{φ},\mathrm{θ}}\right)$
 ${{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}$ (7)
 > $v≔\mathrm{VectorField}\left(⟨r,0,0⟩\right)$
 ${v}{≔}\left({r}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{φ}}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}$ (8)
 > $\mathrm{MapToBasis}\left(v,{\mathrm{cartesian}}_{x,y,z}\right)$
 $\left({x}\right){\stackrel{{_}}{{e}}}_{{x}}{+}\left({y}\right){\stackrel{{_}}{{e}}}_{{y}}{+}\left({z}\right){\stackrel{{_}}{{e}}}_{{z}}$ (9)
 > $\mathrm{MapToBasis}\left(\left(r,\mathrm{φ},\mathrm{θ}\right)→⟨\frac{1}{{r}^{2}},0,0⟩,{\mathrm{cartesian}}_{x,y,z}\right)$
 $\left(\frac{{x}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{3}}{{2}}}}\right){\stackrel{{_}}{{e}}}_{{x}}{+}\left(\frac{{y}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{3}}{{2}}}}\right){\stackrel{{_}}{{e}}}_{{y}}{+}\left(\frac{{z}}{{\left({{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{3}}{{2}}}}\right){\stackrel{{_}}{{e}}}_{{z}}$ (10)