MathGroup Archive 2006

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

Search the Archive

Re: unable to FullSimplify


Andrzej Kozlowski wrote:
>> In[]:= subdivide[a_ + b_] := FullSimplify[a] + FullSimplify[b];
>>          FullSimplify[Expand[x + (x + x^2)^4],
>>            TransformationFunctions -> {Automatic, subdivide}]
>> Out[]= x + x^4*(1 + x)^4
>
> Well, yes, it works nicely here but the question is, if you make this
> a default transformation transformation for FullSimplify how will it
> effect complexity?

Some option to FullSimplify would be enough for this to be used only
when needed. Anyway, it was just one quick and arbitrary example
to show that FullSimplify can be improved without too much effort


> In fact it even seems hard to see how you would avoid numerous
> unnecessary attempts at simplifying the same expression...

That's quite normal it seems. For example, to simplify just a+b,
ComplexityFunction is called 28 times(!) Here's a proof:

reveal[expr_] := (Print[expr]; LeafCount[expr])
FullSimplify[a + b, ComplexityFunction -> reveal]


> Some more thoughts: if your subdivide were really a default
> transformation in FullSimplify it may well lead to an infinite loop,
> since it would be calling on itself.

Are you sure? This subdivide reduces its argument on each
invocation so I don't see how infinite loop can be possible.
I couldn't find any examples with such a problem.


> Note however also the folowing interesting feature:
>
> u = Expand[x + (x + x^2)^4];
>
> FullSimplify[f[u] == f[x + (x + x^2)^4]]
>
> True

Well, since f[a]==f[a] evaluates to True, Mathematica simplifies
the above equation because it is able to prove equality of f's
arguments.

--
Vladimir


  • Prev by Date: Re: How to extract functions from a list and call them with any argument?
  • Next by Date: Re: matrix operations -- shared data vs copied
  • Previous by thread: Re: Re: unable to FullSimplify
  • Next by thread: Re: Re: unable to FullSimplify