Previous Page Next Page Contents

polylib::primpart -- primitive part of a polynomial

Introduction

polylib::primpart(f) returns the primitive part of the polynomial f.

Call(s)

polylib::primpart(f)
polylib::primpart(q)
polylib::primpart(xpr <inds>)

Parameters

f - polynomial
q - rational number
xpr - expression
inds - list of identifiers

Returns

polylib::primpart returns an object of the same type as the input, or FAIL.

Related Functions

content, factor, gcd, icontent, irreducible

Details

Example 1

In the following example, a bivariate polynomial is given. Its coefficients are the integers 3, 6, and 9; the primitive part is obtained by dividing the polynomial by their gcd.

>> polylib::primpart(poly(6*x^3*y + 3*x*y + 9*y, [x, y]));
                             3
                     poly(2 x  y + x y + 3 y, [x, y])

However, consider the same polynomial viewed as a univariate polynomial in x. Its coefficients are polynomials in y in this case, and their gcd 3*y is divided off.

>> polylib::primpart(poly(6*x^3*y + 3*x*y + 9*y, [x]));
                                  3
                          poly(2 x  + x + 3, [x])

Example 2

polylib::primpart divides the coefficients by their gcd, but does not normalize the result. This must be done explicitly:

>> polylib::primpart(4*x*y + 6*x^3 + 6*x*y^2 + 9*x^3*y, [x])
                        3                         2
                       x  (9 y + 6)   x (4 y + 6 y )
                       ------------ + --------------
                         3 y + 2         3 y + 2
>> normal(polylib::primpart(4*x*y + 6*x^3 + 6*x*y^2 + 9*x^3*y, [x]))
                                          3
                               2 x y + 3 x

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000