On Apr 3, 2:32 pm, pallab <[email protected]> wrote:
> Is there any way to check whether a symbolic expression is a
> derivative. Like,
>
> isinstance(diff(f(x),x),"what to put?")
>
> gives "True"
>
> and
>
> isinstance(f(x),"what to put?")
>
> gives false, assuming f is not a derivative itself.
One can do the following, for example,
def is_diff(expr):
try:
return isinstance(expr.operator(),
sage.symbolic.operators.FDerivativeOperator)
except (AttributeError):
return False
Alec Mihailovs
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
To unsubscribe, reply using "remove me" as the subject.