WOLFRAM

PolynomialLCM[poly1,poly2,]

gives the least common multiple of the polynomials polyi.

PolynomialLCM[poly1,poly2,,Modulusp]

evaluates the LCM modulo the prime p.

Details and Options

  • PolynomialLCM[poly1,poly2,] will by default treat algebraic numbers that appear in the polyi as independent variables.
  • PolynomialLCM[poly1,poly2,,Extension->Automatic] extends the coefficient field to include algebraic numbers that appear in the polyi.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Compute the least common multiple (LCM) of polynomials:

Out[1]=1

Compute the least common multiple of several polynomials:

Out[1]=1

Compute the least common multiple of multivariate polynomials:

Out[1]=1

Scope  (9)Survey of the scope of standard use cases

Basic Uses  (4)

The LCM of univariate polynomials:

Out[1]=1

The LCM of multivariate polynomials:

Out[1]=1

The LCM of more than two polynomials:

Out[1]=1

The LCM of rational functions:

Out[1]=1

Advanced Uses  (5)

With Extension->Automatic, PolynomialLCM detects algebraically dependent coefficients:

Out[1]=1

Compute the LCM over the integers modulo :

Out[1]=1

Compute the LCM of polynomials over a finite field:

Out[2]=2

With Trig->True, PolynomialLCM recognizes identities between trigonometric functions:

Out[1]=1

The LCM of rational functions:

Out[1]=1

Options  (3)Common values & functionality for each option

Extension  (1)

By default, algebraic numbers are treated as independent variables:

Out[1]=1

With Extension->Automatic, PolynomialLCM detects algebraically dependent coefficients:

Out[2]=2

Modulus  (1)

Compute the LCM over the integers modulo 2:

Out[1]=1

Trig  (1)

By default, PolynomialLCM treats trigonometric functions as independent variables:

Out[1]=1

With Trig->True, PolynomialLCM recognizes dependencies between trigonometric functions:

Out[2]=2

Applications  (2)Sample problems that can be solved with this function

If divides , then their least common multiple is equal to :

Out[3]=3

If and are relatively prime, then their least common multiple is equal to :

Out[6]=6

In general, the least common multiple of and is divided by the greatest common divisor of and :

Out[9]=9
Out[10]=10

Use Together to prove the equality:

Out[11]=11

Compute the LCM of the first five cyclotomic polynomials. Notice the coefficients are anti-palindromic:

Out[1]=1

This results from the fact that every cyclotomic polynomial is palindromic except the first:

Out[2]=2

The first cyclotomic polynomial is anti-palindromic:

Out[3]=3

Thus when taking the product of palindromic polynomials with one anti-palindromic polynomial, we will always obtain an anti-palindromic polynomial:

Out[4]=4

Properties & Relations  (1)Properties of the function, and connections to other functions

The LCM of polynomials is divisible by the polynomials; use PolynomialMod to prove it:

Out[3]=3
Out[4]=4

PolynomialGCD finds the greatest common divisor of polynomials:

Out[5]=5
Out[6]=6
Wolfram Research (1991), PolynomialLCM, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialLCM.html (updated 2023).
Wolfram Research (1991), PolynomialLCM, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialLCM.html (updated 2023).

Text

Wolfram Research (1991), PolynomialLCM, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialLCM.html (updated 2023).

Wolfram Research (1991), PolynomialLCM, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialLCM.html (updated 2023).

CMS

Wolfram Language. 1991. "PolynomialLCM." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/PolynomialLCM.html.

Wolfram Language. 1991. "PolynomialLCM." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/PolynomialLCM.html.

APA

Wolfram Language. (1991). PolynomialLCM. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialLCM.html

Wolfram Language. (1991). PolynomialLCM. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialLCM.html

BibTeX

@misc{reference.wolfram_2025_polynomiallcm, author="Wolfram Research", title="{PolynomialLCM}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialLCM.html}", note=[Accessed: 28-April-2025 ]}

@misc{reference.wolfram_2025_polynomiallcm, author="Wolfram Research", title="{PolynomialLCM}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialLCM.html}", note=[Accessed: 28-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_polynomiallcm, organization={Wolfram Research}, title={PolynomialLCM}, year={2023}, url={https://reference.wolfram.com/language/ref/PolynomialLCM.html}, note=[Accessed: 28-April-2025 ]}

@online{reference.wolfram_2025_polynomiallcm, organization={Wolfram Research}, title={PolynomialLCM}, year={2023}, url={https://reference.wolfram.com/language/ref/PolynomialLCM.html}, note=[Accessed: 28-April-2025 ]}