gaurantee for exact algebraic number from "roots"

Messages in english

Modérateur : xcasadmin

jocaps
Messages : 121
Inscription : lun. avr. 17, 2017 4:32 pm

gaurantee for exact algebraic number from "roots"

Message par jocaps » lun. mai 28, 2018 4:02 pm

Hi,

Consider

Code : Tout sélectionner

g:=x^6+x^4+x+2
rts:=roots(g)
In my current version of XCas I get the warning
Warning! Algebraic extension not implemented yet for poly [1,0,1,0,0,1,2]
So my impression is that XCas/giac will not save these values as some algebraic numbers (exact roots) and my fear is that if I continue with this I will get errors in future computation (e.g. when trying to compute ranks of matrices with algebraic number entries). Is this concern of mine unfounded or is there an alternative to roots that will gaurantee me that the system will save these as exact roots?

Jose

parisse
Messages : 5882
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re:

Message par parisse » lun. mai 28, 2018 4:31 pm

Indeed, you must call explicitly rootof for exact solutions of polynomials of degree >3 because it would genrically require a very large field extension of Q to have all roots inside.
Run r:=rootof(g) then you can perform further calculations exactly, for example normal(1/r).

jocaps
Messages : 121
Inscription : lun. avr. 17, 2017 4:32 pm

Re:

Message par jocaps » lun. mai 28, 2018 5:33 pm

Hi Bernard,

Thank you for the suggestion. I realized there was rootof after my post. But I am not sure what to do with it alone if I want to get all the roots (exact solutions), because I really need these roots for another computation (so not only one of the roots, r:=rootof(g)). The only way I can now think of having them is (as you say, if I understand your last post correctly) to compute for a primitive root (I don't know if giac has this, but I can do it with pari) and then get an expression of the roots of the polynomial from the primitive roots. But maybe there is a more direct way to do it?

Also I realized I cannot do re(rootof(g)) or im(rootof(g)), to get the (exact) real and imaginary part of the root which should also be algebraic (this would not work also with the normal command). But maybe I am asking for too much. Any suggestion/comments is much appreciated.

Thanks,
Jose

parisse
Messages : 5882
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re:

Message par parisse » lun. mai 28, 2018 8:04 pm

You can not in general express all roots in terms of one root of g unless you are very lucky. If I'm not mistaken, you might have to go in a field extension of order factorial(degree(g)). You can get a minimal polynomial for the extension by solving the symmetric expression of the coefficients of g in terms of the roots (with Groebner basis and rational univariate representation), but that's probably too heavy. I guess PARI has some better algorithm.

Répondre