Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Unexpected failures of FullSimplify on some Root elements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86562] Re: [mg86538] Unexpected failures of FullSimplify on some Root elements
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 13 Mar 2008 20:52:26 -0500 (EST)
  • References: <200803130933.EAA01629@smc.vnet.net>

You use the word "resolve" as if converting root objects to radicals  
was somehow "resolving" them. But Mathematica does not recognize the  
concept of "resolve" in your sense. Radicals in themselves are not  
considered in any way superior to root objects (if anything the other  
way round) so if you want to convert root object to radicals you  
should use the function ToRadicals, which exists exactly for this  
purpose.

FullSimplify is meant to simplify expressions based on either the  
default ComlexityFunction or a user supplied one. It is precisely in  
this that lies the root cause of the phenomenon that you have  
observed. But the detailed reason may be a little unexpected to those  
who have not carefully followed this list in the past.

First, note that

FullSimplify[Root[2 - 4*#1^2 + #1^4 & , 2],
   ComplexityFunction -> LeafCount]
-Sqrt[2 - Sqrt[2]]

whereas:

FullSimplify[Root[2 - 4*#1^2 + #1^4 & , 2]]
Root[#1^4 - 4*#1^2 + 2 & , 2]

The reason for this is that the default ComplexityFunction used by  
FullSimplify (and, of course, Simplify) is not actually LeafCount (as  
is often loosely stated) but another function, which is usually quite  
close to it (which is why people often use LeafCount instead). In this  
particular case both Root[2 - 4*#1^2 + #1^4 & and -Sqrt[2 - Sqrt[2]]  
have exactly the same value of the default complexity function (17)  
but the former has LeafCount 17 while the latter only 15.

Andrzej Kozlowski


On 13 Mar 2008, at 10:33, Q.E.D. wrote:

> For some reason FullSimplify does not resolve some of the Root  
> elements
> while it does others.
> In this example Root[2 - 4 #1^2 + #1^4 &, 2] and Root[6 - 6 #1^2 +  
> #1^4 &,
> 2] go unresolved when you evaluate:
>
> Function[k, FullSimplify[Root[Function[x, k - (k - x^2)^2], #] & /@
> Range[4]]] /@ Prime[Range[11]]
>
> This is despite the fact that Solve[k - (k - x^2)^2 == 0, x] can do  
> so in
> general.
>
> It seems that the second root is most prone not the be resolved.
> Here Root[-2 - 12 #1^2 + 9 #1^4 &, 3] also appears when you evaluate:
>
> Function[k, FullSimplify[Root[Function[x, k - (k - x^2)^2], #] & /@
> Range[4]]] /@ (Prime[Range[11]]/3)
>
> In this more involved example still only Root[2 - 4 #1^2 + #1^4 &,  
> 2] goes
> unresolved, try evaluating:
>
> FullSimplify[Root[Function[x, 2 - (2 - (2 - (2 - x^2)^2)^2)^2], #]  
> & /@
> Range[16]]
>
> Strangley enough, Mathematica appears to know the resolution Root[2  
> - 4 #1^2
> + #1^4 &, 2] is -Sqrt[2 - Sqrt[2]] even though this result is not  
> returned,
> try evaluating:
>
> Trace[FullSimplify[Root[2 - 4 #1^2 + #1^4 &, 2]], TraceInternal->True,
> TraceOriginal->True, TraceDepth->2]
>
> Note that the result is cached, so you will see a great deal more  
> Trace
> output if you run this command as the first thing after restarting
> Mathematica.
>
> By the way, is this fixed in version 6.0.2?
>
> Q.E.D.
>
>
>
>



  • Prev by Date: Integrate[] confuses real and imaginary parts
  • Next by Date: Re: Increasing RandomInteger speed
  • Previous by thread: Unexpected failures of FullSimplify on some Root elements
  • Next by thread: Re: Unexpected failures of FullSimplify on some Root elements