Multiplicity of roots nummerical

71 views
Skip to first unread message

Noud

unread,
Jun 29, 2012, 5:57:33 AM6/29/12
to sage-s...@googlegroups.com
Hi,

I have some polynomials over the RealField() and I would like to find the approximate roots of the polynomials numerical. This is not really a problem, sicne find_root does a good job finding these. But now I also want to know the (approximate) multiplicity of these roots. Is it possible to do this numerically? I would guess that you cannot use the GCD algorithm on this one. I already know that the zeros of these polynomials are not algebraic over the rationals.

Best regards,
Noud 

achrzesz

unread,
Jun 29, 2012, 6:46:25 AM6/29/12
to sage-s...@googlegroups.com
Notice that roots  gives you the multiplicity

sage: f=(x-1)^2
sage: f.roots(ring=RealField())
[(1.00000000000000, 2)]
sage: f=x^3-x-1
sage: f.roots(ring=RealField())
[(1.32471795724475, 1)]
sage: f.roots(ring=RDF)
[(1.32471795724, 1)]
sage: f.roots(ring=CDF)
[(-0.662358978622 - 0.562279512062*I, 1),
(-0.662358978622 + 0.562279512062*I, 1),
(1.32471795724 - 1.11022302463e-16*I, 1)]

JamesHDavenport

unread,
Jun 30, 2012, 5:19:54 PM6/30/12
to sage-s...@googlegroups.com
But this is a rather fragile concept: see http://whww.sagenb.org/home/pub/4840 http://www.sagenb.org/home/pub/4840
If you can't, expand f below as x^2-2*x+1 then try perturbing the +1 term, e.g. +1+10^(-20).
What you really need in the approximate square-free decomposition of f: see, e.g.
Chin,P., Corless,R.M. & Corliss,G.F.,
Optimization Strategies for Floating-Point GCD.
Proc. ISSAC '98 (ed. O.Gloor), ACM, New York, 1998, pp. 228-235.
Nagasaka,K.,
Approximate polynomial GCD over integers.
J. Symbolic Comp. 46(2011) pp. 1306-1317.

Volker Braun

unread,
Jul 1, 2012, 7:46:22 AM7/1/12
to sage-s...@googlegroups.com
If your coefficients are floating-point numbers then the roots will almost always be single due to numerical errors in the coefficients. You can manually group roots that are close together but that requires some insight into the problem (what "typical" separations for distinct roots are).

What does make sense is to numerically compute roots of a polynomial over an exact ring, e.g. a polynomial with rational coefficients. Then the multiplicities of numerical roots over the complex interval field are correct:

sage: P.<x> = QQ[]
sage: q = (x^2+13+17)^10
sage: q.roots(ring=CIF)
[(-5.477225575051661?*I, 10), (5.477225575051661?*I, 10)]
Reply all
Reply to author
Forward
0 new messages