Skip navigation links

Package com.singularsys.extensions.polynomials

An advanced simplification/expansion/comparison algorithm.

See: Description

Package com.singularsys.extensions.polynomials Description

An advanced simplification/expansion/comparison algorithm. To use
PolynomialCreator pc = new PolynomialCreator(jep);
Node simp = pc.simplify(node);
Node expand = pc.expand(node);
boolean flag = pc.equals(node1,node2);
int res =,node2);
PNodeI poly = pc.createPoly(node);

How it works

The basic idea is to reduce each equation to a canonical form based on a total ordering of the terms. For example a polynomial in x will always be in the form a+b x+c x^2+d x^3. This makes comparison of two polynomials easy as it is just necessary to compare term by term, whereas it is dificult to compare x^2-1 with (x+1)*(x-1) without any simplification or reordering is tricky.

As an illustration some of the rules for the ordering are 0<1<2, 5<x, x<x^2<x^3, x<y.

A polynomial is constructed from a set of monomials by arranging the monomials in order. Likewise a monomial is constructed from a set of variables by arranging the variables in name order.

The algorithm can also work with non-polynomial equations. Functions are order by the name of the function and the ordering of their arguments. Hence cos(x)<sin(x)<sin(y).

Jep 3.5 / Extensions 2.0
See Also:
Polynomials documentation
Skip navigation links

Copyright © 2018 Singular Systems