Maths WorkshopMaths problems with full solutions
Exercise 1822Algebra › PolynomialsL1Added 3 Nov 2026

GCD of two polynomials

#GCD#Euclidean algorithm#polynomials

Statement

Compute gcd⁡(A,B)\gcd(A,B) for A(X)=X3−1A(X)=X^3-1 and B(X)=X2−1B(X)=X^2-1.

Hint

Apply the Euclidean algorithm.

Show solutionHide solution

Solution

First division. X3−1=(X2−1)X+(X−1)X^3-1=(X^2-1)X+(X-1).

Second division. X2−1=(X−1)(X+1)+0X^2-1=(X-1)(X+1)+0.

Conclusion. gcd⁡(A,B)=X−1\gcd(A,B)=X-1 (up to a nonzero constant).

Check. X−1X-1 divides X3−1=(X−1)(X2+X+1)X^3-1=(X-1)(X^2+X+1) and X2−1=(X−1)(X+1)X^2-1=(X-1)(X+1), and no higher-degree polynomial divides both.