Difference between revisions of "ExtendedGCD Command"

From GeoGebra Manual
Jump to: navigation, search
(Created page with "<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} ==CAS Syntax== ;ExtendedGCD( <Polynomial>, <Polynomial> ) :Returns a list containing the polynom...")
 
Line 3: Line 3:
 
;ExtendedGCD( <Polynomial>, <Polynomial> )
 
;ExtendedGCD( <Polynomial>, <Polynomial> )
 
:Returns a list containing the polynomial coefficients <math>S(x), T(x)</math> of Bézout's identity for polynomials <math>A(x)S(x) + B(x)T(x) = GCD(A(x), B(x))</math> and the greatest common divisor of the given polynomials.  
 
:Returns a list containing the polynomial coefficients <math>S(x), T(x)</math> of Bézout's identity for polynomials <math>A(x)S(x) + B(x)T(x) = GCD(A(x), B(x))</math> and the greatest common divisor of the given polynomials.  
:Results are calculated by applying the [[w:Extended_Euclidean_algorithm]].  
+
:Results are calculated by applying the [[w:Extended_Euclidean_algorithm|Extended Euclidean algorithm]].  
  
  
Line 9: Line 9:
  
 
{{notes|1=<div>
 
{{notes|1=<div>
*The GCD of two polynomials is not unique (it's unique up to a scalar multiple)
+
*The GCD of two polynomials is not unique (it's unique up to a scalar multiple).
 
*See also [[GCD Command]].</div>}}
 
*See also [[GCD Command]].</div>}}

Revision as of 09:32, 29 April 2023


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