# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Get a rational univariate representation for a general polynomial system

Contributed by:
Daniel Lichtblau

ResourceFunction["RationalUnivariateRepresentation"][ gives a rational univariate representation in terms of a new variable |

The rational univariate representation (RUR) is effectively a triangular representation of the solution set of a system of multivariate polynomials. It preserves multiplicities of the solutions to the original system.

The system *polys* must be zero dimensional, that is, have only finitely many solutions in the given *vars*.

The new variable is often referred to as a separating variable.

An RUR has a single polynomial *p*(*t*) for the separating variable *t*. There is a linear polynomial in each of the respective *vars* with another term that is a rational function in *t*. The denominator in all cases is the derivative polynomial *p*'(*t*), and all numerators have degree less than that of this denominator. Thus all solutions for *vars* are effectively presented as rational functions in *t*. We obtain numeric values by evaluating at each of the roots of *p*(*t*).

An RUR is similar to a Groebner basis in lexicographic term order, in that both give a triangular form for the solution set of a given set of polynomials. When the Shape Lemma applies with respect to the lowest ordered variable, the Groebner basis gives a univariate representation for the remaining variables.

RationalUnivariateRepresentation uses a probabilistic method to find a separating element and may fail, in which case it will return unevaluated.

Compute a rational univariate representation for the polynomial system (*x*^{2}-1,(*x*-1)*(*y*-1),* y^{2}*-1):

In[1]:= |

Out[2]= |

Solve for *t*:

In[3]:= |

Out[3]= |

Get linear polynomials in (*x*,*y*):

In[4]:= |

Out[4]= |

Solve these:

In[5]:= |

Out[5]= |

Compare to solving the original system:

In[6]:= |

Out[6]= |

Compute a rational univariate representation for a pair of cubic polynomials:

In[7]:= |

Out[8]= |

RationalUnivariateRepresentation can find approximate results when input precision is finite:

In[9]:= |

Out[10]= |

A rational univariate representation can be computed for polynomials that have parametrized coefficients:

In[11]:= |

Out[12]= |

Compute an RUR using a prime modulus:

In[13]:= |

Out[14]= |

RationalUnivariateRepresentation will be unable to compute a result in finite precision unless it is sufficient to do the needed internal computations:

In[15]:= |

Out[16]= |

It can be quite slow to compute an RUR for systems when coefficients involve radicals or otherwise become large during the computation:

In[17]:= |

Out[18]= |

We can compute this much faster if we use approximate coefficients to sufficient precision:

In[19]:= |

Out[19]= |

The result has polynomials in the separating variable of degree as large as 23:

In[20]:= |

Out[20]= |

If a polynomial system does not satisfy the Shape Lemma then RationalUnivariateRepresentation may either fail to find an RUR or lose multiplicity in the process:

In[21]:= |

Out[22]= |

Use the RUR obtained to get solutions to the original system:

In[23]:= |

Out[26]= |

Compare to the result from NSolve to see that some of the multiplicity has been lost:

In[27]:= |

Out[27]= |

Also check with the resource function CountPolynomialSolutions:

In[28]:= |

Out[28]= |

The number of distinct roots is 32:

In[29]:= |

Out[29]= |

A small perturbation of the second polynomial will cause the system to have 56 distinct roots; this can be assessed from the degree of the separating variable polynomial:

In[30]:= |

Out[31]= |

Wolfram Language 13.0 (December 2021) or above

- 1.0.0 – 14 June 2024

This work is licensed under a Creative Commons Attribution 4.0 International License