# can sage identify poles in or out the unit disk

This post is a wiki. Anyone with karma >750 is welcome to improve it.

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?

edit retag close merge delete

Your question is very vague. What is your function? Why do you want to do with its poles?

( 2017-12-09 11:53:16 -0600 )edit

Sort by ยป oldest newest most voted

Like @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]

more

If $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.

more