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.Sun, 10 Dec 2017 18:37:54 +0100can sage identify poles in or out the unit diskhttps://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/i want to calculate residues on the unit disk, but in the factorization of the functions i work with i have roots or poles in and out the unit disk but i'm interested only in the ones inside the unit disk.
f(t)=\frac{1}{t^{-1}(t-z_1)(t-z_2)}, |z_1|<1<|z_2|,
There is a way that sage identify the poles i want and work with those?Sat, 09 Dec 2017 16:54:51 +0100https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/Comment by vdelecroix for <p>i want to calculate residues on the unit disk, but in the factorization of the functions i work with i have roots or poles in and out the unit disk but i'm interested only in the ones inside the unit disk.</p>
<pre><code>f(t)=\frac{1}{t^{-1}(t-z_1)(t-z_2)}, |z_1|<1<|z_2|,
</code></pre>
<p>There is a way that sage identify the poles i want and work with those?</p>
https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/?comment=40039#post-id-40039Your question is very vague. What is your function? Why do you want to do with its poles?Sat, 09 Dec 2017 18:53:16 +0100https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/?comment=40039#post-id-40039Answer by dan_fulea for <p>i want to calculate residues on the unit disk, but in the factorization of the functions i work with i have roots or poles in and out the unit disk but i'm interested only in the ones inside the unit disk.</p>
<pre><code>f(t)=\frac{1}{t^{-1}(t-z_1)(t-z_2)}, |z_1|<1<|z_2|,
</code></pre>
<p>There is a way that sage identify the poles i want and work with those?</p>
https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/?answer=40048#post-id-40048If $f$ is an explicit *rational* function, than asking for the roots of the denominator and checking their absolute value is the solution. For instance:
sage: var( 'z' );
sage: f = z^7 / ( z^8 + z^5 + z + 1 )
sage: den = f.denominator()
sage: [ root for root, multiplicity in den.roots( ring=QQbar ) if abs(root) < 1 ]
[-0.8311059461834221?,
-0.4328488202738278? - 0.7797723123924101?*I,
-0.4328488202738278? + 0.7797723123924101?*I]
If the (rational) function also contains symbolic variables, than the code should somehow know "what kind of symbolic" is / may be involved.
If $f$ is rather complicated, e.g. $f(z) = 1/(1-\exp( z^4 +z )) -1/z$ then asking for the (numerical) roots of $1/f$ may be the solution. Same conclusion, same comment, the question is vague.Sun, 10 Dec 2017 00:42:47 +0100https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/?answer=40048#post-id-40048Answer by slelievre for <p>i want to calculate residues on the unit disk, but in the factorization of the functions i work with i have roots or poles in and out the unit disk but i'm interested only in the ones inside the unit disk.</p>
<pre><code>f(t)=\frac{1}{t^{-1}(t-z_1)(t-z_2)}, |z_1|<1<|z_2|,
</code></pre>
<p>There is a way that sage identify the poles i want and work with those?</p>
https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/?answer=40080#post-id-40080Like @dan_fulea, I would use the roots of the denominator.
Pasting specific values of `z_1` and `z_2` into the example in your question:
sage: z_1 = 0.5
sage: z_2 = 2
sage: f(t) = 1/(t^-1 * (t - z_1) * (t - z_2))
Check:
sage: f
t |--> t/((t - 0.500000000000000)*(t - 2))
Find the poles:
sage: poles = f.denominator().roots()
sage: poles
[(1/2, 1), (2, 1)]
Notice that they come with multiplicity.
Remove the multiplicity and filter by "modulus less than one":
sage: poles_in_unit_disc = [r for (r, m) in poles if abs(r) < 1]
[1/2]
Here is an example with symbolic `z_1` and `z_2`:
sage: z_1, z_2 = SR.var("z_1 z_2")
sage: assume(abs(z_1) < 1)
sage: assume(abs(z_2) > 1)
sage: f(t) = 1/(t^-1 * (t - z_1) * (t - z_2))
sage: poles = f.denominator().roots()
sage: poles
[(z_2, 1), (z_1, 1)]
sage: poles_in_unit_disc = [r for (r, m) in poles if abs(r) < 1]
sage: poles_in_unit_disc
[z_1]Sun, 10 Dec 2017 18:37:54 +0100https://ask.sagemath.org/question/40038/can-sage-identify-poles-in-or-out-the-unit-disk/?answer=40080#post-id-40080