Message Boards Message Boards


Unexpected result of PolynomialGCD

Posted 3 months ago
3 Replies
1 Total Likes

I recently got an unexpected result to the following:

PolynomialGCD[x^4 + x + 3/(4*2^(2/3)), 4*x^3 + 1]

Output was ⅛, but I expected x + 1/(2^(2/3)) or a multiple thereof, since that polynomial is a factor:

Expand[ (2^(2/3) - 2*2^(1/3) x + 4 x^2) * (x + 1/2^(2/3))]
= 1 + 4x^3


Expand[(3/4 + x/(2*2^(1/3)) - x^2/2^(2/3) + x^3) * (x + 1/2^(2/3))]
= 3/(4 2^(2/3)) + x + x^4

I also don't quite understand the remark under 'Properties' in this description of PolynomialExtendedGCD where it says 'd is equal to PolynomialGCD[f,g] up to a factor not containing x'. If I try that:

PolynomialExtendedGCD[x^4 + x + 3/(4*2^(2/3)), 4*x^3 + 1, x]
= {2^(1/3) + 2 x, {8/3, -((2 x)/3)}}

Here 2^(1/3) + 2x takes the place of d, and it indeed is a multiple of x + 1/(2^(2/3)). Can someone corroborate that this is a bug, or enlighten me as to why I should expect this behavior? If this is not a bug, how should I interpret the remark in the documentation of PolynomialExtendedGCD I referred to earlier?

3 Replies

By default PolynomialGCD does not use any algebraic extension.

In[159]:= Options[PolynomialGCD]

(* Out[159]= {Extension -> None, Modulus -> 0, Trig -> False} *)

It is easy to make it use whatever algebraics appear in the input.

In[160]:= PolynomialGCD[x^4 + x + 3/(4*2^(2/3)), 4*x^3 + 1, 
 Extension -> Automatic]

(* Out[160]= 2^(1/3) + 2 x *)

Now that you mentioned this, I was able to find that in the documentation, great!

I guess I still need to get used to how to read the documentation, I was somehow expecting all important options to be visible in the initial blue bit. Thank you for your help! What are the flags I should use if I want 'd is equal to PolynomialGCD[f,g] up to a factor not containing x' to hold?

The Automatic setting for Extension will probably suffice for what you want.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract