This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / The Mathematica Book / Advanced Mathematics / Algebraic Manipulation  /

3.3.6 Advanced Topic: Polynomials over Algebraic Number Fields

Functions like Factor usually assume that all coefficients in the polynomials they produce must involve only rational numbers. But by setting the option Extension you can extend the domain of coefficients that will be allowed.

Factoring polynomials over algebraic number fields.

  • Allowing only rational number coefficients, this polynomial cannot be factored.
  • In[1]:= Factor[1 + x^4]


  • With coefficients that can involve

    , the polynomial can now be factored.
  • In[2]:= Factor[1 + x^4, Extension -> {Sqrt[2]}]


  • The polynomial can also be factored if one allows coefficients involving

  • In[3]:= Factor[1 + x^4, Extension -> {Sqrt[-1]}]


  • GaussianIntegers->True is equivalent to Extension->Sqrt[-1].
  • In[4]:= Factor[1 + x^4, GaussianIntegers -> True]


  • If one allows coefficients that involve both and

    the polynomial can be factored completely.
  • In[5]:= Factor[1 + x^4, Extension -> {Sqrt[2], Sqrt[-1]}]


  • Expand gives the original polynomial back again.
  • In[6]:= Expand[%]


    Factoring polynomials with algebraic number coefficients.

  • Here is a polynomial with a coefficient involving

  • In[7]:= t = Expand[(Sqrt[2] + x)^2]


  • By default, Factor will not factor this polynomial.
  • In[8]:= Factor[t]


  • But now the field of coefficients is extended by including

    , and the polynomial is factored.
  • In[9]:= Factor[t, Extension -> Automatic]


    Other polynomial functions work much like Factor. By default, they treat algebraic number coefficients just like independent symbolic variables. But with the option Extension->Automatic they perform operations on these coefficients.

  • By default, Cancel does not reduce these polynomials.
  • In[10]:= Cancel[t / (x^2 - 2)]


  • But now it does.
  • In[11]:= Cancel[t / (x^2 - 2), Extension->Automatic]


  • By default, PolynomialLCM pulls out no common factors.
  • In[12]:= PolynomialLCM[t, x^2 - 2]


  • But now it does.
  • In[13]:= PolynomialLCM[t, x^2 - 2, Extension->Automatic]