This is fixed in current development version, so that
>>> f(x, y).diff(x, y) - f(x, y).diff(y, x)
0
If you don't want this to happen, you have to use unevaluated
derivatives (diff() always evaluates them):
>>> Derivative(f(x, y), x, y) - Derivative(f(x, y), y, x)
D(f(x, y), x, y) - D(f(x, y), y, x)
Cheers,
Renato
Yes, I think that's what he meant, and it works too, returning
2*D(f(x, y), x, y).
Yes, I think that's what he meant, and it works too, returning
2*D(f(x, y), x, y).
Yes, it is. See commit 53fbd255 [0] and issue 1435 [1]. We assume by
default continuity of derivatives to the order needed, if the
Derivatives are evaluated. It's planned to implement an assumption to
allow the user to assume discontinuity of derivatives instead - issue
2471 [2].
Renato
[0] https://github.com/sympy/sympy/commit/53fbd25510f0294d89398c5f9d0bee2f88492232
[1] http://code.google.com/p/sympy/issues/detail?id=1435
[2] http://code.google.com/p/sympy/issues/detail?id=2471