# defining rule for derivative on arbitrary function

Is there a way in Mathematica for defining rules for derivatives on undefined functions? For example, I would like to define a rule such that for any function $$f(x,y)$$, when I take the $$x$$-derivative it gives me a function $$\delta f$$:

D[f[x,y],x] -> δf[x,y]
D[g[x,y],x] -> δg[x,y]


etc.

EDIT: I should clarify that I am looking for a rule that could act on functions of any type, so not just $$f$$, $$g$$, but any function of $$(x,y)$$.

• Do you really want to create a new symbol with a $\delta$ in front, or do you just want to display $f^{(1,0)}$ as $\delta f$? Commented Aug 5, 2019 at 10:14

Just use Derivative:

f /: Derivative[1,0][f] = 𝛿f;
f /: Derivative[0,1][f] = 𝛿g;


Then:

D[f[x, y], x]
D[f[x, y], y]


𝛿f[x, y]

𝛿g[x, y]

• I should clarify that I am looking for a rule that could act on functions of any type, so not just f,g, but any function of [x,y]. So the rule would append $\delta$ to any function where I take $\partial_x$. Commented Aug 3, 2019 at 16:41