The bug in integrate function.

19 views
Skip to first unread message

Андрей Ширшов

unread,
Jul 22, 2013, 12:19:27 PM7/22/13
to sage-s...@googlegroups.com, sh.an...@yandex.ru
Hello!
I use Sage Version 5.10, Release Date: 2013-06-17
OS: Linux Mint 15 Cinnamon
Installation method: I downloaded sage archive from Yandex mirror, unpacked archive and then typed 'sage' in my terminal.
I found the bug in integrate function:

integrate(sin(x), x, 0.5, 5, algorithm='sympy')
Traceback (click to the left of this block for traceback)
...
AttributeError: 'module' object has no attribute 'symplify'

I tried to modified the source code (please see http://ask.sagemath.org/question/2835/error-while-integrate-using-algorithmsympy-bug) but when I typed 'sage -br' in my terminal, there are many mistakes(((
At the end of all I added my own class in my Sage Notebook:

class sf():
def __init__(self, x):
self._x = x

def _sympy_(self):
import sympy
return(sympy.simplify(self._x))

def __repr__(self):
return(str(self._x))

And I used integrate function as follows:

integrate(sin(x), x, sf(0.5), sf(5), algorithm='sympy')

It was helped to me, but all I want is that the bug I found will be fixed.
Thanks.
Sinersly yours, Andrei Shirshov.

P Purkayastha

unread,
Jul 22, 2013, 10:19:33 PM7/22/13
to sage-s...@googlegroups.com, sh.an...@yandex.ru
The code you provided does work. Maybe you inserted your method in the wrong place, or you have made other modifications to the sage library. Either way, apparently ticket http://trac.sagemath.org/ticket/14915 got created the last time I tried to create it, so this bug will be tracked there.
Reply all
Reply to author
Forward
0 new messages