From: David Bailey on
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

From: Murray Eisenberg on
One should not be so quick to condemn the world when it does not conform
to your own preconceptions and preferences!

There is a good geometric reason that sec is an appropriate name for the
reciprocal of cos rather than of sin. Draw the unit circle, center at
the origin O. Mark off a central angle of theta from the positive
x-axis, and let P be the corresponding point on the circle. Draw the
vertical line L through the point (1,0). Extend the ray OP until it
intersects L at a point Q. Then the length of OQ is sec (theta). That
line segment OQ cuts across the circle.

[See, e.g., http://en.wikipedia.org/wiki/Trigonometric_functions. (I
thought I remembered also some Wolfram Demonstration of this, but I
cannot locate it now.)]

Furthermore, in the usual list of the 6 trig functions

sin
cos
tan
cot
sec
csc

there is a symmetry of pairs around the middle: cot = 1/tan, sec =
1/cos, csc = 1/sin.

Finally, what's wrong with sec and csc? Mathematical expressions are
often simpler when expressed in terms of them, since this avoids
(explicit) use of fractions for the functions.

On 7/19/2010 2:10 AM, AES wrote:
>> From: Sam Takoy [mailto:sam.takoy(a)yahoo.com]
>>
>> Hi,
>>
>> Is there a way to ask Mathematica to avoid expressing answers in terms
>> of certain functions. For example, I [can't?] stand Sec, Csc, Sech, and Csch
>> and would rather see Sec^-1, etc.
>
> I'm with you on this one: always hated Sec and Csc (and never
> understood the backward naming of these functions -- why isn't Sec =
> 1/Sin and Csc = 1/Cos?)
>
> So, I'd like the various Simplifiy and XxxToYyy functions in Mathematica to
> always give precedence to Sin and Cos by default, and avoid using Sec
> and Csc whenever possible, even if this produces some "1 overs" in the
> output expression.
>
> But I suspect trying to implement this at this point would require more
> complexity than it would be worth.
>

--
Murray Eisenberg murray(a)math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

First  |  Prev  | 
Pages: 1 2
Prev: Show left hand side
Next: Percentage Formating