MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Removing constant multiples from polynomials


On Feb 15, 2007, at 4:55 AM, Azumanga wrote:

> 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
>

Here is a newbie approach:

In[1]:=
poly = 1276*(x - 1)*
     ((y - 2)/397);

In[2]:=
Select[poly, Head[#1] =!=
     Rational & ]
Out[2]=
(-1 + x)*(-2 + y)

With or you can extend it for standalone integers and reals,

J=E1nos


----------------------------------------------
Trying to argue with a politician is like lifting up the head of a 
corpse.
(S. Lem: His Master Voice)



  • Prev by Date: Re: Quick integral.
  • Next by Date: Re: Re: Curve-fitting/data analysis question...
  • Previous by thread: Re: Removing constant multiples from polynomials
  • Next by thread: Re: Removing constant multiples from polynomials