Inspired by this ask.sagemath question 
<https://ask.sagemath.org/question/48486/differential-of-a-integral/>. 
Minimal case is

sage: f=function("f")
sage: F(x)=integrate(f(t),t,0,x)
sage: diff(F(x),x)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-87-d4bc7769bfb7> in <module>()
----> 1 diff(F(x),x)

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/calculus/functional.py
 
in derivative(f, *args, **kwds)
    134     if not isinstance(f, Expression):
    135         f = SR(f)
--> 136     return f.derivative(*args, **kwds)
    137 
    138 diff = derivative

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/symbolic/expression.pyx
 
in sage.symbolic.expression.Expression.derivative 
(build/cythonized/sage/symbolic/expression.cpp:25543)()
   4172             ValueError: No differentiation variable specified.
   4173         """
-> 4174         return multi_derivative(self, args)
   4175 
   4176     diff = differentiate = derivative

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/misc/derivative.pyx 
in sage.misc.derivative.multi_derivative 
(build/cythonized/sage/misc/derivative.c:3118)()
    220 
    221     for arg in derivative_parse(args):
--> 222         F = F._derivative(arg)
    223     return F
    224 

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/symbolic/expression.pyx
 
in sage.symbolic.expression.Expression._derivative 
(build/cythonized/sage/symbolic/expression.cpp:26060)()
   4244         sig_on()
   4245         try:
-> 4246             x = self._gobj.diff(ex_to_symbol(symbol._gobj), deg)
   4247         finally:
   4248             sig_off()

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/symbolic/integration/integral.py
 
in _tderivative_(self, f, x, a, b, diff_param)
    254             ans = SR.zero()
    255         return (ans + f.subs(x == b) * b.diff(diff_param)
--> 256                     - f.subs(x == a) * a.diff(diff_param))
    257 
    258     def _print_latex_(self, f, x, a, b):

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/structure/element.pyx
 
in sage.structure.element.Element.__getattr__ 
(build/cythonized/sage/structure/element.c:4608)()
    487             AttributeError: 
'LeftZeroSemigroup_with_category.element_class' object has no attribute 
'blah_blah'
    488         """
--> 489         return self.getattr_from_category(name)
    490 
    491     cdef getattr_from_category(self, name):

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/structure/element.pyx
 
in sage.structure.element.Element.getattr_from_category 
(build/cythonized/sage/structure/element.c:4717)()
    500         else:
    501             cls = P._abstract_element_class
--> 502         return getattr_from_other_class(self, cls, name)
    503 
    504     def __dir__(self):

/usr/local/sage-P3-2/local/lib/python3.7/site-packages/sage/cpython/getattr.pyx 
in sage.cpython.getattr.getattr_from_other_class 
(build/cythonized/sage/cpython/getattr.c:2614)()
    392         dummy_error_message.cls = type(self)
    393         dummy_error_message.name = name
--> 394         raise AttributeError(dummy_error_message)
    395     attribute = <object>attr
    396     # Check for a descriptor (__get__ in Python)

AttributeError: 'sage.rings.rational.Rational' object has no attribute 
'diff'

I donot understand this error, and I expected to see sometning along the 
lines of f(x)...

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/7f3f4ea7-5203-40b4-a344-0fcdd49643de%40googlegroups.com.

Reply via email to