Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I prevent Mathematica from using the "old fashioned" functions "Sec" and "Csc"?

In Germany these functions are "old fashioned" as they are not taught anymore at school.

share|improve this question

migrated from Jul 2 '12 at 9:38

This question came from our site for people studying math at any level and professionals in related fields.

What do you mean by prevent? Why do you think sec csc are old fashioned – Nunoxic Jul 2 '12 at 9:09
Those functions are no more "old fashioned" than logarithms and cotangents. – Siminore Jul 2 '12 at 9:12
@Nunoxic: I don't know about the "old fashioned" bit, but I perhaps Klaus (like myself) would simply prefer seeing expressions like "$\frac{x + y}{\sin x \cos y}$" rather than "$(x+y)\csc x \sec y$". – Day Late Don Jul 2 '12 at 9:17
@Siminore Your statement is not true. At least here in Germany, nowadays nobody will use Sec or Csc. – user1642 Jul 2 '12 at 10:17

This is similar to my Log question and similar methods can be used.

$PrePrint = # /. {
     Csc[z_] :> 1 / Defer@Sin[z],
     Sec[z_] :> 1 / Defer@Cos[z]
  } &;


(x + y) Csc[x] Sec[y]
(x + y)/(Cos[y] Sin[x])
share|improve this answer
why not close then? – R. M. Jul 2 '12 at 13:42
@R.M well I meant similar in the generic sense. I see this as a closely related but at present different question, and someone may post an answer that goes much deeper than my simple one. Perhaps if that doesn't happen this question can be merged with mine and become a second example. – Mr.Wizard Jul 2 '12 at 14:07
This was useful. Some, like me, will want to extend this to Cot, as follows. $PrePrint = # /. { Csc[z_] :> 1 / Defer@Sin[z], Sec[z_] :> 1 / Defer@Cos[z], Cot[z_] :> Defer@Cos[z] / Defer@Sin[z] } &; – Rico Picone Mar 10 '15 at 3:10

Using the neat trick Chip showed in this answer:

SetSystemOptions["SimplificationOptions" -> "AutosimplifyTrigs" -> False];

TrigFactor[(x + y) Csc[x] Sec[y]]
   (x + y)/(Cos[y] Sin[x])

share|improve this answer

According to this MathGroup post, it's possible to get rid of the superfluous Csc and Sec by doing the following:

Unprotect[Csc, Sec];
Format[Csc[x_]] := HoldForm[1/Sin[x]];
Format[Sec[x_]] := HoldForm[1/Cos[x]];
Protect[Csc, Sec];

That old solution at least gives you the following:





but it still won't be able to print out


if you type in Sec[t]^2. Instead you get


But maybe that's OK for your taste. If not, then Mr. Wizard's solution is better because it does put the square in the denominator.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.