Content - Maple Help

Algebraic

 Content
 content of a polynomial with algebraic number coefficients
 PrimitivePart
 primitive part of a polynomial with algebraic number coefficients

 Calling Sequence Content(a, v, options) Content(a, v, pp, options) PrimitivePart(a, v, options) PrimitivePart(a, v, co, options)

Parameters

 a - polynomial with algebraic number coefficients v - (optional) name, set of names, or list of names co, pp - (optional) unevaluated names options - (optional) equation(s) of the form keyword = value, where keyword is either 'symbolic', 'makeindependent', or 'characteristic'

Options

 • If the option 'symbolic'=true is given and a RootOf whose minimal polynomial factors nontrivially is detected, then it will be reduced to a RootOf of lower degree by picking one of the factors arbitrarily. This will eliminate the possibility of a "reducible RootOf detected" error. The default is 'symbolic'=false.
 • If the option 'characteristic'=p is given, where p is a nonnegative integer, the content and primitive part are computed over an extension of the ring ${\mathrm{ℤ}}_{p}$ of integers modulo p. The default is 'characteristic'=0 and means that the content and primitive part are computed over an extension of the rational numbers.
 • Note that if p is positive but not a prime, then ${\mathrm{ℤ}}_{p}$ is not a field, so Content and PrimitivePart may not be able to perform the computation. If they do not succeed because they encounter an integer that has no inverse modulo p, they issue the error "zero divisor modulo p detected".
 • If the option 'makeindependent'=true is given, then Content and PrimitivePart will always try to find a field representation for algebraic numbers in the input, regardless of how many algebraic objects the input contains. If the input contains many RootOfs, then this can be a very expensive calculation. If 'makeindependent'=false is given, then no independence checking is performed. The default is 'makeindependent'=FAIL, in which case algebraic dependencies will only be checked for if there are $4$ or fewer algebraic objects in the input.

Description

 • The Content and PrimitivePart commands compute the content and primitive part of the multivariate polynomial a with respect to the variable(s) v. The content is defined as a greatest common divisor of the coefficients of a with respect to the indeterminates v and is free of v. The primitive part is a polynomial in v defined as $\frac{a}{\mathrm{Content}\left(a\right)}$.
 • The input a may contain algebraic number coefficients. These may be represented by radicals or with the RootOf notation (see type/algnum, type/radnum). In general, algebraic numbers will be returned in the same representation as they were received in. Nested radicals and RootOfs are also supported.
 • Formally, the input will be considered as an element of the domain K(y)[v], where
 – K is an algebraic field generated over the rationals and any algebraic numbers in a (unless the option 'characteristic' is given; see below).
 – v is the set of indeterminates, which can be given as the optional second argument to Content or PrimitivePart. If the argument v is omitted, then by default, all of the variables in a will be used.
 – y is the set of names and other non-algebraic subexpressions in the input that are not included in v. These will be treated as elements of the coefficient field.
 A primitive part pp of a will then be a polynomial in K[y][v] whose coefficients are relatively prime polynomials in K[y]. The corresponding content co is an element of K(y) such that $a=\mathrm{co}\mathrm{pp}$. The content and primitive part are unique up to a multiplicative constant in K. In particular, it is important to note that the Content and PrimitivePart commands will normalize their output differently, so a will not necessarily be the product of Content(a) and PrimitivePart(a). To obtain the associated factors, use the optional third arguments co and pp (see below).
 • Note that the input must be a polynomial in v, but its coefficients may be rational functions in other variables. The primitive part will always be a polynomial in v whose denominator is $1$, so any factors in the denominator of the input will be considered as part of the content. If a is a polynomial disguised as a rational function, it will first be normalized using Algebraic[Normal].
 • The Content command will return the unsigned content, and if the optional parameter pp is included, it will be assigned the value of the corresponding primitive part. In this case, priority is given to normalizing the content:
 – There are no constant factors in the content. All constant factors are multiplied into the primitive part.
 – The primitive part will contain at most two constant factors, and at most one of them is not a rational number.
 – All remaining non-constant factors in both the content and the primitive part have signed integer content equal to $1$ (except possibly if there is only one non-constant factor in the primitive part).
 • The PrimitivePart command will return the primitive part, and if the optional parameter co is included, it will be assigned the value of the corresponding content. In this case, priority is given to normalizing the primitive part:
 – There are no constant factors in the primitive part, with the possible exception of $-1$, since the content is always unsigned. The denominator of the primitive part is $1$, and all other constant factors are multiplied into the content.
 – The content will contain at most two constant factors, and at most one of them is not a rational number.
 – All remaining non-constant factors in both the content and the primitive part have signed integer content equal to $1$ (except possibly if there is only one non-constant factor in the content).
 • Note that in both Content and PrimitivePart, no effort is made to rationalize leading coefficients or denominators in the output. This helps to keep the output as small and simplified as possible for subsequent computations. To rationalize the output, simply apply Algebraic[Normal] to it.
 • If the input is mathematically equivalent to zero, both the content and the primitive part are defined to be zero.
 • These commands preserve partial factorizations in the input and expand polynomials only if necessary.
 • Non-algebraic sub-expressions such as $\mathrm{sin}\left(x\right)$ that are neither variables, rational numbers, or algebraic objects are frozen and temporarily replaced by new local variables, which are considered as elements of the coefficient field.
 • The v parameter can also contain functions such as $\mathrm{sin}\left(x\right)$, in which case they will be frozen and treated as variables. However, functions that are also of type AlgebraicObject such as $\mathrm{sin}\left(\frac{\mathrm{\pi }}{3}\right)$ will be converted to algebraic numbers before proceeding, so they cannot be treated as variables. Proceed with caution when using functions in v, as treating some functions as variables may produce mathematically unsound results.
 • All algebraic numbers occurring in the results will be reduced modulo their minimal polynomial (see Algebraic,Reduce), and all arguments of functions, if any, will be normalized recursively (see Algebraic,Normal).
 • If the set of radicals and RootOfs in the input cannot be embedded into a field algebraically, then Content and PrimitivePart may not be able to perform the computation. Content and PrimitivePart will try to find a field representation if there are at most $4$ algebraic objects in the input (unless the option 'makeindependent' is given; see below), and otherwise attempt to proceed anyway. If unsuccessful, a "reducible RootOf detected" error will be returned (unless the option 'symbolic'=true is given; see below).
 • These functions do not support input containing floats or radical functions such as $\sqrt{x}$.

