MathGroup Archive 2010

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

Search the Archive

Re: Avoid the use of certain functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111097] Re: Avoid the use of certain functions
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Tue, 20 Jul 2010 03:43:30 -0400 (EDT)
  • References: <i1s6vo$a39$1@smc.vnet.net>

On 17/07/10 13:16, Sam Takoy wrote:
> Hi,
>
> Is there a way to ask Mathematica to avoid expressing answers in terms
> of certain functions. For example, I can stand Sec, Csc, Sech, and Csch
> and would rather see Sec^-1, etc.
>
> Thanks!
>

Your description is a bit confused, but I take it you would like to see 
an expression output in terms of Sin rather than Csc, but the normal 
evaluation process defeats you:

In[1]:= 1/Sin[x]

Out[1]= Csc[x]

One answer to this, is to make a replacement that uses your own function 
- say sin[x] for which Mathematica knows nothing. So for example:

In[2]:= Csc[x]^3 /. Csc[z_] -> 1/sin[z]

Out[2]= 1/sin[x]^3

If you need to re-input such expressions, you can use another 
transformation to replace sin with Sin.

BTW, if you do a lot of this sort of manipulation, it can be convenient 
to collect several rules in one variable:

displayNicely={ Csc[z_] -> 1/sin[z],Sec[z_]->1/cos[z]}

Then you can just append /.displayNicely to any calculation to obtain 
this effect!

David Bailey

http://www.dbaileyconsultancy.co.uk


  • Prev by Date: FindRoot
  • Next by Date: Re: A Question About Directive
  • Previous by thread: Re: Avoid the use of certain functions
  • Next by thread: Re: Avoid the use of certain functions