Skip to content

PolynomialGCD

PolynomialGCD[a, b] calculates the polynomial GCD of a and b.

Attributes[PolynomialGCD] := {Listable, Protected}

Simple examples

In[1]:= PolynomialGCD[15 + 13*a + 2*a^2, 10 + 7*a + a^2]
Out[1]= 5 + a
In[2]:= PolynomialGCD[15 + 13*a + 5*a^2 + 2*a^3, 10 + 7*a + 3*a^2 + a^3]
Out[2]= 5 + a + a^2
In[3]:= PolynomialGCD[15 + 13*a + a^2*-1 + (2*a^3)*-1, 5 + a + a^2*-1]
Out[3]= -5 + a*-1 + a^2