ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 05 Mar 2015 23:17:09 +0100Error while integrate using algorithm='sympy' (bug)https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/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.
Sun, 21 Jul 2013 13:15:59 +0200https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/Answer by ppurka for <p>Hello!
I found next bug:</p>
<pre><code>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)
</code></pre>
<p>Then I decided to use sympy:</p>
<pre><code>var('x, y')
integrate(y, y, 0, 8*log(x), algorithm='sympy')
32*log(x)^2
</code></pre>
<p>Nice! But when I replaced 0 --> 0.5 (int --> real):</p>
<pre><code>var('x, y')
integrate(y, y, 0.5, 8*log(x), algorithm='sympy')
AttributeError: 'sage.rings.real_mpfr.RealLiteral' object has no
attribute '_sympy_'
</code></pre>
<p>M.... I opened real_mpfr.pyx and added:</p>
<pre><code>1314 def _sympy_(self):
1315 """
1316 Return sympy object.
1317 AUTHORS: #########################
1318 """
1319 import sympy
1320 return(sympy.symplify(float(self)))
</code></pre>
<p>(I added line numbers in my code above and remove authors informations (that is about me))
Then I tryed to load:</p>
<pre><code>load('/home/andrei/Programs/Sage/sage-5.10/devel/sage/sage/rings/real_mpfr.pyx')
</code></pre>
<p>And there are many-many errors while compilling... Help me please!
Thanks.</p>
https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/?answer=15263#post-id-15263Instead 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 14915Sun, 21 Jul 2013 13:39:39 +0200https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/?answer=15263#post-id-15263Comment by ppurka for <p>Instead of doing load, run</p>
<pre><code>$ /path/to/sage -br
</code></pre>
<p>from the terminal. This will compile and install the modified file, and then open a sage prompt for you.</p>
<p>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.</p>
<p><em>EDIT</em>: It is ticket 14915</p>
https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/?comment=16936#post-id-16936If you want to include your real name, please provide it in the ticket. I will modify the patch.Sat, 12 Oct 2013 03:29:50 +0200https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/?comment=16936#post-id-16936Comment by tmonteil for <p>Instead of doing load, run</p>
<pre><code>$ /path/to/sage -br
</code></pre>
<p>from the terminal. This will compile and install the modified file, and then open a sage prompt for you.</p>
<p>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.</p>
<p><em>EDIT</em>: It is ticket 14915</p>
https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/?comment=26041#post-id-26041The 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.125000000000000Thu, 05 Mar 2015 23:17:09 +0100https://ask.sagemath.org/question/10370/error-while-integrate-using-algorithmsympy-bug/?comment=26041#post-id-26041