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.Tue, 24 Jul 2012 11:52:33 +0200calculating residue with maxima_methodshttps://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/The following used to work around six months ago on sagenb.org:
var('x')
var('t')
( x/((4*x - 1)*(t^2 - t + x)) ).maxima_methods().residue(t,(1-sqrt(1-4*x))/2)
but now it returns zero which is incorrect. Can anybody help me get the correct answer again?Sat, 07 Jul 2012 08:34:55 +0200https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/Answer by kcrisman for <p>The following used to work around six months ago on <a href="http://sagenb.org">sagenb.org</a>:</p>
<pre><code>var('x')
var('t')
( x/((4*x - 1)*(t^2 - t + x)) ).maxima_methods().residue(t,(1-sqrt(1-4*x))/2)
</code></pre>
<p>but now it returns zero which is incorrect. Can anybody help me get the correct answer again?</p>
https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?answer=13808#post-id-13808I get this in a very old version of Sage's Maxima, the current Sage Maxima, and the most recent one I have.
Maxima 5.27.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.24
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) residue(( x/((4*x - 1)*(t^2 - t + x)) ),t,(1-sqrt(1-4*x))/2);
(%o1) 0
What/when was the answer you got before? I can't get this to do anything else in any version of Sage, either, not just the Maxima in it.
This is now [Maxima artifact 3541292](https://sourceforge.net/tracker/?func=detail&aid=3541292&group_id=4933&atid=104933); I've also put it at the relevant Sage ticket.Sat, 07 Jul 2012 23:24:09 +0200https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?answer=13808#post-id-13808Comment by kcrisman for <p>I get this in a very old version of Sage's Maxima, the current Sage Maxima, and the most recent one I have.</p>
<pre><code>Maxima 5.27.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.24
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) residue(( x/((4*x - 1)*(t^2 - t + x)) ),t,(1-sqrt(1-4*x))/2);
(%o1) 0
</code></pre>
<p>What/when was the answer you got before? I can't get this to do anything else in any version of Sage, either, not just the Maxima in it.</p>
<p>This is now <a href="https://sourceforge.net/tracker/?func=detail&aid=3541292&group_id=4933&atid=104933">Maxima artifact 3541292</a>; I've also put it at the relevant Sage ticket.</p>
https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?comment=19360#post-id-19360Hmm, that's interesting. I'll add that to the bug report.Tue, 24 Jul 2012 11:52:33 +0200https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?comment=19360#post-id-19360Comment by Stefán Ingi for <p>I get this in a very old version of Sage's Maxima, the current Sage Maxima, and the most recent one I have.</p>
<pre><code>Maxima 5.27.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.24
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) residue(( x/((4*x - 1)*(t^2 - t + x)) ),t,(1-sqrt(1-4*x))/2);
(%o1) 0
</code></pre>
<p>What/when was the answer you got before? I can't get this to do anything else in any version of Sage, either, not just the Maxima in it.</p>
<p>This is now <a href="https://sourceforge.net/tracker/?func=detail&aid=3541292&group_id=4933&atid=104933">Maxima artifact 3541292</a>; I've also put it at the relevant Sage ticket.</p>
https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?comment=19361#post-id-19361I was reexamining my old code and found the culprit. When it worked before I had run "assume(x<1/8)". That makes maxima give the same answer as sympy. Sorry for the trouble, but at least I learned something about sympy.Tue, 24 Jul 2012 07:18:18 +0200https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?comment=19361#post-id-19361Answer by achrzesz for <p>The following used to work around six months ago on <a href="http://sagenb.org">sagenb.org</a>:</p>
<pre><code>var('x')
var('t')
( x/((4*x - 1)*(t^2 - t + x)) ).maxima_methods().residue(t,(1-sqrt(1-4*x))/2)
</code></pre>
<p>but now it returns zero which is incorrect. Can anybody help me get the correct answer again?</p>
https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?answer=13805#post-id-13805 sage: from sympy import Symbol, residue
sage: x = Symbol("x")
sage: t = Symbol("t")
sage: residue(x/((4*x - 1)*(t^2 - t + x)),t,(1-sqrt(1-4*x))/2)
-x/((-4*x + 1)**(1/2)*(4*x - 1))
Sat, 07 Jul 2012 10:42:41 +0200https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?answer=13805#post-id-13805Comment by kcrisman for <pre><code>sage: from sympy import Symbol, residue
sage: x = Symbol("x")
sage: t = Symbol("t")
sage: residue(x/((4*x - 1)*(t^2 - t + x)),t,(1-sqrt(1-4*x))/2)
-x/((-4*x + 1)**(1/2)*(4*x - 1))
</code></pre>
https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?comment=19429#post-id-19429I didn't know Sympy had this... see also http://trac.sagemath.org/sage_trac/ticket/11210Sat, 07 Jul 2012 23:17:33 +0200https://ask.sagemath.org/question/9141/calculating-residue-with-maxima_methods/?comment=19429#post-id-19429