DistanceToCommonDivisors - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Polynomials : SNAP Package : DistanceToCommonDivisors

SNAP

  

DistanceToCommonDivisors

  

compute a lower bound on the distance between a pair of univariate polynomials and the set of univariate polynomial pairs with a common root

  

DistanceToSingularPolynomials

  

compute a lower bound on the distance between a univariate polynomial and the set of univariate polynomials with a double root

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

DistanceToCommonDivisors(a, b, z, tau = eps, out)

DistanceToSingularPolynomials(a, z, tau = eps, out)

Parameters

a, b

-

univariate numeric polynomials

z

-

name; indeterminate for a and b

tau = eps

-

(optional) equation where eps is of type numeric and non-negative; stability parameter

out

-

(optional) equation of the form output = obj where obj is one of 'LB', 'BC', 'E', 'LAB', 'QGCD', 'RB' or 'UR', or a list containing one or more instances of these names; select result objects to compute

Description

• 

The DistanceToCommonDivisors(a, b, z) command returns a lower bound on the distance between (a,b) and the set of univariate complex polynomial pairs in z with degrees that do not exceed those of a and b, and that have at least one common root. Thus, the input polynomials a and b are regarded as polynomials in z.

  

This lower bound is a non-negative floating-point number obtained by computing in a weakly stable way the first and the last columns of the inverse of the Sylvester matrix defined by polynomials a and b. More precisely, denoting these two columns by c1 and c2, the lower bound is defined in [1] as the inverse of || [c1, c2] ||.

  

Here, the norm || || is based on the classical 1-norm for vectors. If C is an m by n matrix, || C || is the maximum value of the sum sum(abs(C[i, j]), i=1..m) for j=1..n.

  

If the problem of computing the columns c1, c2 from the Sylvester matrix S is well-conditioned, the DistanceToCommonDivisors(a, b, z) call returns the above lower bound. Otherwise, FAIL is returned because a numerical answer would be meaningless ("weak stability"). However, the cause of failure can be displayed by setting infolevel[DistanceToCommonDivisors] to 5.

• 

The DistanceToSingularPolynomials(a, z) command returns a lower bound on the distance between a univariate numeric polynomial and the set of univariate complex polynomials with a double root. It essentially calls DistanceToSingularPolynomials(a, b, z) with b = diff(a, z).

• 

The optional stability parameter tau can be set to any non-negative value eps to control the quality of the output. Decreasing eps yields a more reliable solution. Increasing eps reduces the risk of failure.

• 

The output option (out) determines the content of the returned expression sequence.

  

As specified by the out option, Maple returns an expression sequence containing one or more of the following quantities:

  

* The lower bound LB is a non-negative float or FAIL.

  

* The list BC is equal to [v, u], the numeric polynomials in z that satisfy av+bu=1 and degreeu&comma;z<degreea&comma;z and degreev&comma;z<degreeb&comma;z (bezout coefficients for coprime polynomials a and b). This list is empty if and only if the algorithm fails to compute a reliable lower bound.

  

* The list LAB is equal to [a', b'] where a', b' are the numeric polynomials in z that define the last accepted basis in [2].

  

* E can take the following values: the residual error for the computed lower bound (which allows the verification of the numerical quality of the solution). If no reliable lower bound is computed and if an epsilon-GCD g for (a, b) is found, then E=ε and g = a' (that is, the first component of the last accepted basis) when degreeb&comma;z<degreea&comma;z and g = b' (that is, the second component of the last accepted basis) when degreea&comma;z<degreeb&comma;z. If no epsilon-GCD for (a, b) is found, E=FAIL.

  

* QGCD can take the following values: the precision of the quasi-GCD found; in this case, the quasi-GCD is a', the first component of the last accepted basis. When no quasi-GCD is found, QGCD=FAIL.

  

* List RB of the indices of all the bases (see [2]) rejected during the computation.

  

* UR contains a 2 by 2 unimodular matrix polynomial U in z such that a,b&period;U=a&apos;,b&apos; where (a', b') is the last basis accepted by the algorithm of [2].

Examples

withSNAP&colon;

az2+3.1z2

az2+3.1z2

(1)

b2z3+1.5

b2z3+1.5

(2)

DistanceToCommonDivisorsa&comma;b&comma;z

0.876183368229130

(3)

distDistanceToCommonDivisorsa&comma;b&comma;z&comma;output=LB&comma;BC

dist0.876183368229130,0.265488243398524z20.124626264127645z0.144635068001349&comma;0.132744121699262z+0.473819909331534

(4)

fnormalexpandadist21+bdist22

1.

(5)

A call to DistanceToSingularPolynomials(a,z) is essentially a call to DistanceToCommonDivisors(a,diff(a,z),z).

az2+3.1z2

az2+3.1z2

(6)

DistanceToSingularPolynomialsa&comma;z

0.598572399728076

(7)

bdiffa&comma;z

b2z+3.1

(8)

DistanceToCommonDivisorsa&comma;b&comma;z

0.598572399728076

(9)

References

  

Beckermann, B., and Labahn, G. "A fast and numerically stable Euclidean-like algorithm for detecting relatively prime numerical polynomials." Journal of Symbolic Computation. Vol. 26, (1998): 691-714.

  

Beckermann, B., and Labahn, G. "When are two numerical polynomials relatively prime?" Journal of Symbolic Computation. Vol. 26, (1998): 677-689.

See Also

diff

expand

SNAP[AreCoprime]

SNAP[EpsilonGCD]

SNAP[IsSingular]

SNAP[QuasiGCD]