f



(x - 1) or (-1 + x)

I feel like a small child asking this, but how can I get Mathematica to say
(x - 1) instead of  (-1 + x), or to give me

 4 (1 - q)

 instead of the doubly annoying

-4 (-1 + q)  ?

In brief, given the choice, I prefer to look at subtraction rather than
negation. The binary operator instead of the unary.

I'm not asking Mathematica to read my mind about the way I want every
possible expression to look, rather I am hoping to find out how to transform
something I don't like into something I like, in a way that is guaranteed
not to change the value of the expression.

Ralph Dratman
0
9/18/2011 8:17:30 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

1 Replies
491 Views

Similar Articles

[PageSpeed] 41

On 18/09/2011 09:17, Ralph Dratman wrote:
> I feel like a small child asking this, but how can I get Mathematica to say
> (x - 1) instead of  (-1 + x), or to give me
>
>   4 (1 - q)
>
>   instead of the doubly annoying
>
> -4 (-1 + q)  ?
>
> In brief, given the choice, I prefer to look at subtraction rather than
> negation. The binary operator instead of the unary.
>
> I'm not asking Mathematica to read my mind about the way I want every
> possible expression to look, rather I am hoping to find out how to transform
> something I don't like into something I like, in a way that is guaranteed
> not to change the value of the expression.
>
> Ralph Dratman
The general problem of forcing expressions to appear in a required form 
can be quite tricky, but using TraditionalForm will solve this case:

In[105]:= x - 1 // TraditionalForm

Out[105]//TraditionalForm= x-1

TraditionalForm tries to make maths look as though it came out of text book.

David Bailey
http://www.dbaileyconsultancy.co.uk

0
dave2659 (542)
9/18/2011 12:28:46 PM
Reply: