LCM of two polynomials

### 11.2.7 LCM of two polynomials

The lcm command computes the LCM (Least Common Multiple) of polynomials. (See 7.1.3 for LCM of integers).

- lcm takes polys, a sequence or list of polynomials.
- lcm(polys) returns the least common multiple of the polynomials in polys.

#### Examples

lcm(x^2+2*x+1,x^2-1)

| ⎛ ⎝ | x+1 | ⎞ ⎠ | ⎛ ⎝ | x2−1 | ⎞ ⎠

lcm(x,x^2+2*x+1,x^2-1)

or:

lcm([x,x^2+2*x+1,x^2-1])

| ⎛ ⎝ | x2+x | ⎞ ⎠ | ⎛ ⎝ | x2−1 | ⎞ ⎠