Opened 6 years ago
Last modified 5 years ago
#15021 new defect
Return unevaluated derivative from BuiltinFunction
Reported by: | eviatarbach | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | symbolics | Keywords: | |
Cc: | burcin | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
There should be a way to return an unevaluated derivative from within the _derivative_
or _tderivative_
method of a BuiltinFunction
. Perhaps by returning None
, like _eval_
does for remaining unevaluated. As of now returning None
causes a segmentation fault.
This is important because for multivariate functions often only the derivative with respect to one variable may be known, so we want to return the unevaluated derivative if it's taken with respect to a variable in which we don't know the derivative. Right now it seems the only way to not return an evaluated derivative is to raise an exception.
Change History (6)
comment:1 Changed 6 years ago by
- Description modified (diff)
comment:2 Changed 6 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:3 Changed 6 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:4 Changed 5 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:5 Changed 5 years ago by
- Summary changed from Return unevaluated derivative to Return unevaluated derivative from BuiltinFunction
This issue was discussed before. We have the functionality in
FDerivativeOperator
, it's just not available on top level or as a method on BuiltinFunction? instances:http://permalink.gmane.org/gmane.comp.mathematics.sage.devel/58041
I thought this stuff was on trac somewhere already, but I cannot find it presently. For archival purposes:
With that code one can input the form that sage prints:
Input will never be in Leibnitz notation, since unevaluated functions do not have names for their parameters, just position numbers for them.