Trig vs hyperbolic handling differences in Prime CAS



Post: #5

I posted this previously, but received no response so I'm trying again .

When I enter COS(x)^2+SIN(x)^2 in CAS I get the result 1, which is correct since this result is true regardless of the value of x. However, if I enter COSH(x)^2-SINH(x)^2 in CAS I should also get 1 as a result, however, I simply get COSH(x)^2-SINH(x)^2 as a result instead. If I replace x with a numerical value instead, then I get the proper result of 1. Why ? And yes I am in radians mode and have Exact unchecked when I do this.


Post: #6

Try using hyp2exp:

simplify(hyp2exp(cosh(x)^2-sinh(x)^2))

Gives you the answer you are looking for.


Post: #7

Thank you very much. Giving it some thought, this makes a lot of sense because while trig functions like cosine and sine are primary, hyperbolics like cosh and sinh are derived from the exponential function, which is primary.


Post: #8

Agreed. There is value in seeing the intermediate result of:

((exp(x)+1/exp(x))/2)^2-((exp(x)-1/exp(x))/2)^2


Forum Jump: