ExtendedGCD Command

From GeoGebra Manual
Jump to: navigation, search


CAS Syntax

ExtendedGCD( <Polynomial>, <Polynomial> )
Returns a list containing the polynomial coefficients S(x), T(x) of Bézout's identity for polynomials A(x)S(x) + B(x)T(x) = GCD(A(x), B(x)) and the greatest common divisor of the given polynomials.
Results are calculated by applying the Extended Euclidean algorithm.


Example: ExtendedGCD(x^2-1,x+4) yields {1,-x+4,15}. (Plugging the result into the Bézout's identity for polynomials we have: 1 \cdot (x^2-1) + (-x+4) \cdot (x+4) = 15.


Notes:
  • The GCD of two polynomials is not unique (it's unique up to a scalar multiple).
  • See also GCD Command.
© 2024 International GeoGebra Institute