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{\xi }\left(x,y\right)\mathrm{D}\left[x\right]+\mathrm{\eta }\left(x,y\right)\mathrm{D}\left[y\right]\right)$
 ${X}{≔}{\mathrm{\xi }}{}\left({x}{,}{y}\right){}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}{\mathrm{\eta }}{}\left({x}{,}{y}\right){}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (1)
 > $R≔\mathrm{subs}\left(\left[\mathrm{\xi }\left(x,y\right)=-y,\mathrm{\eta }\left(x,y\right)=x\right],X\right)$
 ${R}{≔}{-}{y}{}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}{x}{}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (2)
 > $\mathrm{map}\left(z↦2\cdot z,R\right)$
 ${-}{2}{}{y}{}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}{2}{}{x}{}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (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){}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}\left({{\mathrm{cos}}{}\left({a}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({a}\right)}^{{2}}\right){}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (4)
 > $\mathrm{normal}\left(X\right)$
 ${-}{x}{}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}\left({{\mathrm{cos}}{}\left({a}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({a}\right)}^{{2}}\right){}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (5)
 > $\mathrm{expand}\left(X\right)$
 ${-}{x}{}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}\left({{\mathrm{cos}}{}\left({a}\right)}^{{2}}{+}{{\mathrm{sin}}{}\left({a}\right)}^{{2}}\right){}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (6)
 > $\mathrm{simplify}\left(X\right)$
 ${-}{x}{}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (7)

type

 > $X≔\mathrm{VectorField}\left(\mathrm{\xi }\left(x,y\right)\mathrm{D}\left[x\right]+\mathrm{\eta }\left(x,y\right)\mathrm{D}\left[y\right]\right)$
 ${X}{≔}{\mathrm{\xi }}{}\left({x}{,}{y}\right){}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}{\mathrm{\eta }}{}\left({x}{,}{y}\right){}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (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{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}{\mathrm{sin}}{}\left({a}\right){}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{+}{\mathrm{cos}}{}\left({a}\right){}\frac{{\partial }}{{\partial }{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}$ (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{\xi }\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.