Let $R = \mathbb{F}[x_1,\dots,x_n]$ and $S = R[dx_1,\dotsc,dx_n]$. The elements of $S$ operate naturally on elements of $R$. The operator $dx_i$ acts as a partial derivarive with respect to $x_i$, i.e., $dx_i \bullet f = \frac{\partial f}{\partial x_i}$, and a polynomial acts by multiplication, i.e., $x_i \bullet f = x_i f$.
Suppose $D \in S^k$ and $f \in R^k$. Then the operation of $D$ on $f$ is defined as $D\bullet f := \sum_{i=1}^k D_i \bullet f_i \in R$.
i1 : R = QQ[x,y] o1 = R o1 : PolynomialRing |
i2 : S = diffOpRing R o2 = S o2 : PolynomialRing |
i3 : D = diffOp matrix{{x*dx}, {(y+1)*dx*dy}} o3 = | xdx | | (y+1)dxdy | 2 o3 : DiffOp in S |
i4 : f = matrix{{x+y}, {x*y*(y+1)}} o4 = | x+y | | xy2+xy | 2 1 o4 : Matrix R <--- R |
i5 : D f 2 o5 = 2y + x + 3y + 1 o5 : R |
As with diffOp(Matrix), a $1\times 1$ matrix may be replaced by a ring element.
i6 : D = diffOp dx^2 o6 = | dx^2 | 1 o6 : DiffOp in S |
i7 : D(x^3+y*x^2) o7 = 6x + 2y o7 : R |