Examples

 > $\mathrm{with}\left(\mathrm{Algebraic}\right):$

Introductory examples:

 > $\mathrm{co1}≔\mathrm{Content}\left(xy+\mathrm{sqrt}\left(2\right)x+\mathrm{sqrt}\left(2\right){y}^{2}+2y,x,'\mathrm{pp1}'\right)$
 ${\mathrm{co1}}{≔}\sqrt{{2}}{+}{y}$ (1)
 > $\mathrm{co1}$
 $\sqrt{{2}}{+}{y}$ (2)
 > $\mathrm{pp1}$
 ${y}{}\sqrt{{2}}{+}{x}$ (3)
 > $\mathrm{expand}\left(\mathrm{co1}\mathrm{pp1}\right)$
 ${x}{}{y}{+}{x}{}\sqrt{{2}}{+}\sqrt{{2}}{}{{y}}^{{2}}{+}{2}{}{y}$ (4)
 > $\left[\mathrm{PrimitivePart}\left({x}^{2}+1+xy-Iy,y,'\mathrm{co2}'\right),\mathrm{co2}\right]$
 $\left[{y}{+}{x}{+}{I}{,}{-}{I}{+}{x}\right]$ (5)

The input may contain both radicals and RootOfs. Content and PrimitivePart will embed the coefficients into an algebraic field, if possible:

 > $\left[\mathrm{Content}\left({x}^{2}-3x-1+\left(x-\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}-1\right)\right)y,y,'\mathrm{pp3}'\right),\mathrm{pp3}\right]$
 $\left[{x}{-}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{}{\mathrm{_Z}}{-}{1}\right){,}{y}{+}{x}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}{}{\mathrm{_Z}}{-}{1}\right){-}{3}\right]$ (6)
 > $\left[\mathrm{Content}\left({x}^{2}\mathrm{sqrt}\left(2\right)+{x}^{2}y+y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,\mathrm{index}=1\right),x,'\mathrm{pp4}'\right),\mathrm{pp4}\right]$
 $\left[\sqrt{{2}}{+}{y}{,}{{x}}^{{2}}{+}{1}\right]$ (7)
 > $\left[\mathrm{PrimitivePart}\left(xy+x\mathrm{sqrt}\left(2\right)+y\mathrm{sqrt}\left(3\right)+\mathrm{sqrt}\left(6\right),y,'\mathrm{co5}'\right),\mathrm{co5}\right]$
 $\left[\sqrt{{2}}{+}{y}{,}\sqrt{{3}}{+}{x}\right]$ (8)

