| 1 | initial version |
You should be able to create a class of a function, though, and give it a custom derivative.
https://github.com/sagemath/sage/blob/master/src/sage/symbolic/function.pyx
# only one of derivative and tderivative should be defined
if hasattr(self, '_derivative_') and hasattr(self, '_tderivative_'):
raise ValueError("only one of _derivative_ or _tderivative_ should be defined.")
There are a number of examples in the src/sage/functions directory, e.g. https://github.com/sagemath/sage/blob/master/src/sage/functions/bessel.py
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.