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.Fri, 21 Jan 2022 23:30:07 +0100Can sage automatically find singular points of a function?https://ask.sagemath.org/question/60745/can-sage-automatically-find-singular-points-of-a-function/When computing the asymptotics of a series, a common idea is to find a generating function, then use singularity analysis to get asymptotics for your series.
Sage actually has methods that do this built-in (see [here](https://doc.sagemath.org/html/en/reference/asymptotic/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.html) and [here](https://doc.sagemath.org/html/en/reference/asymptotic/sage/rings/asymptotic/asymptotic_ring.html#introductory-examples)) but the latter (which returns an asymptotic series) requires us to input a list of dominant singularities by hand. (It also doesn't work with inputs coming from the symbolic ring, but that's a separate issue, which I might try to fix at some point).
Since in simple cases we can tell where the singularities are "at a glance" by checking for zeros in the denominator, under radicals, and inside logs, it seems like we would be able to algorithmically find the singularities by (for instance) going through the [expression tree](https://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/expression_conversions.html) and solving for $0$ anytime we see a log, a denominator, or a fractional power.
Has anybody implemented this? Or has there been discussion about it? If not, do you know if any of sage's interfaces provide this functionality?
Thanks in advance!Fri, 21 Jan 2022 03:01:38 +0100https://ask.sagemath.org/question/60745/can-sage-automatically-find-singular-points-of-a-function/Answer by tmonteil for <p>When computing the asymptotics of a series, a common idea is to find a generating function, then use singularity analysis to get asymptotics for your series.</p>
<p>Sage actually has methods that do this built-in (see <a href="https://doc.sagemath.org/html/en/reference/asymptotic/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.html">here</a> and <a href="https://doc.sagemath.org/html/en/reference/asymptotic/sage/rings/asymptotic/asymptotic_ring.html#introductory-examples">here</a>) but the latter (which returns an asymptotic series) requires us to input a list of dominant singularities by hand. (It also doesn't work with inputs coming from the symbolic ring, but that's a separate issue, which I might try to fix at some point).</p>
<p>Since in simple cases we can tell where the singularities are "at a glance" by checking for zeros in the denominator, under radicals, and inside logs, it seems like we would be able to algorithmically find the singularities by (for instance) going through the <a href="https://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/expression_conversions.html">expression tree</a> and solving for $0$ anytime we see a log, a denominator, or a fractional power. </p>
<p>Has anybody implemented this? Or has there been discussion about it? If not, do you know if any of sage's interfaces provide this functionality?</p>
<p>Thanks in advance!</p>
https://ask.sagemath.org/question/60745/can-sage-automatically-find-singular-points-of-a-function/?answer=60754#post-id-60754I am not sure, but if your generating series satisfies some differential equation with polynomial coefficients, you can have a look at the `ore_algebra` optional package, see https://doc.sagemath.org/html/en/reference/spkg/ore_algebra.html and http://www.algebra.uni-linz.ac.at/people/mkauers/ore_algebra/
Fri, 21 Jan 2022 23:30:07 +0100https://ask.sagemath.org/question/60745/can-sage-automatically-find-singular-points-of-a-function/?answer=60754#post-id-60754