Previous Page Next Page Contents

content -- the content of a polynomial

Introduction

content(p) computes the content of the polynomial p, i.e., the gcd of its coefficients.

Call(s)

content(p)
content(f <, vars>)

Parameters

p - a polynomial of type DOM_POLY
f - a polynomial expression
vars - a list of indeterminates of the polynomial: typically, identifiers or indexed identifiers

Returns

an arithmetical expression, or the value FAIL.

Overloadable:

p

Related Functions

coeff, factor, gcd, icontent, ifactor, igcd, ilcm, lcm, poly, polylib::primpart

Details

Example 1

If p is a polynomial with integer or rational coefficients, the result is the same as for icontent:

>> content(poly(6*x^3*y + 3*x*y + 9*y, [x, y]))
                                     3

The following call, where the first argument is a polynomial expression and not a polynomial, is equivalent to the one above:

>> content(6*x^3*y + 3*x*y + 9*y, [x, y])
                                     3

If no list of indeterminates is specified, then poly converts the expression into a polynomial with respect to all occurring indeterminates, and we obtain yet another equivalent call:

>> content(6*x^3*y + 3*x*y + 9*y)
                                     3

Above, we considered the polynomial as a bivariate polynomial with integer coefficients. We can also consider the same polynomial as a univariate polynomial in x, whose coefficients contain a parameter y. Then the coefficients and their gcd--the content--are polynomial expressions in y:

>> content(poly(6*x^3*y + 3*x*y + 9*y, [x]))
                                    3 y

Here is another example where the coefficients and the content are again polynomial expressions:

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

The following call is equivalent to the previous one:

>> content(4*x*y + 6*x^3 + 6*x*y^2 + 9*x^3*y, [x])
                                  3 y + 2

Example 2

If a polynomial or polynomial expression has numeric coefficients and at least one floating point number is among them, its content is 1:

>> content(2.0*x+2.0)
                                     1

Example 3

If not all of the coefficients are numbers, the gcd of the coefficients is returned:

>> content(poly(x^2*y+x, [y]))
                                     x

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000