Ask Your Question
1

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

asked 11 years ago

AndreWin gravatar image

updated 2 years ago

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')
32*log(x)^2

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:

load('/home/andrei/Programs/Sage/sage-5.10/devel/sage/sage/rings/real_mpfr.pyx')

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 11 years ago

ppurka gravatar image

updated 11 years ago

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

Preview: (hide)
link

Comments

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

ppurka gravatar imageppurka ( 11 years ago )

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 ( 10 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 11 years ago

Seen: 986 times

Last updated: Jul 22 '13