       Re: Removing constant multiples from polynomials

• To: mathgroup at smc.vnet.net
• Subject: [mg73430] Re: Removing constant multiples from polynomials
• From: "dimitris" <dimmechan at yahoo.com>
• Date: Fri, 16 Feb 2007 01:00:53 -0500 (EST)
• References: <er1ar3\$4sj\$1@smc.vnet.net>

```Let

st = (Random[Integer, {0, 10}]/Random[Integer, {10, 20}])*(x - 1)*(y -
2)
(9/14)*(-1 + x)*(-2 + y)

First it will be very informative to look in the FullForm of this
expression.

FullForm[st]
Times[Rational[9,14],Plus[-1,x],Plus[-2,y]]

Next along many alternatives you can try

st /. _Rational*(a___) :> Times[a]
(-1 + x)*(-2 + y)

DeleteCases[st, _Rational]
(-1 + x)*(-2 + y)

Times @@ Cases[st, _Plus]
(-1 + x)*(-2 + y)

Kind Regards
Dimitris

=CF/=C7 Azumanga =DD=E3=F1=E1=F8=E5:
> I am working on an algorithm which manipulates sets of polynomials.
> Often it produces (after an application of FullSimplify) polynomials
> like:
>
> 1276(x-1)(y-2)/397
>
> I'm only interested in the solutions to the polynomial, so to me this
> is "equivalent" to:
>
> (x-1)(y-2)
>
> As a short-term solution I call "GroebnerBasis" on the single
> polynomial, which seems to perform this simplification. However is
> there a simpler method?
>
> Thank you,
>
> Chris

```

• Prev by Date: Re: Logical Expression
• Next by Date: Re: Quick integral.
• Previous by thread: Re: Removing constant multiples from polynomials
• Next by thread: Logical Expression