Re: SameQ to check for simplified radical expressions... doesn't work

• To: mathgroup at smc.vnet.net
• Subject: [mg121014] Re: SameQ to check for simplified radical expressions... doesn't work
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Mon, 22 Aug 2011 06:03:59 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201108201015.GAA04919@smc.vnet.net>

```On 20 Aug 2011, at 12:15, DrMajorBob wrote:

> The second is obviously simpler, hence Sqrt[360] is simpler than 6
> Sqrt[10].
>
> But Mathematica doesn't see it that way, and apparently, neither do you.
>
> Bobby

The point here is, however, that when Mathematica evaluates

In[1]:= Sqrt[360]
Out[1]= 6 Sqrt[10]

it is not really "simplifying" the expression but putting it into a
"canonical form". Simplification depends on a complexity function but
canonical form do not. They are necessary, because if expressions were
not put into these canonical forms, certain cancellations would not take
place because under a given complexity function two equivalent
expressions might never be transformed into the same expression (so that
cancellation can take place). So you really need these canonical forms
to be independent of any complexity function. Because expressions are
put into a canonical form before Simplify is applied, sometimes you will
never be able to get an answer that has the lowest complexity (for a
given ComplexityFunction). In this case the lowest complexity is, if
course, possessed by Sqrt[360]:

In[2]:= LeafCount[Unevaluated[Sqrt[360]]]

Out[2]= 2

In[3]:= LeafCount[Sqrt[360]]

Out[3]= 7

Andrzej Kozlowski

```

• Prev by Date: Re: Shooting method
• Next by Date: problem with Graphics array --plots don't appear
• Previous by thread: Re: SameQ to check for simplified radical expressions... doesn't work
• Next by thread: Re: Re: SameQ to check for simplified radical expressions... doesn't work