next | previous | forward | backward | up | top | index | toc | Macaulay2 website
VectorFields :: applyVectorField

applyVectorField -- apply a vector field to a function or functions



Apply the vector field(s) represented by M, V, or m, to the second parameter, that is, use the vector field(s) as differential operator(s).

When the first parameter is a Matrix or a Vector, then the return type matches the second parameter. If that is a RingElement, then there must only be 1 column in the matrix. When the second parameter is a List l of RingElements, then the returned List is formed by applying each vector field in turn to the first entry of l, then each vector field to the second entry of l, etc.

i1 : R=QQ[x,y,z];
i2 : A=matrix {{x},{y},{0}};

             3       1
o2 : Matrix R  <--- R
i3 : B=matrix {{0},{0},{z}};

             3       1
o3 : Matrix R  <--- R
i4 : f=x*y-z^2;
i5 : applyVectorField(A,f)

o5 = 2x*y

o5 : R
i6 : applyVectorField(A,{f,x*f})

              2       2
o6 = {2x*y, 3x y - x*z }

o6 : List
i7 : applyVectorField(A|B,{f,x*f})

               2    2       2       2
o7 = {2x*y, -2z , 3x y - x*z , -2x*z }

o7 : List

When the first parameter is a Module, then the return type is an Ideal. Applying a Module to a RingElement gives the Ideal generated by applying each generator to the function. Applying a Module to an Ideal I produces the Ideal generated by applying every element of the module to every element of I; this is generated by not only the functions formed by applying each generator of the module to each generator of I (as might be computed by the (Matrix,List) version of this function), but also I times the ideal of coefficients of the generators of the module.

i8 : applyVectorField(image A,f)

o8 = ideal(2x*y)

o8 : Ideal of R
i9 : applyVectorField(image A,ideal (f))

                    2     2
o9 = ideal (x*y, y*z , x*z )

o9 : Ideal of R
i10 : trim(ideal(applyVectorField(A,f))+ideal(f)*minors(1,A))

                     2     2
o10 = ideal (x*y, y*z , x*z )

o10 : Ideal of R

See also

Ways to use applyVectorField :

For the programmer

The object applyVectorField is a method function.