MathGroup Archive 2008

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

Search the Archive

Rearranging expressions in a user-defined form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94083] Rearranging expressions in a user-defined form
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Thu, 4 Dec 2008 07:16:29 -0500 (EST)

Dear MathGroup,

in symbolic transformations of mathematical expressions I often need to 
group or transform differently different parts
of these expression, just to make them more visible , or more easy to 
analyze  or so.  Just to give a simplest  example, 
assume that we have  an expression:

expr = ab + ac + cd + ca- gd - ga

and I need to have it once in the form like say,

expr=a (b + c) + (c - g) (d + a)

and another time in the form say,

expr=a (b + 2 c - g) + d (c - g)

or I will need to group it in some third, fourth ... form. You indeed 
understand that I gave the example easily treatable without computer,
while I have in mind much more complex transformations of real interest.

This evidently may be done by copy-pasting parts of the expression in 
question and
transforming then separately and then again copy-pasting and thus, 
collecting the results together. That's exactly what I do in such a case.
However, this may easily become a source of errors: such as copying 
without a sign, or copying a part of the expression, rather than the 
whole one and so on.
Finally it considerably slows you down.

Could you think of tricks to instruct Mathematica to group only certain 
terms and not others, and to take certain
factors out of parentheses, while leave others, according to your choice?

Thank you, Alexei 






-- 
Alexei Boulbitch, Dr., Habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.




  • Prev by Date: Re: Mathematica 5,6,7 WeatherData, CityData
  • Next by Date: How to substitute a function?
  • Previous by thread: Installing Mathematica 7 on Linux
  • Next by thread: Re: Rearranging expressions in a user-defined form