MathGroup Archive 2001

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

Search the Archive

Re: Re: Q: Factor with Polynominals?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26726] Re: [mg26700] Re: Q: Factor with Polynominals?
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Fri, 19 Jan 2001 02:14:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

An alternative way:

In[1]:=
ls = ReplaceList[3*x^2 + 3*y^2 + x + y^3 + y*x^2,
    x_ + (y_.) :> Factor[x] + Factor[y]];

In[2]:=
First[Sort[ls, LeafCount[#1] < LeafCount[#2] & ]]

Out[2]=
x + (3 + y)*(x^2 + y^2)

on 01.1.18 2:57 PM, Jens-Peer Kuska at kuska at informatik.uni-leipzig.de
wrote:

> Hi,
> 
> witch one of the printed forms in:
> 
> 3 x^2 + 3 y^2 + x + y^3 + y x^2 /.
> a__ + b__ /; ( Print[a + Factor[Plus[b]]]; False) :> "never come here"
> 
> ???
> 
> Ok. Lets take the LeafCount[] to choose the most simple case
> 
> lst = {};
> 3 x^2 + 3 y^2 + x + y^3 + y x^2 /.
> a__ + b__ /; ( AppendTo[lst, a + Factor[Plus[b]]]; False) :> "also
> never come here";
> Last[First[Sort[{LeafCount[#], #} & /@ lst, First[#1] < First[#2] &]]]
> 
> 
> Regards
> Jens
> 
> Robert wrote:
>> 
>> hello!
>> i'd like to factor polynominals, e. g. if i have an exspression like
>> 
>> 3 x^2 + 3 y^2 + x + y^3 + y x^2,
>> 
>> i'd like to get (i want to factor x^2+y^2):
>> 
>> (x^2+y^2)  (3 + y) + x.
>> 
>> how can i achieve a result like this (also with other, more complicated
>> polynominals)?
>> 
>> thanks, robert
> 
> 

-- 
Andrzej Kozlowski
Toyama International University
JAPAN

http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/



  • Prev by Date: RE: Using Needs[] and Nodal
  • Next by Date: Re: Converting set of equations to matrix
  • Previous by thread: Re: Q: Factor with Polynominals?
  • Next by thread: Re: Q: Factor with Polynominals?