MathGroup Archive 2012

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

Search the Archive

Rearranging terms - user-defined

  • To: mathgroup at
  • Subject: [mg127105] Rearranging terms - user-defined
  • From: drehstuhl2 at
  • Date: Sat, 30 Jun 2012 05:19:21 -0400 (EDT)
  • Delivered-to:

Does anyone know how to tell mathematica the following:

I have an expression like: a + bx -by 
and I want to factorise it like: a + b(x-y)

BUT: I want Mathematica to show the difference (x-y) whenever possible (in the different calculations - not just place b outside the bracket). That's because equations are easier to discuss if they are written in a special way.

Another example would be: using probabilities, I always want to write mathematica -(1-p) instead of -p+1 throughout the notebook. 

Sorry, for postig such a beginners question. I know there were similar questions, but it did't help. Thanks a lot!

  • Prev by Date: Re: How to rectify the error for NDSolve ?
  • Next by Date: Re: Export/Save as text + plots/images
  • Previous by thread: Re: Line Numbers in Files
  • Next by thread: how to make a list of rules with 2 other lists composed by different kinds of elements