Nested and mixed radicals and RootOfs are handled as well:

 > $\left[\mathrm{Content}\left(x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-2,\mathrm{index}=1\right),\mathrm{index}=1\right)\right)+{x}^{2}y+{x}^{2}{2}^{\frac{1}{4}},x,'\mathrm{pp6}'\right),\mathrm{pp6}\right]$
 $\left[{y}{+}{{2}}^{{1}}{{4}}}{,}{{x}}^{{2}}{+}{x}\right]$ (9)

The content and primitive part will be calculated with respect to the variables in v:

 > $\left[\mathrm{Content}\left({x}^{2}{y}^{2}+{x}^{2}y+{y}^{2}x+xy,\left[\right],'\mathrm{pp7}'\right),\mathrm{pp7}\right]$
 $\left[{{x}}^{{2}}{}{{y}}^{{2}}{+}{{x}}^{{2}}{}{y}{+}{{y}}^{{2}}{}{x}{+}{x}{}{y}{,}{1}\right]$ (10)
 > $\left[\mathrm{Content}\left({x}^{2}{y}^{2}+{x}^{2}y+{y}^{2}x+xy,\left[x\right],'\mathrm{pp8}'\right),\mathrm{pp8}\right]$
 $\left[{{y}}^{{2}}{+}{y}{,}{{x}}^{{2}}{+}{x}\right]$ (11)
 > $\left[\mathrm{Content}\left({x}^{2}{y}^{2}+{x}^{2}y+{y}^{2}x+xy,\left[y\right],'\mathrm{pp9}'\right),\mathrm{pp9}\right]$
 $\left[{{x}}^{{2}}{+}{x}{,}{{y}}^{{2}}{+}{y}\right]$ (12)
 > $\left[\mathrm{Content}\left({x}^{2}{y}^{2}+{x}^{2}y+{y}^{2}x+xy,\left[x,y\right],'\mathrm{pp10}'\right),\mathrm{pp10}\right]$
 $\left[{1}{,}{{x}}^{{2}}{}{{y}}^{{2}}{+}{{x}}^{{2}}{}{y}{+}{{y}}^{{2}}{}{x}{+}{x}{}{y}\right]$ (13)

If the v parameter is omitted, then all the variables in the input will be used:

 > $\mathrm{Content}\left({x}^{2}{y}^{2}+{x}^{2}y+{y}^{2}x+xy\right)$
 ${1}$ (14)
 > $\mathrm{PrimitivePart}\left({x}^{2}{y}^{2}+{x}^{2}y+{y}^{2}x+xy\right)$
 ${{x}}^{{2}}{}{{y}}^{{2}}{+}{{x}}^{{2}}{}{y}{+}{{y}}^{{2}}{}{x}{+}{x}{}{y}$ (15)

The coefficients of the input may be rational functions, but the primitive part will always be a polynomial in v with a denominator of 1:

 > $\left[\mathrm{Content}\left(\frac{{x}^{2}}{y}+xy+1,x,'\mathrm{pp11}'\right),\mathrm{pp11}\right]$
 $\left[\frac{{1}}{{y}}{,}{{y}}^{{2}}{}{x}{+}{{x}}^{{2}}{+}{y}\right]$ (16)
 > $\left[\mathrm{PrimitivePart}\left(\frac{{x}^{2}}{\mathrm{sqrt}\left(2\right)}+\frac{x}{Iy},x,'\mathrm{co12}'\right),\mathrm{co12}\right]$
 $\left[\left({x}{}{y}{}\sqrt{{2}}{-}{2}{}{I}\right){}{x}{,}\frac{{1}}{{2}{}{y}}\right]$ (17)

An error message will be returned if any elements of v occur in the denominator of the input:

 > $\mathrm{Content}\left({x}^{2}y+\frac{y}{x},x\right)$
 > $\mathrm{Content}\left({x}^{2}y+\frac{y}{x},\left[x,y\right]\right)$

However, if a is a polynomial in v disguised as a rational function, then it will first be normalized using Algebraic[Normal]:

 > $\mathrm{PrimitivePart}\left(\frac{{x}^{2}yz+2yz}{x+\mathrm{sqrt}\left(2\right)I},\left[x,y\right]\right)$
 ${-}{I}{}\sqrt{{2}}{}{y}{+}{x}{}{y}$ (18)

