Re: Eliminating Annoying Minus Signs
- To: mathgroup at smc.vnet.net
- Subject: [mg58759] Re: Eliminating Annoying Minus Signs
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Sun, 17 Jul 2005 13:03:06 -0400 (EDT)
- References: <dbd12i$2tc$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
David Park wrote: > Here is an expression that has annoying minus signs in it. > > test = {-((2*x)/(-1 + z)), -((2*y)/(-1 + z)), -1}; > > We can get rid of them with the following operation. > > MapAt[Minus, test, {{1, 1}, {1, 3, 1}, {2, 1}, {2, 3, 1}}] > {(2*x)/(1 - z), (2*y)/(1 - z), -1} > > But it involves ferreting out the two positions at which we want to change signs and so is a little tedious and error prone. > > Does someone have a simpler method for simplifying such expressions, which occur quite often with Mathematica? > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > Some years ago I wrote a package that let you specify algebraic manipulations by selecting parts of an expression and colouring them using a palette button. The colouring was applied using a TagBox so that there was 'handle' that subsequent operations could relate to. Although it worked quite well, there was only limited interest in the idea, and the package would need a little maintenance now because it used Red, Green, Blue, etc. (Yes, I know such symbols are reserved for Wolfram). Using colour, you could specify quite elaborate things. For example, given a b c==d e f you could colour the f and ask for it to be moved to the opposite side of the equality (on the denominator of course). Contact me if you are interested, and I will try to resurrect it. David Bailey http://www.dbaileyconsultancy.co.uk