# boolean return value in mathematica

why does the following instruction ok in mathematica, and it returns a boolean value

In:= catenary[x, 1, 0, 0] == catenary[-x, 1, 0, 0]
Out:= True


and not this one?

In:= catenary[-x, 1, 0, 0] == -catenary[x, 1, 0, 0]
Out:= Cosh[x] == -Cosh[x]


I wanted to have a boolean value too.. to prove the symmetry.. Thanks for your help!

• Wrap the entire thing in TrueQ[] if need be. Less facetiously: your last equation is true for x an odd multiple of $\dfrac{\pi i}{2}$ and false otherwise. Jun 19, 2012 at 15:52

I think you should use three "="s, i.e.,

Cosh[x]===Cosh[-x]


(* True *)

If you need the Boolean value, then

Cosh[x] === Cosh[-x] // Boole


(* 1 *)

• Cosh[x] == Cosh[-x] works fine; Mathematica is not too dumb to not know that the hyperbolic cosine is even. Jun 19, 2012 at 16:30
• @J.M. But Sinh[x]==Sinh[-x] return itself, which is not the purpose of the programmer, whereas, Sinh[x]===Sinh[-x] works fine. Jun 21, 2012 at 1:28
• Again: Sinh[] is not the function in the OP. Jun 21, 2012 at 1:29
• This is an example to illustrate the way to cope with the problem. I don't think the author need Cosh ONLY but no other functions. Jun 21, 2012 at 1:31
• You'd think that, until you see OP's other questions... Jun 21, 2012 at 1:32