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

## Synopsis

• Usage:
g=applyVectorField(M,f)
g=applyVectorField(V,f)
L=applyVectorField(M,l)
L=applyVectorField(V,l)
J=applyVectorField(m,f)
J=applyVectorField(m,I)
• Inputs:
• M, , of vector fields
• V, , a column from a matrix of vector fields
• f, , to apply the first parameter to
• l, a list, of RingElements to apply the first parameter to
• m, , of vector fields
• I, an ideal, an ideal of functions to apply the first parameter to
• Outputs:
• g, ,
• L, a list, of RingElements
• J, an ideal,

## Description

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

• VectorFields -- a package for manipulating polynomial vector fields
• derlog -- compute the logarithmic (tangent) vector fields to an ideal
• der -- compute the module of vector fields which send one set to another

## Ways to use applyVectorField :

• "applyVectorField(Matrix,List)"
• "applyVectorField(Matrix,RingElement)"
• "applyVectorField(Module,Ideal)"
• "applyVectorField(Module,RingElement)"
• "applyVectorField(Vector,List)"
• "applyVectorField(Vector,RingElement)"

## For the programmer

The object applyVectorField is .