The content will always be unsigned, so negatives will always be moved into the primitive part, regardless of which command is used:

 > $\left[\mathrm{Content}\left(-xy-y,x,'\mathrm{pp13}'\right),\mathrm{pp13}\right]$
 $\left[{y}{,}{-}{x}{-}{1}\right]$ (19)
 > $\left[\mathrm{PrimitivePart}\left(-xy-y,x,'\mathrm{pp14}'\right),\mathrm{pp14}\right]$
 $\left[{-}{x}{-}{1}{,}{y}\right]$ (20)

Depending on which command is used, priority may be given to normalizing either the content or the primitive part, so the values returned by Content and PrimitivePart can differ by a constant. Here, the constant is $3\sqrt{5}$:

 > $\left[\mathrm{Content}\left(3xy\mathrm{sqrt}\left(5\right)+6y\mathrm{sqrt}\left(10\right),x,'\mathrm{pp15}'\right),\mathrm{pp15}\right]$
 $\left[{y}{,}{6}{}\sqrt{{5}}{}\sqrt{{2}}{+}{3}{}\sqrt{{5}}{}{x}\right]$ (21)
 > $\left[\mathrm{PrimitivePart}\left(3xy\mathrm{sqrt}\left(5\right)+6y\mathrm{sqrt}\left(10\right),x,'\mathrm{co16}'\right),\mathrm{co16}\right]$
 $\left[{x}{+}{2}{}\sqrt{{2}}{,}{3}{}\sqrt{{5}}{}{y}\right]$ (22)

If the input is mathematically equivalent to zero, both the content and the primitive part are, by definition, zero:

 > $\left[\mathrm{Content}\left({x}^{2}+1-\left(x-I\right)\left(x+I\right),x,'\mathrm{pp17}'\right),\mathrm{pp17}\right]$
 $\left[{0}{,}{0}\right]$ (23)
 > $\left[\mathrm{PrimitivePart}\left({x}^{2}+1-\left(x-I\right)\left(x+I\right),x,'\mathrm{co18}'\right),\mathrm{co18}\right]$
 $\left[{0}{,}{0}\right]$ (24)

Factorizations in the input will be preserved and expanded only if necessary:

 > $\left[\mathrm{Content}\left(\left(xy+3y\right)\left(xz+x\right)\left(z+2\right),x,'\mathrm{pp19}'\right),\mathrm{pp19}\right]$
 $\left[{y}{}\left({z}{+}{1}\right){}\left({z}{+}{2}\right){,}\left({x}{+}{3}\right){}{x}\right]$ (25)
 > $\left[\mathrm{Content}\left(\mathrm{expand}\left(\left(xy+3y\right)\left(xz+x\right)\left(z+2\right)\right),x,'\mathrm{pp20}'\right),\mathrm{pp20}\right]$
 $\left[{y}{}{{z}}^{{2}}{+}{3}{}{y}{}{z}{+}{2}{}{y}{,}{{x}}^{{2}}{+}{3}{}{x}\right]$ (26)

Non-algebraic sub-expressions such as $\mathrm{sin}\left(x\right)$ will be frozen and treated as elements of the coefficient field:

 > $\left[\mathrm{Content}\left({x}^{2}\mathrm{sin}\left(x\right)+x\mathrm{sin}\left(x\right)\mathrm{foo}\left(y\right),x,'\mathrm{pp21}'\right),\mathrm{pp21}\right]$
 $\left[{\mathrm{sin}}{}\left({x}\right){,}{\mathrm{foo}}{}\left({y}\right){}{x}{+}{{x}}^{{2}}\right]$ (27)
 > $\left[\mathrm{PrimitivePart}\left(\frac{3x}{\mathrm{foo}\left(y\right)}+\frac{\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\right){x}^{2}}{{\mathrm{foo}\left(y\right)}^{2}},x,'\mathrm{co22}'\right),\mathrm{co22}\right]$
 $\left[\left({\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}\right){}{x}{+}{3}{}{\mathrm{foo}}{}\left({y}\right)\right){}{x}{,}\frac{{1}}{{{\mathrm{foo}}{}\left({y}\right)}^{{2}}}\right]$ (28)

