diff(RingElement,Matrix) -- differentiate each entry of a matrix

Synopsis

• Function: diff
• Usage:
diff(x,f)
• Inputs:
• x, , a polynomial
• f, , a matrix between free modules over the same ring as x
• Outputs:
• , having the same shape as f, whose (i,j) entry is the result of differentiating f_(i,j) by the differential operator corresponding to x.

Description

The shape of the resulting matrix is the same as the shape of f, but the degrees of the source module are different in an attempt to ensure that the result is homogeneous.
 i1 : R = QQ[x,y,z]; i2 : f = matrix{{x^2-y*z, x*y*z + z^4}, {x-1, 2*y^2+z^2-1}} o2 = | x2-yz z4+xyz | | x-1 2y2+z2-1 | 2 2 o2 : Matrix R <--- R i3 : diff(x,f) o3 = | 2x yz | | 1 0 | 2 2 o3 : Matrix R <--- R i4 : diff(x^2-y*z,f) o4 = | 3 -x | | 0 0 | 2 2 o4 : Matrix R <--- R