Re: Re: Re: Simplify and Abs
- To: mathgroup at smc.vnet.net
- Subject: [mg54712] Re: [mg54687] Re: [mg54640] Re: [mg54602] Simplify and Abs
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Mon, 28 Feb 2005 03:26:58 -0500 (EST)
- References: <200502250618.BAA02358@smc.vnet.net> <200502270629.BAA25375@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 27 Feb 2005, at 07:29, Murray Eisenberg wrote: > Strangely, though, the docs for version 5.1 say: > > FunctionExpand is automatically called by FullSimplify Yes, but it is a question of ComplexityFunstion in FullSimplify. FunctionExpand is one of the transformations used by FullSimplify, and FullSimplify does reach the form -p+1 but but with the default ComplexityFucntion Abs[p-1] is preferred to -p+1. One way to avoid such problems is to use the ComplexityFunction I suggested a while ago, which is based on what is visually the simplest form: VisibleSimplify[expr_, opts___] := Simplify[ expr, opts, ComplexityFunction -> (StringLength[ToString[TraditionalForm[#]]] &)] Now: VisibleSimplify[Abs[p-1],p<1&&p>1/2] 1-p VisibleSimplify should always return the "simplest form" from the point of view of traditional mathematical notation that Simplify is able to find (of course that also depends on TransforationFunctions) but VisibleSimplify is much slower than the default ComplexityFunction! Andrzej Kozlowski > > > Bob Hanlon wrote: >> FunctionExpand[Abs[p-1],p<1&&p>1/2] >> >> 1-p >> >>> From: Simon Anders <simon.anders at uibk.ac.at> To: mathgroup at smc.vnet.net >> >>> Date: 2005/02/24 Thu AM 03:21:06 EST >>> Subject: [mg54712] [mg54687] [mg54640] [mg54602] Simplify and Abs >>> >>> can it really be that this is already beyond Mathematica? >>> >>> In := FullSimplify[Abs[p - 1], p < 1 && p > 1/2] >>> >>> Out := Abs[-1 + p] > > > -- > 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: Simplify and Abs
- From: Bob Hanlon <hanlonr@cox.net>
- Re: Re: Simplify and Abs
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Simplify and Abs