Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
MTM[gcd] - greatest common divisor of polynomials
Calling Sequence
gcd(A, B)
gcd(A, B, x)
[g, s, t] = gcd(A, B)
[g, s, t] = gcd(A, B, x)
Parameters
A
-
array or expression
B
x
variable
Description
The gcd function computes the greatest common divisor of two polynomials A and B.
The optional argument x specifies the dependant variable. If unspecified, findsym(A,1) or findsym(B,1) is used (whichever returns a non-NULL result first). Note that if the input polynomials are multivariate then, in general, s and t will be rational functions in variables other than x.
The extended Euclidean algorithm is applied by gcd to compute unique polynomials s, t and g in x such that s*A + t*B = g where g is the monic greatest common divisor of A and B. The results computed satisfy degree(s) < degree(B/g) and degree(t) < degree(A/g). The greatest common divisor g is returned as the function value.
If A and B are arrays, the gcd(A,B) function computes the element-wise greatest common divisor of A and B.
If A is a scalar and B is an array then gcd computes the greatest common divisor of A and each element of B.
Arrays A and B must be the same size.
Examples
See Also
gcd, MTM[lcm]
Download Help Document