# Taking the LCM of algebraic expressions

Is it possible in Mathematica to take the LCM of an algebraic expression? For example, I want to take the LCM of $9$, $9y$, $12y^2$ and $27y^4$.

If I type in

LCM [9, 9y, 12y^2, 27^4]


it returns the same value. I'm running Mathematica version 9. Could you help me out?

-
What answer do you expect to see from LCM[9,9y,12y^2,27^4]? – bill s Oct 18 '13 at 2:54
May be you want PolynomialLCM[9, 9 y, 12 y^2, 27^4] which gives 2125764 y^2 – Nasser Oct 18 '13 at 3:04
There appears to be a typographical error cf LatTex list and code: PolynomialLCM[9, 9 y, 12 y^2, 27y^4] yields 108y^4 – ubpdqn Oct 18 '13 at 13:35
@Nasser You coould post this as a response. That way the question won't end up with 0 responses. – Daniel Lichtblau Oct 19 '13 at 21:28

To get the least common multiple of the polynomials, use PolynomialLCM.

From Mathematica help on the above it says by default treat algebraic numbers that appear in poly_i the as independent variables

Hence the answer you want is

PolynomialLCM[9, 9 y, 12 y^2, 27^4]


More information on PolynomialLCM and more examples are here

http://reference.wolfram.com/mathematica/ref/PolynomialLCM.html

-