Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: Simplifying an expression for computational, not aesthetic

  • To: mathgroup at
  • Subject: [mg98443] Re: Simplifying an expression for computational, not aesthetic
  • From: "Nasser Abbasi" <nma at>
  • Date: Fri, 10 Apr 2009 04:51:02 -0400 (EDT)
  • References: <grkgst$76u$>
  • Reply-to: "Nasser Abbasi" <nma at>

"negatron" <lokieffect at> wrote in message 
news:grkgst$76u$1 at
> 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


Can keep it in the form you want. But then to use "r" later on, one must use 


  • 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