MathGroup Archive 2010

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

Search the Archive

how to tell Mathematica to display x^-1 as x^-1 and not as 1/x

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110725] how to tell Mathematica to display x^-1 as x^-1 and not as 1/x
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Sat, 3 Jul 2010 08:19:23 -0400 (EDT)
  • Reply-to: nma at 12000.org

Hello;


When I type

x^-1

Mathematica replies

1/x

Is there a way to tell Mathematica to *display* terms with negative 
powers as  x^-n  and not as 1/x^n ? (i.e keep the term just like it 
would appear on paper).

Another example, suppose I type

expr = a*x^-2 + b *x^-1 +

The reason I want to do this, is just for display purposes. When I print 
the expression on the screen, I'd like it to look like x^-1 and not like 
1/x (to better match how the expression look like in the textbook)

I am trying to avoid having to convert everything to a string, and force 
the form to the way I want.  I tried Hold functions, and 
TraditionalForm, but can't get it to print as I want.

I am hoping there is an easy trick to do this?

thanks
--Nasser


  • Prev by Date: Re: How to edit a help reference page (e.g. NIntegrate.nb)?
  • Next by Date: Re: non rectangular crop
  • Previous by thread: Neat demonstration: "Celestial Map of... Stars.."
  • Next by thread: Is it possible to query current plot range values (or have