-
-
Notifications
You must be signed in to change notification settings - Fork 641
Closed as not planned
Description
sage: t = var('t')
sage: sage: f = function('f')(t)
sage: diff(f,x,x)
0
sage: desolve(diff(f,t) - (f+1)/(t+1), f)
(_C - 1/(t + 1))*(t + 1)
sage: sage: f = function('f')
sage: diff(f,t)
...
TypeError: unable to convert f to a symbolic expression
sage: diff(sin,t)
...
TypeError: unable to convert f to a symbolic expression
The same error can be had with the simple SR(sin)
, i.e., any function object in contrast to the resp. function call, which returns an Expression
.
Since function objects can be used in other context it seems they should be part of symbolic expressions too. This ticket however will limit itself to giving a better error message in SR.coerce
and handling Function
objects in calculus/functional.py:derivative()
.
See also #15025
Component: calculus
Author: Ralf Stephan
Branch/Commit: u/rws/diff_f_t__should_work_even_with_function_objects @ 0cecec3
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/17701