I'm trying to write and simplify expressions involving partial derivatives of an arbitrary function, say f(x,y).
Specifically, I would like to evaluate to , instead of
And gives the same result.
Interestingly, does evaluate to , as expected.
I could get some results by using a custom differentiation function
`diff/f` := proc(x,y,v)
if v = x then return D(f)(v,y):
elif v = y then return D(f)(x,v):
else return 0: # is there a fallback I can use without risking infinite recursion?
and it works for the simple case, but now does not work.
All this makes me feel that there must be a way to get what I want by default, but I can't figure it out.
Is there? Thank you in advance!