This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Add-ons / Standard Packages / Algebra  /


The package provides a function for solving systems of strong polynomial inequalities in one or more unknowns. To be precise, SemialgebraicComponents[ineqs,vars] gives a finite set of solutions of the system of inequalities, such that any other solution can be connected by a continuous path of solutions with one of the solutions in the set. ineqs is a list of strong inequalities, where both sides of each inequality are polynomials in variables vars with rational coefficients. In other words, SemialgebraicComponents[ineqs,vars] gives at least one point in each connected component of the open semialgebraic set defined by inequalities ineqs.

Solutions of inequalities.

  • This loads the package.
  • In[1]:= <<Algebra`AlgebraicInequalities`

  • Here is a point from each of the three intervals forming the set of solutions of

  • In[2]:= SemialgebraicComponents[{x (x^2 - 2) (x^2 - 3) > 0}, x]


  • This gives one point in each of the two connected components of the set bounded by the circle and the hyperbola

  • In[3]:= SemialgebraicComponents[{x^2 + y^2 < 4, x y > 1}, {x, y}]


  • This proves that the ball is contained in the ellipsoid

  • In[4]:= SemialgebraicComponents[{x^2 + y^2/4 + z^2/9 > 1,
    x^2 + (y - 1)^2 + (z - 2)^2 < 1/9},
    {x, y, z}]