Question about Factor

2 views
Skip to first unread message

puzzler

unread,
Dec 28, 2010, 3:58:25 AM12/28/10
to mathpiper-user
Factor(x-9/2) returns 1/2*(2x-9)
But according to the documentation, Factor prefers to factor things
into monic form. So shouldn't it just return x-9/2?

[The Geogebra plugin does return x-9/2, btw]

Howard Ostrowsky

unread,
Dec 28, 2010, 1:01:39 PM12/28/10
to mathpip...@googlegroups.com
In what documentation did you see that "Factor prefers to factor things into monic form"?
The documentation attached to the function does not say this.  Indeed, the old YACAS documentation did say something of the sort, and in fact the YACAS function did return a monic result.  But in response to questions from users and a reexamination of the whole situation, MathPiper no longer follows this convention.

In accordance with modern algebraic ideas, a (univariate) polynomial is first factored into a "Content" and a "Primitive Part".  The Content is the GCD of all terms in the polynomial; the Primitive Part is what is left after factoring out the Content.  [For a multivariate polynomial, the situation is somewhat more complicated, but a similar procedure can consistently be defined.]

The basic philosophy of MathPiper is to provide tools to do what the user wants to do.  If the user wants to merely factor a polynomial, it is assumed that the product of the factors should reproduce the original polynomial.  If the user desires the factoring to produce a monic result, s/he can just use Monic(Factor(p)).

Sherm

Mark Engelberg

unread,
Dec 28, 2010, 2:00:38 PM12/28/10
to mathpip...@googlegroups.com
On Tue, Dec 28, 2010 at 10:01 AM, Howard Ostrowsky <sher...@gmail.com> wrote:
> In what documentation did you see that "Factor prefers to factor things into
> monic form"?

I read this in the documentation for FactorsPolynomialOverIntegers,
explaining that the reason the function was needed is because the
basic factorization method prefers to factor things into monic form.

> The basic philosophy of MathPiper is to provide tools to do what the user
> wants to do.  If the user wants to merely factor a polynomial, it is assumed
> that the product of the factors should reproduce the original polynomial.
> If the user desires the factoring to produce a monic result, s/he can just
> use Monic(Factor(p)).

I see that calling Monic will work on this specific case, but I don't
see how it helps me factor, say,
x^2-(11/2)x+(9/2) into (x-1)(x-9/2), which is the form that most
clearly shows the roots.
Monic(Factor(x^2-11/2*x+9/2)) just gives back x^2-11/2*x+9/2

Thanks,

Mark

Howard Ostrowsky

unread,
Dec 28, 2010, 2:51:07 PM12/28/10
to mathpip...@googlegroups.com
The following statement will do what you want:       
 
        In> p := x^2-(11/2)*x+(9/2)
        Result: x^2-(11*x)/2+9/2

        In> Monic /@ Transpose(Factors(p))[1]
        Result: {1,x-1,x-9/2}

Howard Ostrowsky

unread,
Dec 28, 2010, 3:00:54 PM12/28/10
to mathpip...@googlegroups.com
This will also work:

Express the polynomial in form over integers:
        In> pi:=2*x^2-11*x+9
        Result: 2*x^2-11*x+9

Then use:
        In> Product(Transpose(FactorsPolynomialOverIntegers(pi))[1])
        Result: 2*(x-1)*(x-9/2)
Reply all
Reply to author
Forward
0 new messages