CAS: Hyperbolic Functions, assume (Beta) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: CAS: Hyperbolic Functions, assume (Beta) (/thread-13942.html) CAS: Hyperbolic Functions, assume (Beta) - Eddie W. Shore - 11-05-2019 01:42 PM I am testing integrals. I don't notice any simplification when it comes to hyperbolic functions. Example: (e^x - e^-x)/2 doesn't simplify to sinh(x) Just want to confirm whether CAS on the HP Prime hasn't implement algebraic rewriting commands with hyperbolic functions. Why doesn't assume work when we want to use "not equals", example a <> 3 (a is not equals to 3)? Other than this, I have not notice any behavior with Beta software so far. RE: CAS: Hyperbolic Functions, assume (Beta) - parisse - 11-05-2019 04:12 PM There is no command to convert to hyperbolic function, because it's not useful in a CAS. CAS are considering parameters like polynomials, they always assume generic value, that's the reason why assuming something like a!=0 would not do anything. The reason is that otherwise it would lead to combinatorical explosions in complexity. RE: CAS: Hyperbolic Functions, assume (Beta) - compsystems - 11-05-2019 10:06 PM There are codes especially in electronic and electrical engineering that are needed to expand a trigonometric function in exponential functions and vice versa At least some functions dedicated to the rewriting of hyperbolic expressions would be very useful for programmers. RE: CAS: Hyperbolic Functions, assume (Beta) - parisse - 11-06-2019 08:29 PM You can convert yourself like this: subst(exp(x)+exp(-x),exp,cosh+sinh) RE: CAS: Hyperbolic Functions, assume (Beta) - Stevetuc - 12-09-2019 07:38 AM (11-06-2019 08:29 PM)parisse Wrote:  You can convert yourself like this: subst(exp(x)+exp(-x),exp,cosh+sinh) It would be useful if the cas handled such cases using simplify eg Code: ``` simplify(i*e^((−i)*th)+(−i)*e^(i*th))/2``` Gives result Code: ``` (i*e^((−i)*th)+(−i)*e^(i*th))/2``` Rather than the anticipated result sin(th) One would have to create a lot of manual subst to workaround all the trig exp forms And this integral Code: ``` 10/(√(2*π))*int(e^((-(I))*w*t),t,(-tt)/2,tt/2)``` gives result Code: ``` (5*i*√(2*π)*e^((−i)*tt*w/2)+(-5*i)*√(2*π)*e^(i*tt*w/2))/(π*w)``` But it would be clearer to the user if the result simplified to the equivalent sinc() function RE: CAS: Hyperbolic Functions, assume (Beta) - Stevetuc - 12-09-2019 08:25 AM Just found that Code: ``` simplify(sincos((i*e^((-(i))*th)+(-(i))*e^(i*th))/2))``` Gives the much nicer result Code: ``` sin(th)``` And Code: ``` simplify(sincos((5*i*√(2*π)*e^((-(i))*tt*w/2)-5*i*√(2*π)*e^(i*tt*w/2))/(π*w)))``` Gives Code: ``` 10*√(2*π)*sin(tt*w/2)/(π*w)``` So it would be handy if the cas had an option to return complex exp results in sincos form, so that simplify could do the above automatically RE: CAS: Hyperbolic Functions, assume (Beta) - CyberAngel - 12-09-2019 09:27 AM (12-09-2019 08:25 AM)Stevetuc Wrote:  Just found that Code: ``` simplify(sincos((i*e^((-(i))*th)+(-(i))*e^(i*th))/2))``` Gives the much nicer result Code: ``` sin(th)``` And Code: ``` simplify(sincos((5*i*√(2*π)*e^((-(i))*tt*w/2)-5*i*√(2*π)*e^(i*tt*w/2))/(π*w)))``` Gives Code: ``` 10*√(2*π)*sin(tt*w/2)/(π*w)``` So it would be handy if the cas had an option to return complex exp results in sincos form, so that simplify could do the above automatically Assign 'sincos' into a [key] in the User mode RE: CAS: Hyperbolic Functions, assume (Beta) - Stevetuc - 12-09-2019 12:02 PM Quote:='CyberAngel' pid='124776' dateline='1575883660' Assign 'sincos' into a key in the User mode Im using the function on cas command line Code: ```#cas ss(x):=(subst(x,exp,cosh+sinh));simplify(sincos(x)) #end``` It use a substitution for real exp and sincos function for complex exp Code: ```ss((e^x-e^(-x))/2) Gives sinh(x)``` And Code: ```ss(1/2*((-(i))*e^(i*x)+i*e^((-(i))*x))) Gives sin(x)``` Simplification set to maximum Still, it would be better built in. RE: CAS: Hyperbolic Functions, assume (Beta) - parisse - 12-09-2019 01:12 PM Sometimes you will want exponential form, sometimes trigonometric form. That's the reason why you have commands to rewrite an expression...