Content of a polynomial
This functionality does not run in MATLAB.
content(p) content(f, <vars>)
content(p) computes the content of the polynomial p or polynomial expression, i.e., the greatest common divisor of its coefficients.
If p is the zero polynomial, then content returns 0.
If p is a non-zero polynomial with coefficient ring IntMod(n) and n is a prime number, then content returns 1. If n is not a prime number, an error message is issued.
Otherwise, content returns 1.
Use icontent for polynomials that are known to have integer or rational coefficients, since it is much faster than content.
Dividing the coefficients of p by its content gives its primitive part. This one can also be obtained directly using polylib::primpart.
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]))
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])
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)
Above, we considered the polynomial as a bivariate polynomial with integer coefficients. We can also consider the same expression 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]))
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]))
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])
If a polynomial or polynomial expression has numeric coefficients and at least one floating-point number is among them, its content is 1:
If not all of the coefficients are numbers, the gcd of the coefficients is returned:
an object of the same type as the coefficients of the polynomial or the value FAIL.