sage: f(x) = function('f',x)
sage: g = f(-x).diff(x); g
-D[0](f)(-x)
sage: g._maxima_init_()
"(diff('f(x), x, 1))*(-1)"
Notice that the -x inside f is totally ignored! This is because of code in the derivative method around line 454 of sage/symbolic/expression_conversion.py
Changing the line
to
"fixes" the problem, in that a NotImplementedError gets raised, instead of a wrong result returned. This is way better than the current situation, and we better fix this asap.
A better fix of course is to implement proper conversion. mhansen wrote this code, so maybe it would be easy for him.
CC: @golam-m-hossain @mwhansen
Component: calculus
Issue created by migration from https://trac.sagemath.org/ticket/6376