MathGroup Archive 2001

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

Search the Archive

Re: Q: Factor with Polynominals?


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


  • Prev by Date: RE: Finding what is in a package
  • Next by Date: Re: Fonts in graphics
  • Previous by thread: Re: Q: Factor with Polynominals?
  • Next by thread: Re: Q: Factor with Polynominals?