# POLYNOMIAL Multivariate Polynomials

POLYNOMIAL, a MATLAB library which adds, multiplies, differentiates, evaluates and prints multivariate polynomials in a space of M dimensions.

Any polynomial in M variables can be written as a linear combination of monomials in M variables. The "total degree" of the polynomial is the maximum of the degrees of the monomials that it comprises. For instance, a polynomial in M = 2 variables of total degree 3 might have the form:

```        p(x,y) = c(0,0) x^0 y^0
+ c(1,0) x^1 y^0 + c(0,1) x^0 y^1
+ c(2,0) x^2 y^0 + c(1,1) x^1 y^1 + c(0,2) x^0 y^2
+ c(3,0) x^3 y^0 + c(2,1) x^2 y^1 + c(1,2) x^1 y^2 + c(0,3) x^0 y^3
```
The monomials in M variables can be regarded as a natural basis for the polynomials in M variables.

When listing the monomials that form a polynomial, it is useful to have an ordering that organizes them. One natural ordering can be illustrated for the 3-dimensional case:

```        1
x, y, z
x^2, xy, xz, y^2, yz, z^2
x^3, x^2y, x^2z, xy^2, xyz, xz^2, y^3, y^2z, yz^2, z^3
x^4, x^3y, ...
```
Here, a monomial precedes another if it has a lower degree. If the monomials have the same degree, then a monomial precedes another if its exponent vector lexically precedes that of the other. In other words, we compare the two exponent vectors, reading from left to right, looking for the first location where the exponents differ. The monomial with the higher exponent at this point precedes the other.

### Languages:

POLYNOMIAL is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

### Related Data and Programs:

COMBO, a MATLAB library which includes routines for ranking, unranking, enumerating and randomly selecting balanced sequences, cycles, graphs, Gray codes, subsets, partitions, permutations, restricted growth functions, Pruefer codes and trees.

LEGENDRE_PRODUCT_POLYNOMIAL, a MATLAB library which defines Legendre product polynomials, creating a multivariate polynomial as the product of univariate Legendre polynomials.

MONOMIAL, a MATLAB library which enumerates, lists, ranks, unranks and randomizes multivariate monomials in a space of M dimensions, with total degree less than N, equal to N, or lying within a given range.

R8POLY, a MATLAB library which contains a number of utilities for polynomials with R8 coefficients, that is, using double precision or 64 bit real arithmetic.

SET_THEORY, a MATLAB library which demonstrates MATLAB commands that implement various set theoretic operations.

SUBSET, a MATLAB library which enumerates, generates, ranks and unranks combinatorial objects including combinations, compositions, Gray codes, index sets, partitions, permutations, subsets, and Young tables.

-