However, whenever possible, such expressions will be converted to algebraic numbers (see ConvertRootOf):

 > $\left[\mathrm{PrimitivePart}\left(xyz\mathrm{sin}\left(\frac{\mathrm{\pi }}{3}\right)+{x}^{2}{y}^{2}{z}^{2}\mathrm{tan}\left(\frac{\mathrm{\pi }}{6}\right),\left[x,y\right],'\mathrm{co23}'\right),\mathrm{co23}\right]$
 $\left[{2}{}{z}{}{{y}}^{{2}}{}{{x}}^{{2}}{+}{3}{}{x}{}{y}{,}\frac{\sqrt{{3}}{}{z}}{{6}}\right]$ (29)
 > $\left[\mathrm{Content}\left(x\left({y}^{2}+\mathrm{exp}\left(I\mathrm{\pi }\right)\right)+y-\mathrm{sec}\left(\mathrm{\pi }\right),x,'\mathrm{pp24}'\right),\mathrm{pp24}\right]$
 $\left[{y}{+}{1}{,}{x}{}{y}{-}{x}{+}{1}\right]$ (30)

Non-algebraic functions can also be included in the v parameter, as long as they are not of type Algebraic Object:

 > $\left[\mathrm{Content}\left({\mathrm{sin}\left(x\right)}^{2}\mathrm{cos}\left(y\right)+\mathrm{sin}\left(x\right)\mathrm{cos}\left(y\right),\mathrm{sin}\left(x\right),'\mathrm{pp25}'\right),\mathrm{pp25}\right]$
 $\left[{\mathrm{cos}}{}\left({y}\right){,}{{\mathrm{sin}}{}\left({x}\right)}^{{2}}{+}{\mathrm{sin}}{}\left({x}\right)\right]$ (31)
 > $\mathrm{Content}\left({\mathrm{sin}\left(\frac{\mathrm{\pi }}{9}\right)}^{2}\mathrm{cos}\left(y\right)+\mathrm{sin}\left(\frac{\mathrm{\pi }}{9}\right)\mathrm{cos}\left(y\right),\mathrm{sin}\left(\frac{\mathrm{\pi }}{9}\right)\right)$

The arguments of functions in the input will be recursively normalized and simplified (see Algebraic,Normal):

 > $\mathrm{Content}\left(\mathrm{sin}\left(\frac{{x}^{2}-3}{x-\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\right)}\right)x+\mathrm{sin}\left(x+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\right)\right),x\right)$
 ${\mathrm{sin}}{}\left({x}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{3}\right)\right)$ (32)
 > $\mathrm{Content}\left(\mathrm{sin}\left(x\right){y}^{2}+\mathrm{cos}\left(x-\frac{\mathrm{\pi }}{2}\right)y,y\right)$
 ${\mathrm{sin}}{}\left({x}\right)$ (33)

Non-algebraic functions in the input may become algebraic after recursive treatment:

 > $\left[\mathrm{Content}\left(xy-x+y+\mathrm{cos}\left(\frac{\mathrm{\pi }y+\mathrm{\pi }}{y+1}\right),x,'\mathrm{pp26}'\right),\mathrm{pp26}\right]$
 $\left[{y}{-}{1}{,}{x}{+}{1}\right]$ (34)

All algebraic numbers will be reduced modulo their minimal polynomial (see Reduce):

 > $\left[\mathrm{PrimitivePart}\left(xy+x{\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-\mathrm{_Z}-3\right)}^{2}+y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-\mathrm{_Z}-3\right)+3,x,'\mathrm{co27}'\right),\mathrm{co27}\right]$
 $\left[{x}{+}{1}{,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{\mathrm{_Z}}{-}{3}\right){+}{y}{+}{3}\right]$ (35)

Algebraic functions such as $\sqrt{y}$ are not accepted:

 > $\mathrm{Content}\left({x}^{2}y+2x\mathrm{sqrt}\left(y\right)+xy,x\right)$

Floats are not accepted.

 > $\mathrm{Content}\left(\frac{{x}^{2}}{2}-x\cdot 0.5\right)$

When a non-indexed RootOf is given in the input, sometimes the content and primitive part can still be computed:

 > $\left[\mathrm{Content}\left({x}^{2}\left({y}^{2}-4\right)+x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-4\right)\right),x,'\mathrm{pp28}'\right),\mathrm{pp28}\right]$
 $\left[{y}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{4}\right){,}{{x}}^{{2}}{}{y}{-}{{x}}^{{2}}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{4}\right){+}{x}\right]$ (36)
 > $\left[\mathrm{Content}\left({x}^{2}\left({y}^{2}-4\right)+x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-4,\mathrm{index}=1\right)\right),x,'\mathrm{pp29}'\right),\mathrm{pp29}\right]$
 $\left[{y}{+}{2}{,}{{x}}^{{2}}{}{y}{-}{2}{}{{x}}^{{2}}{+}{x}\right]$ (37)

