Re: 1/Trig function - help
- To: mathgroup at smc.vnet.net
- Subject: [mg24271] Re: 1/Trig function - help
- From: "David Bailey" <db at salford-software.com>
- Date: Wed, 5 Jul 2000 23:10:55 -0400 (EDT)
- Organization: University of Salford, Salford, Manchester, UK
- References: <8jteta$iic@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
<zhl67 at my-deja.com> wrote in message news:8jteta$iic at smc.vnet.net... > Hello, > > For some reason I wish the trigonometric functions to the power of -1 > not automatically evaluated to some other trig functions. For instance, > I wish the out put of > > In[1]:= Sin[x]^(-1) > > remain unchanged or appears as > > 1 > Out[1]:=------- > Sin[x] > > but NOT Csc[x]. Is there any cost efficient way to do this? Adding > rules to Power function might do(I only wish this feature for certain > argumentx x), but it slows down the Power function at the same time. > The problem is that Mathematica always applies these 'simplifications' to any output it generates. One answer is to use a set of replacement rules of the form Csc[x_]->1/sin[x] (etc. for other trig functions you want to eliminate). Because 'sin' is spelled in lower case it will not be recognised by Mathematica and simplified back to the undesired form. You can always use another set of replacement rules to replace sin by Sin etc. if you want to process the result further. I would not have thought 'cost efficiency' was relevant here. David Bailey Salford Software