Content of a polynomial with rational coefficients
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.
icontent(p) calculates the content of a polynomial or polynomial expression with
integer or rational coefficients, i.e., the greatest common divisor
of the coefficients, such that
p/ icontent(p) has
integral coefficients whose greatest common divisor is
In particular, if
p is itself an integer or a rational
abs(p) (see Example 1).
p is a polynomial or polynomial expression with
integer coefficients, then the content is the greatest common divisor
of the coefficients. If
p is a polynomial or polynomial
expression with rational coefficients, then the content is the greatest
common divisor of the numerators of the coefficients divided by the
least common multiple of the denominators (see Example 2).
icontent returns an error message if not
all coefficients of
p are integers or rational
The first argument can be a polynomial or a polynomial expression.
The following two calls of
icontent are equivalent:
p := 6*x*y - 9*y^2 + 21: icontent(poly(p)), icontent(p)
The result of
icontent is always nonnegative:
icontent(2*x - 4), icontent(-2*x + 4)
The content of a constant polynomial is its absolute value:
icontent(0), icontent(-2), icontent(poly(-2, [x]))
The content of a polynomial with rational coefficients is a rational number in general:
q := 6/7*x*y - 9/4*y + 12: icontent(poly(q)), icontent(q)
The polynomial divided by its content has integral coefficients
whose greatest common divisor is