Hi, currently, there are some rather unwanted features with respect to the residue-function. For example:
sage: f(x) = 1/(x^2 - x - 1) sage: f(1/2*sqrt(5) + 1/2) 4/((sqrt(5) + 1)^2 - 2*sqrt(5) - 6) Now, as the pole obviously is not recognized because the radical expression is not simplified/expanded, also the series expansion (and thus the computation of the residue) is wrong: sage: f(x).series(x==1/2*sqrt(5) + 1/2, 1) (4/((sqrt(5) + 1)^2 - 2*sqrt(5) - 6)) + Order(x - 1/2*sqrt(5) - 1/2) sage: f(x).residue(x==1/2*sqrt(5) + 1/2) 0 This is http://trac.sagemath.org/ticket/18372 -- there I also proposed a possible fix for this particular problem with residue (that is, the situation that the residue is incorrect if the singularity is not recognized after substituting the argument). However, the problem with the series expansion remains. Potentially, these cases could also be handled by substituting {x:x+a}, expanding/simplifying the resulting expression, letting Pynac expand aorund 0, and then substituting {x:x-a}. This approach yields sage: f(x).subs({x:x+1/2*sqrt(5)+1/2}).expand().series(x==0, 2).subs({x:x-1/2*sqrt(5)-1/2}) 1/50*sqrt(5)*(2*x - sqrt(5) - 1) + 2/5*sqrt(5)/(2*x - sqrt(5) - 1) - 1/5 Unfortunately, I do not know how to preserve the "Order(...)"-term within this approach, that is why I did not mention it on the ticket. But it doesn't end there. Take, for example, (gamma(x)^2).residue(x==0) ... [fixing this is harder than the singularity above and would probably require attention from within Pynac itself.] Does anyone have an opinion with respect to this issue? Should we think about a stopgap for the residue -- or even for the series expansion? Kind regards, Benjamin -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.