## GCD and LCM of polynomials

The greatest common divisor (GCD) and the least common multiple (LCM) of two polynomials are determined.

*p _{1}(x) = a_{9}·x^{9} + a_{8}·x^{8} + ... + a_{0}*
and

*p*.

_{2}(x) = b_{9}·x^{9}+ b_{8}·x^{8}+ ... + b_{0}The coefficients of the polynomial can be entered as fractions, as mixed numbers or as decimal numbers.

Use the checkbox to choose whether to output the coefficients of the polynomials as fractions or as decimal numbers.

p_{1}(x) = 4·x^{6}- 2·x^{5}- 6·x^{4}- 18·x^{3}- 2·x^{2}+ 24·x + 8 p_{2}(x) = 10·x^{4}- 14·x^{3}- 22·x^{2}+ 14·x + 12 GCD(p_{1},p_{2}) = x^{2}- x - 2 LCM(p_{1},p_{2}) = 40·x^{8}- 36·x^{7}- 76·x^{6}- 144·x^{5}+ 88·x^{4}+ 356·x^{3}- 4·x^{2}- 176·x - 48 p_{1}(x) = (x^{2}- x - 2)·(4·x^{4}+ 2·x^{3}+ 4·x^{2}- 10·x - 4) p_{2}(x) = (x^{2}- x - 2)·(10·x^{2}- 4·x - 6)

### Application:

It is well known that the GCD and the LCM are needed when reducing fractions or when adding fractions. Applied to polynomials, this equivalent to reducing or adding the functional terms of rational functions.

### Note:

The GCD of polynomials is determined analogously to the GCD of natural numbers with the Euclidean algorithm (see GCD and LCM). Polynomial divisions are performed repeatedly and the intermediate results may contain coefficients that cause an overflow. In this case it is pointed out that further common factors may exist.

### See also:

Wikipedia: Euclidean algorithm