Maxima Function
poly_expand (poly, varlist)
This function parses polynomials to internal form and back. It
is equivalent to expand(poly)
if poly parses correctly to
a polynomial. If the representation is not compatible with a
polynomial in variables varlist, the result is an error.
It can be used to test whether an expression correctly parses to the
internal representation. The following examples illustrate that
indexed and transcendental function variables are allowed.
(%i1) poly_expand((x-y)*(y+x),[x,y]); 2 2 (%o1) x - y (%i2) poly_expand((y+x)^2,[x,y]); 2 2 (%o2) y + 2 x y + x (%i3) poly_expand((y+x)^5,[x,y]); 5 4 2 3 3 2 4 5 (%o3) y + 5 x y + 10 x y + 10 x y + 5 x y + x (%i4) poly_expand(-1-x*exp(y)+x^2/sqrt(y),[x]); 2 y x (%o4) - x %e + ------- - 1 sqrt(y) (%i5) poly_expand(-1-sin(x)^2+sin(x),[sin(x)]); 2 (%o5) - sin (x) + sin(x) - 1