content - Maple Help

content

content of a multivariate polynomial

primpart

primitive part of a multivariate polynomial

 Calling Sequence content(a, x, 'pp') primpart(a, x, 'co')

Parameters

 a - multivariate polynomial in x x - (optional) name or set or list of names pp - (optional) unevaluated name co - (optional) unevaluated name

Description

 • If a is an expanded multivariate polynomial in x, content returns the content of a with respect to x, i.e. the greatest common divisor of the coefficients of a with respect to the indeterminate(s) x, and primpart returns a divided by the content of a.
 • content and primpart are extended to rational functions in normal form multiplicatively:

$f\left(\frac{ab}{c}\right)=\frac{f\left(a\right)f\left(b\right)}{f\left(c\right)}$

 where f may be content or primpart. Rational functions not in normal form will be normalized first. If the input a is not rational in x, it will result in an error.
 • The indeterminate(s) x can be a name, or a list or set of names. If x is not specified, then its default value is the set of all indeterminates occurring in a, as determined by indets.
 • When content is called with a third argument pp, pp is assigned the primitive part of a. Similarly, when primpart is called with a third argument co, co is assigned the content of a.
 • For all inputs, the primitive part is an expression in rational normal form consisting of a product of polynomial factors each with content 1.
 • The coefficients in a can be arbitrary expressions independent of x. Any floating point values are left untouched: any floating-point value is assumed to be indivisible with respect to any other value. Other nonpolynomial, nonrational subexpressions get the same treatment unless they are syntactically equal.
 • The sign is removed from the content, and not removed from the primitive part.

Examples

The content of a univariate integer polynomial is the GCD of its coefficients.

 > $\mathrm{content}\left(3-3x,x\right)$
 ${3}$ (1)

The content of a multivariate polynomial a with respect to some of its variable(s) x is the GCD of its coefficients, considering a as a polynomial in the variable(s) x with any remaining variables being part of the coefficient ring. In the example below, a is viewed as a polynomial in x with coefficients that are polynomials in y. The example after that takes the same polynomial, but views it as a multivariate polynomial in x and y with integer coefficients.

 > $\mathrm{content}\left(3xy+6{y}^{2},x\right)$
 ${3}{}{y}$ (2)
 > $\mathrm{content}\left(3xy+6{y}^{2},\left[x,y\right]\right)$
 ${3}$ (3)

The following example computes not just the content, but also the primitive part.

 > $\mathrm{content}\left(-4xy+6{y}^{2},x,'\mathrm{pp}'\right)$
 ${2}{}{y}$ (4)
 > $\mathrm{pp}$
 ${3}{}{y}{-}{2}{}{x}$ (5)

In this example, you can see the effect of calling normal, which happens because the polynomial doesn't have purely numeric coefficients (the coefficient of x is $\frac{1}{a}$).

 > $\mathrm{content}\left(\frac{x}{a}-\frac{1}{2},x,'\mathrm{pp}'\right)$
 $\frac{{1}}{{2}{}{a}}$ (6)
 > $\mathrm{pp}$
 ${2}{}{x}{-}{a}$ (7)
 > $\mathrm{normal}\left(\frac{x}{a}-\frac{1}{2}\right)$
 ${-}\frac{{-}{2}{}{x}{+}{a}}{{2}{}{a}}$ (8)

Alternatively, if a is included as an indeterminate, the denominator $\frac{1}{a}$ is included in the primpart rather than the content:

 > $\mathrm{content}\left(\frac{x}{a}-\frac{1}{2},\left\{x,a\right\},'\mathrm{pp}'\right)$
 $\frac{{1}}{{2}}$ (9)
 > $\mathrm{pp}$
 $\frac{{2}{}{x}{-}{a}}{{a}}$ (10)

Floating point coefficients are considered indivisible with respect to each other -- even if they are equal. As a consequence, the content in the following example is 1.

 > $\mathrm{content}\left(2.ux-2.v,x,'\mathrm{pp}'\right)$
 ${1}$ (11)
 > $\mathrm{pp}$
 ${2.}{}{u}{}{x}{-}{2.}{}{v}$ (12)

In the presence of floating-point numbers, other content is still detected. For example, the factor u below.

 > $\mathrm{content}\left(2.ux-2.u,x,'\mathrm{pp}'\right)$
 ${u}$ (13)
 > $\mathrm{pp}$
 ${2.}{}{x}{-}{2.}$ (14)

Non-numeric, nonpolynomial coefficients are also considered indivisible with respect to each other. For example, you could consider $\sqrt{2}$ to be a common divisor between the two coefficients $\sqrt{10}$ and $\sqrt{6}$, but they are considered indivisible with respect to each other for this command and the content is considered to be 1.

 > $\mathrm{content}\left(\sqrt{10}x+\sqrt{6},x\right)$
 ${1}$ (15)

The primpart command computes just the primitive part of the expression.

 > $\mathrm{primpart}\left(-4xy+6{y}^{2},x\right)$
 ${3}{}{y}{-}{2}{}{x}$ (16)
 > $\mathrm{primpart}\left(\frac{x}{a}-\frac{1}{2},x\right)$
 ${2}{}{x}{-}{a}$ (17)

Compatibility

 • The a parameter was updated in Maple 2023.