4
$\begingroup$

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.

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

1 Answer 1

4
$\begingroup$

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

$\endgroup$
4
  • 1
    $\begingroup$ Is Mathematica's ordering total degree? Is this documented anywhere? $\endgroup$
    – Igor Rivin
    Commented Apr 29, 2017 at 0:25
  • $\begingroup$ 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. $\endgroup$
    – Bendesarts
    Commented Apr 29, 2017 at 6:35
  • 1
    $\begingroup$ What makes x*y the leading term? (Hint: there is an unstated assumption on the ordering being made.) $\endgroup$ Commented Apr 29, 2017 at 15:51
  • $\begingroup$ @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. $\endgroup$
    – Bendesarts
    Commented Apr 29, 2017 at 20:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.