However, in this case, Content and PrimitivePart must know whether $\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}+2\right)$ without an index represents $1$ or $2$ in order to determine whether the coefficients of the input can be factored out into the content:

 > $\left[\mathrm{Content}\left({x}^{2}\left(y+1\right)+x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}+2,\mathrm{index}=1\right)\right),x,'\mathrm{pp30}'\right),\mathrm{pp30}\right]$
 $\left[{y}{+}{1}{,}{{x}}^{{2}}{+}{x}\right]$ (38)
 > $\left[\mathrm{Content}\left({x}^{2}\left(y+1\right)+x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}+2,\mathrm{index}=2\right)\right),x,'\mathrm{pp31}'\right),\mathrm{pp31}\right]$
 $\left[{1}{,}{{x}}^{{2}}{}{y}{+}{{x}}^{{2}}{+}{x}{}{y}{+}{2}{}{x}\right]$ (39)
 > $\mathrm{Content}\left({x}^{2}\left(y+1\right)+x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}+2\right)\right),x\right)$

To force Content or PrimitivePart to reduce this RootOf to one of lower degree by picking one of the substitutions arbitrarily, use option 'symbolic'=true. Here, it makes the substitution $\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}+2\right)$ = $2$:

 > $\left[\mathrm{Content}\left({x}^{2}\left(y+1\right)+x\left(y+\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-3\mathrm{_Z}+2\right)\right),x,'\mathrm{pp32}','\mathrm{symbolic}'=\mathrm{true}\right),\mathrm{pp32}\right]$
 $\left[{1}{,}{{x}}^{{2}}{}{y}{+}{{x}}^{{2}}{+}{x}{}{y}{+}{2}{}{x}\right]$ (40)

Non-indexed RootOfs can be treated as constants, even if one of them is a zero divisor. However, if the input contains a zero divisor as a common factor, then it will always be left in the primitive part:

 > $\left[\mathrm{PrimitivePart}\left({x}^{2}\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-8\mathrm{_Z}-3\right)+x\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-8\mathrm{_Z}-3\right),x,'\mathrm{co33}'\right),\mathrm{co33}\right]$
 $\left[{{x}}^{{2}}{+}{x}{,}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{8}{}{\mathrm{_Z}}{-}{3}\right)\right]$ (41)
 > $\left[\mathrm{PrimitivePart}\left({x}^{2}\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-8\mathrm{_Z}\right)+x\mathrm{RootOf}\left({\mathrm{_Z}}^{2}-8\mathrm{_Z}\right),x,'\mathrm{co34}'\right),\mathrm{co34}\right]$
 $\left[{{x}}^{{2}}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{8}{}{\mathrm{_Z}}\right){+}{x}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{8}{}{\mathrm{_Z}}\right){,}{1}\right]$ (42)

Using option 'characteristic', the content and primitive part can be computed over finite fields:

 > $\left[\mathrm{Content}\left(xy+4x+3y+2,x,'\mathrm{pp35}'\right),\mathrm{pp35}\right]$
 $\left[{1}{,}{x}{}{y}{+}{4}{}{x}{+}{3}{}{y}{+}{2}\right]$ (43)
 > $\left[\mathrm{Content}\left(xy+4x+3y+2,x,'\mathrm{pp36}','\mathrm{characteristic}'=5\right),\mathrm{pp36}\right]$
 $\left[{y}{+}{4}{,}{x}{+}{3}\right]$ (44)
 > $\left[\mathrm{PrimitivePart}\left({x}^{2}\left({y}^{2}-6\right)+x\left({y}^{2}+2Iy-1\right),x,'\mathrm{co37}','\mathrm{characteristic}'=7\right),\mathrm{co37}\right]$
 $\left[{{x}}^{{2}}{}{y}{+}{6}{}{I}{}{{x}}^{{2}}{+}{x}{}{y}{+}{I}{}{x}{,}{y}{+}{I}\right]$ (45)

