Re: Re: Re: Re: Radicals simplify

*To*: mathgroup at smc.vnet.net*Subject*: [mg106468] Re: [mg106415] Re: [mg106411] Re: [mg106386] Re: Radicals simplify*From*: Murray Eisenberg <murray at math.umass.edu>*Date*: Wed, 13 Jan 2010 06:00:42 -0500 (EST)*Organization*: Mathematics & Statistics, Univ. of Mass./Amherst*References*: <hic37h$5ef$1@smc.vnet.net> <201001111030.FAA23508@smc.vnet.net> <201001112354.SAA21089@smc.vnet.net> <201001120946.EAA15555@smc.vnet.net>*Reply-to*: murray at math.umass.edu

Yes, it would be helpful to have the docs say something like "most of the time (but not always) the value of the default ComplexityFunction agrees with that of LeafCount." But it would be also helpful if something more were said, somewhere (perhaps in discussion of Internals?) to at least indicate when the count of integer digits also is involved. Even some exceptional examples would help. But ideally, the actual algorithm should be documented -- preferably in ordinary words. > LeafCount On 1/12/2010 4:46 AM, Andrzej Kozlowski wrote: > Yes, but Adam Strzebonski has already posted here the default > CoplexityFunction in the past, and knowing it really wont help you much: > > > SimplifyCount[p_] := > If[Head[p]===Symbol, 1, > If[IntegerQ[p], > If[p==0, 1, Floor[N[Log[2, Abs[p]]/Log[2, 10]]]+If[p>0, 1, > 2]], > If[Head[p]===Rational, > SimplifyCount[Numerator[p]]+SimplifyCount[Denominator[p]]+1, > If[Head[p]===Complex, > SimplifyCount[Re[p]]+SimplifyCount[Im[p]]+1, > If[NumberQ[p], 2, > SimplifyCount[Head[p]]+If[Length[p]==0, 0, > Plus@@(SimplifyCount/@(List@@p))]]]]]] > > Would it be helpful to have this in the Documentation? Or is it more > helpful to know that most of the time (but not always) this agrees with > LeafCount? > I think a very large percentage of complaints about the documentation > reduce to this sort of issues. > > Andrzej Kozlowski > > > On 12 Jan 2010, at 08:54, Murray Eisenberg wrote: > >> Mathematica 7 documentation does NOT say that LeafCount is the > criterion >> for determining simplicity, that is, the default value of >> ComplexityFunction. Rather it says: >> >> "The default ComplexityFunction counts the subexpressions and digits > >> of integers." >> >> But it does not even say how it combines the counts of the number of > >> subexpressions and digits of integers! >> >> On 1/11/2010 5:30 AM, dh wrote: >>> Hi, >>> >>> why do you think x(x^2 y^3)^(1/4) is simpler than (x^6 y^3)^(1/4)? >>> >>> Mathematica needs some criterion for this decision. The default > criterion is the >>> >>> "LeafCount[..]". If that does not suit you, you must define another >>> >>> criterion. >>> >>> Daniel >>> >>> >>> >>> francix wrote: >>> >>>> Hi, >>> >>>> I am using Matematica 7 and need some help with Radicals. >>> >>>> >>> >>>> If I do >>> >>>> Simplify[(x^4 y^3)^(1/4), x>= 0] I correctly have >>> >>>> >>> >>>> x (y^3)^(1/4) >>> >>>> >>> >>>> But If I do >>> >>>> >>> >>>> Simplify[(x^6 y^3)^(1/4), x>= 0] I get >>> >>>> >>> >>>> (x^6 y^3)^(1/4) and not the correct answer x(x^2 y^3)^(1/4) >>> >>>> >>> >>>> Thanks in advanced. >>> >>>> >>> >>>> >>> >>>> >>> >>>> >>> >>>> >>> >>>> >>> >>>> >>> >>> >>> >> >> -- >> Murray Eisenberg murray at math.umass.edu >> Mathematics& Statistics Dept. >> Lederle Graduate Research Tower phone 413 549-1020 (H) >> University of Massachusetts 413 545-2859 (W) >> 710 North Pleasant Street fax 413 545-1801 >> Amherst, MA 01003-9305 >> > > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305

**References**:**Re: Radicals simplify***From:*dh <dh@metrohm.com>

**Re: Re: Radicals simplify***From:*Murray Eisenberg <murray@math.umass.edu>

**Re: Re: Re: Radicals simplify***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>