       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:=
expr = (x^5 - 32)/(x - 2)

Out=
(-32 + x^5)/(-2 + x)

In:=
Factor[expr]

Out=
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:=
fl = FactorList[64 - 12*x^2 + 2*x^3]

Out=
{{2, 1}, {-4 + x, 2}, {2 + x, 1}}

In:=
Select[fl, #1[] >= 2 & ]

Out=
{{-4 + x, 2}}

Best regards,
/J.M.

```

• Prev by Date: Colorfunction along a line...
• Next by Date: Re: Showing Mathematica notebooks within Firefox browser (like Adobe PDF's)
• Previous by thread: Re: silly questions?
• Next by thread: Re: silly questions?