This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Eliminate variables

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.


groebner::eliminate(sys, vars)


groebner::eliminate(sys, vars) returns a list of polynomial expressions obtained by eliminating the elements of vars from sys. In other words, the return value does not contain the variables in vars, every zero of the original system sys must be a zero of the return value, and every tuple of numbers that makes the return value zero can be extended to a solution of sys.


Example 1

Suppose that x2 + y = 0 and x + y = 0, what does this imply for y?

groebner::eliminate({x^2 +y, y+x}, {x})

We infer that for every pair (x, y) solving the system, y must satisfy y2 + y = 0, that is, y = 0 or y = - 1. Indeed:

solve({x^2 +y, y+x}, {x, y})



A set or list of polynomial expressions. The coefficients in these polynomial expressions can be arbitrary arithmetical expressions.


A set or list of identifiers

Return Values

List of polynomial expressions


groebner::eliminate proceeds by computing a lexical-order Gröbner basis. Hence the computation complexity grows fast when increasing the number of variables.

See Also

MuPAD Functions

Was this topic helpful?