Content of a polynomial
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
content(p) computes the content of the polynomial
polynomial expression, i.e., the greatest common divisor of its coefficients.
p is the zero polynomial, then
content returns 0.
p is a non-zero polynomial with
a prime number, then
content returns 1.
n is not a prime number, an error message is
content returns 1.
polynomials that are known to have integer or rational coefficients,
since it is much faster than
Dividing the coefficients of
p by its content
gives its primitive part. This one can also be obtained directly using
p is a polynomial with integer or rational
coefficients, the result is the same as for
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
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