 Builtins - Maple Help

VectorField & OneForm Object Overloaded builtins

overview of overloaded builtins for VectorField & OneForm objects Description

 • The functionalities of some Maple builtin commands are extended for use on VectorField and OneForm objects.
 • The following builtins have been overloaded for this purpose: map, subs, normal, expand, simplify, indets, has, type, hastype
 • The map, subs, normal, expand, simplify builtin commands accept a VectorField or a OneForm object and apply their methods onto the components of the object. Then they return a VectorField or a OneForm object with new components.
 • Let V be a VectorField (respectively OneForm) object.
 • (i) The call type(V, t) returns true if t is any of the following types: module, object, anything, VectorField (respectively OneForm), appliable, and indexable. See examples below.
 • (ii) The call type(V,indexable(t)) returns true if the components of V are of type t. See example below.
 • (iii) The call type(V, dependent(x)) and type(V, freeof(x)) respectively return true if the components and space coordinates of V contain (respectively don't contain) x. See example below.
 • The indets, has, hastype builtin commands accept a VectorField or a OneForm object and apply their methods onto the space coordinate variables and the components of the object.
 • These overloaded builtins are associated with the VectorField and OneForm objects. For more detail, see Overview of the VectorField object, Overview of the OneForm object. Examples

 > $\mathrm{with}\left(\mathrm{LieAlgebrasOfVectorFields}\right):$ map, subs

 > $X≔\mathrm{VectorField}\left(\mathrm{ξ}\left(x,y\right){\mathrm{D}}_{x}+\mathrm{η}\left(x,y\right){\mathrm{D}}_{y}\right)$
 ${X}{≔}{\mathrm{\xi }}{}\left({x}{,}{y}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}{\mathrm{\eta }}{}\left({x}{,}{y}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (1)
 > $R≔\mathrm{subs}\left(\left[\mathrm{ξ}\left(x,y\right)=-y,\mathrm{η}\left(x,y\right)=x\right],X\right)$
 ${R}{≔}{-}{y}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (2)
 > $\mathrm{map}\left(z→2z,R\right)$
 ${-}{2}{}{y}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}{2}{}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (3) normal, expand, simplify

 > $X≔\mathrm{VectorField}\left(\left[\left[x\left(x-1\right)-{x}^{2},x\right],\left[{\mathrm{cos}\left(a\right)}^{2}+{\mathrm{sin}\left(a\right)}^{2},y\right]\right]\right)$
 ${X}{≔}\left({x}{}\left({x}{-}{1}\right){-}{{x}}^{{2}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}\left({{\mathrm{cos}}{}\left({a}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({a}\right)}^{{2}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (4)
 > $\mathrm{normal}\left(X\right)$
 ${-}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}\left({{\mathrm{cos}}{}\left({a}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({a}\right)}^{{2}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (5)
 > $\mathrm{expand}\left(X\right)$
 ${-}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}\left({{\mathrm{cos}}{}\left({a}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({a}\right)}^{{2}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (6)
 > $\mathrm{simplify}\left(X\right)$
 ${-}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}\frac{{ⅆ}}{{ⅆ}{y}}$ (7) type

 > $X≔\mathrm{VectorField}\left(\mathrm{ξ}\left(x,y\right){\mathrm{D}}_{x}+\mathrm{η}\left(x,y\right){\mathrm{D}}_{y}\right)$
 ${X}{≔}{\mathrm{\xi }}{}\left({x}{,}{y}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\right){+}{\mathrm{\eta }}{}\left({x}{,}{y}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right)$ (8)
 > $\left[\mathrm{type}\left(X,'\mathrm{VectorField}'\right),\mathrm{type}\left(X,'\mathrm{object}'\right),\mathrm{type}\left(X,'\mathrm{module}'\right)\right]$
 $\left[{\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{true}}\right]$ (9)

Checking type of the vector field's components, they are functions but not positive integers.

 > $\left[\mathrm{type}\left(X,'\mathrm{indexable}'\left(\mathrm{function}\right)\right),\mathrm{type}\left(X,'\mathrm{indexable}'\left(\mathrm{posint}\right)\right)\right]$
 $\left[{\mathrm{true}}{,}{\mathrm{false}}\right]$ (10)

The vector field contains x.

 > $\left[\mathrm{type}\left(X,\mathrm{dependent}\left(x\right)\right),\mathrm{type}\left(X,\mathrm{freeof}\left(x\right)\right)\right]$
 $\left[{\mathrm{true}}{,}{\mathrm{false}}\right]$ (11) indets, has, hastype

 > $X≔\mathrm{VectorField}\left(\left[\left[1,x\right],\left[\mathrm{sin}\left(a\right),y\right],\left[\mathrm{cos}\left(a\right),z\right]\right]\right)$
 ${X}{≔}\frac{{ⅆ}}{{ⅆ}{x}}{+}{\mathrm{sin}}{}\left({a}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\right){+}{\mathrm{cos}}{}\left({a}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\right)$ (12)

The indets of X includes all space variables as well as the indets occurring in the components of X.

 > $\mathrm{indets}\left(X\right)$
 $\left\{{a}{,}{x}{,}{y}{,}{z}{,}{\mathrm{cos}}{}\left({a}\right){,}{\mathrm{sin}}{}\left({a}\right)\right\}$ (13)
 > $\left[\mathrm{has}\left(X,\mathrm{ξ}\right),\mathrm{has}\left(X,\mathrm{sin}\right),\mathrm{has}\left(X,z\right)\right]$
 $\left[{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{true}}\right]$ (14)
 > $\mathrm{hastype}\left(X,\mathrm{function}\right)$
 ${\mathrm{true}}$ (15)
 > $\mathrm{hastype}\left(X,\mathrm{float}\right)$
 ${\mathrm{false}}$ (16) Compatibility

 • The VectorField & OneForm Object Overloaded builtins command was introduced in Maple 2020.