Re: silly questions?
- To: mathgroup at smc.vnet.net
- Subject: [mg59061] Re: silly questions?
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Thu, 28 Jul 2005 02:26:05 -0400 (EDT)
- Organization: The Open University, Milton Keynes, U.K.
- References: <dc77me$k74$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Kent Holing wrote: > Why does not (x^5-32)/(x-2)//FullSimplify in Mathematica work? > Compare with Factor[x^5-32]//InputForm which returns (-2 + x)*(16 + 8*x + 4*x^2 + 2*x^3 + x^4). > So why does not the first command just return 16 + 8*x + 4*x^2 + 2*x^3 + x^4? > As in a factorization above, how is the easiest way to pick automatically (by a function) the factors of say degree >=2, if any ? > > Kent Holing > Hi Kent, It occurs that *Simplify* or *FullSimplify* are not designed to do what you have in mind. Try *Factor* instead: In[1]:= expr = (x^5 - 32)/(x - 2) Out[1]= (-32 + x^5)/(-2 + x) In[2]:= Factor[expr] Out[2]= 16 + 8*x + 4*x^2 + 2*x^3 + x^4 For your second question, have a look at the function *FactorList* http://documents.wolfram.com/mathematica/functions/FactorList You can extract the factors with a power greater or equal to 2 as in the following example: In[3]:= fl = FactorList[64 - 12*x^2 + 2*x^3] Out[3]= {{2, 1}, {-4 + x, 2}, {2 + x, 1}} In[4]:= Select[fl, #1[[2]] >= 2 & ] Out[4]= {{-4 + x, 2}} Best regards, /J.M.