# boolean return value in mathematica

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

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


and not this one?

In[406]:= catenary[-x, 1, 0, 0] == -catenary[x, 1, 0, 0]
Out[406]:= 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. – J. M. Jun 19 '12 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. – J. M. Jun 19 '12 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. – yulinlinyu Jun 21 '12 at 1:28
Again: Sinh[] is not the function in the OP. – J. M. Jun 21 '12 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. – yulinlinyu Jun 21 '12 at 1:31
You'd think that, until you see OP's other questions... – J. M. Jun 21 '12 at 1:32