
nthterm - the n-th term of a polynomial

Calling sequence:
nthterm(poly, integer)
nthterm(expr [ , indets ], integer)
indets  ---> [ expr_1 ...]

Parameter:
poly           --  polynomial
expr, expr_1   --  expressions
integer        --  positive integer

Overloading:

1

Summary:

nthterm(p, n) returns the n-th term of the polynomial p.  The terms are
orderd lexicographically.  If n is larger than the number of terms in the
polynomial then the function returns FAIL. A zero polynomial has no terms
and, therefore, always returns FAIL.

The first argument of nthterm is allowed to be a polynomial or an expression
and optionally a listof indeterminates.  An expression is converted into a

polynomial in the specified indeterminates (see function poly).  nthterm
returns FAIL if the expression cannot be converted into a polynomial. The
result is of the same type as the first argument, e.g. if the argument is a
polynomial then the result is a polynomial too. nthterm is a kernel function.

>>  nthterm(3*x^3+6*x^2*y^2+2, [x,y], 2);

      x^2*y^2

>>  nthterm(poly(3*x^3+6*x^2*y^2+2, [x,y]), 3);

      poly(1, [x,y])

>>  nthterm(poly(3*x^3+6*x^2*y^2+2, [x,y]), 4);

      FAIL

See also:   lcoeff , lmonomial , lterm , nterms , nthcoeff , nthmonomial ,
poly, tcoeff

