Ask Your Question

Error while integrate using algorithm='sympy' (bug)

asked 2013-07-21 13:15:59 +0100

AndreWin gravatar image

updated 2023-01-10 00:01:09 +0100

tmonteil gravatar image

Hello! I found next bug:

var('x, y')
integrate(y, y, 0, 8*log(x))
RuntimeError: ECL says: Error executing code in Maxima: defint: upper
limit of integration must be real; found 8*log(x)

Then I decided to use sympy:

var('x, y')
integrate(y, y, 0, 8*log(x), algorithm='sympy')

Nice! But when I replaced 0 --> 0.5 (int --> real):

var('x, y')
integrate(y, y, 0.5, 8*log(x), algorithm='sympy')
AttributeError: 'sage.rings.real_mpfr.RealLiteral' object has no
attribute '_sympy_'

M.... I opened real_mpfr.pyx and added:

1314 def _sympy_(self):
1315     """
1316     Return sympy object.
1317     AUTHORS: #########################
1318     """
1319     import sympy
1320     return(sympy.symplify(float(self)))

(I added line numbers in my code above and remove authors informations (that is about me)) Then I tryed to load:


And there are many-many errors while compilling... Help me please! Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-21 13:39:39 +0100

ppurka gravatar image

updated 2013-07-22 23:20:50 +0100

Instead of doing load, run

$ /path/to/sage -br

from the terminal. This will compile and install the modified file, and then open a sage prompt for you.

I tried to create a ticket in trac, but it seems there are some problems with disk space. Also, it is a transition period where the workflow is changing to git. After the changes have calmed down, you are encouraged to submit this as a patch to trac.

EDIT: It is ticket 14915

edit flag offensive delete link more


If you want to include your real name, please provide it in the ticket. I will modify the patch.

ppurka gravatar imageppurka ( 2013-10-12 03:29:50 +0100 )edit

The ticket is merged since Sage 5.13, so now we have:

sage: var('x, y')
(x, y)
sage: integrate(y, y, 0.5, 8*log(x), algorithm='sympy')
32*log(x)^2 - 0.125000000000000
tmonteil gravatar imagetmonteil ( 2015-03-05 23:17:09 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-21 13:15:59 +0100

Seen: 611 times

Last updated: Jul 22 '13