The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Trig vs hyperbolic handling differences in Prime CAS
Message #1 Posted by Michael de Estrada on 8 Nov 2013, 2:35 p.m.

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.

      
Re: Trig vs hyperbolic handling differences in Prime CAS
Message #2 Posted by Mark Hardman on 8 Nov 2013, 5:49 p.m.,
in response to message #1 by Michael de Estrada

Try using hyp2exp:

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

Gives you the answer you are looking for.

            
Re: Trig vs hyperbolic handling differences in Prime CAS
Message #3 Posted by Michael de Estrada on 8 Nov 2013, 6:06 p.m.,
in response to message #2 by Mark Hardman

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.

                  
Re: Trig vs hyperbolic handling differences in Prime CAS
Message #4 Posted by Mark Hardman on 8 Nov 2013, 6:26 p.m.,
in response to message #3 by Michael de Estrada

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

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


[ Return to Index | Top of Index ]

Go back to the main exhibit hall