Top
Back: remainder
Forward: sqfrNorm
FastBack:
FastForward:
Up: zeroset_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.8.10.3 roots

Procedure from library zeroset.lib (see zeroset_lib).

Usage:
roots(f); where f is a polynomial

Purpose:
compute all roots of f in a finite extension of QQ
without multiplicities.

Return:
ring, a polynomial ring over an extension field of QQ, containing a list 'theRoots' and polynomials 'newA' and 'f':
 
  - 'theRoots' is the list of roots of the polynomial f (no multiplicities)
  - if the ground field is Q(a') and the extension field is Q(a), then
    'newA' is the representation of a' in Q(a).
    If the basering contains a parameter 'a' and the minpoly remains unchanged
    then 'newA' = 'a'.
    If the basering does not contain a parameter then 'newA' = 'a' (default).
  - 'f' is the polynomial f in Q(a) (a' being substituted by 'newA')

Assume:
ground field to be Q or a simple extension of Q given by a minpoly

Example:
 
LIB "zeroset.lib";
ring R = (0,a), x, lp;
minpoly = a2+1;
poly f = x3 - a;
def R1 = roots(f);
==> 
==> // 'roots' created a new ring which contains the list 'theRoots' and
==> // the polynomials 'f' and 'newA'
==> // To access the roots, newA and the new representation of f, type
==>    def R = roots(f); setring R; theRoots; newA; f;
==> 
setring R1;
minpoly;
==> (a4-a2+1)
newA;
==> (a3)
f;
==> x3+(-a3)
theRoots;
==> [1]:
==>    (-a3)
==> [2]:
==>    (a)
==> [3]:
==>    (a3-a)
map F;
F[1] = theRoots[1];
F(f);
==> 0


Top Back: remainder Forward: sqfrNorm FastBack: FastForward: Up: zeroset_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.4.0, 2024, generated by texi2html.