When evaluating the expression

Sinh[x]^2 + Cosh[x]^2 // FullSimplify

I get

Cosh[2 x]

That is indeed a simplification, but there are cases when I would not want that to happen.

What if I have a much more complicated expression that I want to simplify generally, but still wish to stay in Sinh[x]^2 and Cosh[x]^2. So under no circumstances do I wish to change to Cosh[2 x] or similar expressions. Is there a way to explicitly tell Mathematica not to use trigonometric relations? Or to use the trivial Cosh[x]^2 - Sinh[x]^2 = 1 but none of the composed ones?

Preferably, maybe there is a switch that disables the sensitivity of Mathematica to trigonometric relations in an entire notebook?


2 Answers 2


ComplexityFunction option of Simplify/Fullsimplify might be of help, for instance

FullSimplify[Sinh[x]^2 + Cosh[x]^2, ComplexityFunction -> (Count[{#}, _[2 x]] &)]

The idea is to lead the simplification process by saying that having expressions with argument 2*x result to a more complex expression and not a more simplified one. (Simplify will try to keep the value of ComplexityFunction as low as possible and hence will avoid identities that will increase its value) Of course this example is a crude one because it will count against any occurrence of 2*x and not only in trigonometric functions. if you know what kind of trigonometric functions are included you can narrow it by giving instead ComplexityFunction -> (Count[{#}, (Sinh|Cosh|Tanh)[2 x]] &) or ComplexityFunction -> (Count[{#}, (Sinh|Cosh|Tanh)[Times[__, x]]] &) to give a few examples.

  • $\begingroup$ Okay, that sounds nice! And what if I want to avoid any number, not just 2? Like ComplexityFunction -> (Count[{#}, (Sin|Cos|Tan)[n x]] &) and n being an integer bigger than one? What syntax should I use then? $\endgroup$
    – Kagaratsch
    Apr 17, 2013 at 15:41
  • $\begingroup$ Also, is it possible to use a ComplexityFunction outside a FullSimplify? Like, for all generic computations inside a certain notebook? $\endgroup$
    – Kagaratsch
    Apr 17, 2013 at 15:43
  • 2
    $\begingroup$ @Kagaratsch something like the last example I gave, ComplexityFunction -> (Count[{#}, (Sin|Cos|Tan)[Times[Except[1,_Integer], x]]] &). $\endgroup$
    – Spawn1701D
    Apr 17, 2013 at 15:44
  • 1
    $\begingroup$ Only if it is used one of the specialized simplification functions like TrigReduce. If you avoid such functions you won't have problem. $\endgroup$
    – Spawn1701D
    Apr 17, 2013 at 16:01
  • 3
    $\begingroup$ @Kagaratsch of course you can make the pattern as abstract as you like e.g. ComplexityFunction -> (Count[{#}, (Sin|Cos|Tan)[Times[Except[1,_Integer], _]]] &) $\endgroup$
    – Spawn1701D
    Apr 17, 2013 at 16:26

There is also a built in option switch that avoids trigonometric simplifications in Simplify and FullSimplify etc. commands. Use:

Simplify[expression, Trig->False]
FullSimplify[expression, Trig->False]

to avoid trigonometric relations.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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