Re: unable to FullSimplify

• To: mathgroup at smc.vnet.net
• Subject: [mg65769] Re: [mg65703] unable to FullSimplify
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Mon, 17 Apr 2006 02:28:07 -0400 (EDT)
• References: <200604160545.BAA07958@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```On 16 Apr 2006, at 14:45, vladimir347 at yahoo.com wrote:

> I get the following unexpected and inconsistent results:
>
> FullSimplify[Expand[b + (a + b)^4]]
>
> b + (a + b)^4
>
>
> FullSimplify[Expand[a + (a + b)^4]]
>
> a + a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4
>
> Why they are different and why there is no simplification in the
> second
> case?
>
> --
>

This seems to me to be an unfortunate consequence of the fact that
the outcome of FullSimplify (and Simplify)  depends on the ordering
of the variables. This is because a variable order independent
Simplify has very much higher complexity and will get stuck on a
complicated expressions. Some time ago Adam Strzebonski of WRI sent
the following implementation of order independent FullSimplify:

VOISimplify[vars_, expr_, assum_:True] :=
Module[{perm, ee, best},
perm = Permutations[vars];
ee = (FullSimplify @@ ({expr, assum} /. Thread[vars -> #]))
& /@ perm;
best = Sort[Transpose[{LeafCount /@ ee, ee, perm}]][[1]];
best[[2]] /. Thread[best[[3]] -> vars]]

With that the inconsistency disappears:

VOISimplify[{a, b}, Expand[a + (a + b)^4]]

(a + b)^4 + a

VOISimplify[{a, b}, Expand[b + (a + b)^4]]

(a + b)^4 + b

Nevertheless the example you have brought up looks unpleasant enough
to hope that some fix can be found that does not require the full
power (and complexity) of VOISImplify. ??

Andrzej Kozlowski

```

• Prev by Date: Calculating contradicts plotting
• Next by Date: Re: normalization and square roots
• Previous by thread: unable to FullSimplify
• Next by thread: Re: unable to FullSimplify