In composite characteristic, the content and primitive part cannot always be computed. Content and PrimitivePart will return an error if they encounter a zero divisor:

 > $\left[\mathrm{Content}\left(2xy+x+4y+2,x,'\mathrm{pp38}','\mathrm{characteristic}'=9\right),\mathrm{pp38}\right]$
 $\left[{y}{+}{5}{,}{2}{}{x}{+}{4}\right]$ (46)
 > $\mathrm{Content}\left(2xy+x+4y+2,x,'\mathrm{characteristic}'=10\right)$

With the value of 'makeindependent' set to true, the input will be checked for algebraic dependencies even if there are more than $4$ algebraic objects in the input:

 > $\mathrm{CubeRootOf}\left[-4\right]≔\mathrm{RootOf}\left({\mathrm{_Z}}^{3}+4,\mathrm{index}=1\right)$
 ${{\mathrm{CubeRootOf}}}_{{-4}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{4}{,}{\mathrm{index}}{=}{1}\right)$ (47)
 > $\mathrm{CubeRootOf}\left[-2\right]≔\mathrm{RootOf}\left({\mathrm{_Z}}^{3}+2,\mathrm{index}=1\right)$
 ${{\mathrm{CubeRootOf}}}_{{-2}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{2}{,}{\mathrm{index}}{=}{1}\right)$ (48)
 > $\mathrm{CubeRootOf}\left[2\right]≔\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-2,\mathrm{index}=1\right)$
 ${{\mathrm{CubeRootOf}}}_{{2}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{2}{,}{\mathrm{index}}{=}{1}\right)$ (49)
 > $\mathrm{CubeRootOf}\left[3\right]≔\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-3,\mathrm{index}=1\right)$
 ${{\mathrm{CubeRootOf}}}_{{3}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{3}{,}{\mathrm{index}}{=}{1}\right)$ (50)
 > $\mathrm{CubeRootOf}\left[4\right]≔\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-4,\mathrm{index}=1\right)$
 ${{\mathrm{CubeRootOf}}}_{{4}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{4}{,}{\mathrm{index}}{=}{1}\right)$ (51)
 > $\mathrm{CubeRootOf}\left[6\right]≔\mathrm{RootOf}\left({\mathrm{_Z}}^{3}-6,\mathrm{index}=1\right)$
 ${{\mathrm{CubeRootOf}}}_{{6}}{≔}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{6}{,}{\mathrm{index}}{=}{1}\right)$ (52)
 > $\left[\mathrm{PrimitivePart}\left(x\left(y+\mathrm{CubeRootOf}\left[4\right]\mathrm{CubeRootOf}\left[-2\right]\mathrm{CubeRootOf}\left[3\right]\right)+y+\mathrm{CubeRootOf}\left[-4\right]\mathrm{CubeRootOf}\left[6\right],x,'\mathrm{co39}'\right),\mathrm{co39}\right]$
 > $\left[\mathrm{PrimitivePart}\left(x\left(y+\mathrm{CubeRootOf}\left[4\right]\mathrm{CubeRootOf}\left[-2\right]\mathrm{CubeRootOf}\left[3\right]\right)+y+\mathrm{CubeRootOf}\left[-4\right]\mathrm{CubeRootOf}\left[6\right],x,'\mathrm{co40}','\mathrm{makeindependent}'=\mathrm{true}\right),\mathrm{co40}\right]$
 $\left[{x}{+}{1}{,}\frac{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{+}{2}{,}{\mathrm{index}}{=}{1}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{6}{,}{\mathrm{index}}{=}{1}\right){}{{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{4}{,}{\mathrm{index}}{=}{1}\right)}^{{2}}}{{2}}{+}{y}\right]$ (53)

With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:

 > $\left[\mathrm{PrimitivePart}\left(x\left(y+\mathrm{CubeRootOf}\left[2\right]\mathrm{CubeRootOf}\left[3\right]\right)+y+\mathrm{CubeRootOf}\left[6\right],x,'\mathrm{co41}'\right),\mathrm{co41}\right]$
 $\left[{x}{+}{1}{,}{y}{+}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{6}{,}{\mathrm{index}}{=}{1}\right)\right]$ (54)
 > $\left[\mathrm{PrimitivePart}\left(x\left(y+\mathrm{CubeRootOf}\left[2\right]\mathrm{CubeRootOf}\left[3\right]\right)+y+\mathrm{CubeRootOf}\left[6\right],x,'\mathrm{co42}','\mathrm{makeindependent}'=\mathrm{false}\right),\mathrm{co42}\right]$