# Getting the monic form of a polynomial [closed]

Is there a function to obtain the monic form of a multivariables polynomial?

My polynomial is:

f = -2 x^2 - x^3 - 3 y


sorted with a lexicographic order.

The monic polynomial that I want to obtain is the polynomial divided by the coefficient of the monial of the higher rank.

f = -2/3 x^2 - 1/3 x^3 - y


In other words, polynomials whose leading coefficients are 1 are called monic.

• What does this question mean? What kinds of transformations do you allow? Apr 28, 2017 at 20:05
• It's not clear what you're asking. Can you give the explicit answer you're looking for, perhaps for a few different examples? Apr 28, 2017 at 20:26
• This does what you want for the example cited: Expand[f/3]. Not sure what you are looking for in general. Apr 28, 2017 at 22:03

Perhaps

poly = -2 x^2 - x^3 - 3 y;
f = poly/(Abs[CoefficientList[poly, y]] // Last) // Expand


-((2 x^2)/3) - x^3/3 - y

This can be generalized into a function.

monic[poly_, var_] := poly/(Abs[CoefficientList[poly, var]] // Last) // Expand


Then

monic[-2 x^2 - 3 x^3 - 3 x y + 7 y^3, y]


-((2 x^2)/7) - (3 x^3)/7 - (3 x y)/7 + y^3

and

monic[-2 x^2 - 3 x^3 - 3 x y + 7 y^3, x]


-((2 x^2)/3) - x^3 - x y + (7 y^3)/3

• Is Mathematica's ordering total degree? Is this documented anywhere? Apr 29, 2017 at 0:25
• Thank you for your help. But, i think that it doesn't work with f = -2 x^2 - x^3 - 3 y + 4*xy. The coefficient that should be found is 4. The leading power product ordered lexicographically is xy. Apr 29, 2017 at 6:35
• What makes x*y the leading term? (Hint: there is an unstated assumption on the ordering being made.) Apr 29, 2017 at 15:51
• @DanielLichtblau in fact, i want to use the lexigraphic order and consequently, i would like to find the coefficient of the leading term with this order. Apr 29, 2017 at 20:02