[Date Index]
[Thread Index]
[Author Index]
Re: Simplifying an expression for computational, not aesthetic
*To*: mathgroup at smc.vnet.net
*Subject*: [mg98443] Re: Simplifying an expression for computational, not aesthetic
*From*: "Nasser Abbasi" <nma at 12000.org>
*Date*: Fri, 10 Apr 2009 04:51:02 -0400 (EDT)
*References*: <grkgst$76u$1@smc.vnet.net>
*Reply-to*: "Nasser Abbasi" <nma at 12000.org>
"negatron" <lokieffect at gmail.com> wrote in message
news:grkgst$76u$1 at smc.vnet.net...
> My small grudge is that Simplify[x^2/y^2] does not result in (x/y)^2
> even though Mathematica is evidently aware the two are equivalent --
> An input of (x/y)^2 results in an output of x^2/y^2. This seems to be
> because of the brackets, which mathematica prefers to avoid.
>
> My question is, is there a way to specify that Simplify produces the
> SIMPLEST expression it has found, not just the simplest which can most
> conveniently be expressed. There's nothing in the documentation as far
> as I can tell.
>
> Thanks.
>
The problem is what is the definition of SIMPLEST?
If you are interested in simplification based on "length" of expression, may
be you can use ComplexityFunction -> LeafCount
Simplify[theExpression, ComplexityFunction -> LeafCount]
But for the example at hand, using
r=HoldForm[(x/y)^2]
Can keep it in the form you want. But then to use "r" later on, one must use
ReleaseHold.
--Nasser
Prev by Date:
**Re: how to build pattern for a square matrix of reals?**
Next by Date:
**Re: Efficient construction of a correlation matrix**
Previous by thread:
**Simplifying an expression for computational, not aesthetic**
Next by thread:
**combining contourplot and regionplot**
| |