Post Reply 
CAS: Hyperbolic Functions, assume (Beta)
11-05-2019, 01:42 PM (This post was last modified: 11-05-2019 01:45 PM by Eddie W. Shore.)
Post: #1
CAS: Hyperbolic Functions, assume (Beta)
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-05-2019, 04:12 PM
Post: #2
RE: CAS: Hyperbolic Functions, assume (Beta)
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.
Find all posts by this user
Quote this message in a reply
11-05-2019, 10:06 PM
Post: #3
RE: CAS: Hyperbolic Functions, assume (Beta)
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.

Project Emu48 Skins for android ► https://www.hpmuseum.org/forum/thread-14...25336.html
Find all posts by this user
Quote this message in a reply
11-06-2019, 08:29 PM
Post: #4
RE: CAS: Hyperbolic Functions, assume (Beta)
You can convert yourself like this:
subst(exp(x)+exp(-x),exp,cosh+sinh)
Find all posts by this user
Quote this message in a reply
12-09-2019, 07:38 AM (This post was last modified: 12-09-2019 07:55 AM by Stevetuc.)
Post: #5
RE: CAS: Hyperbolic Functions, assume (Beta)
(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
Find all posts by this user
Quote this message in a reply
12-09-2019, 08:25 AM (This post was last modified: 12-09-2019 08:45 AM by Stevetuc.)
Post: #6
RE: CAS: Hyperbolic Functions, assume (Beta)
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
Find all posts by this user
Quote this message in a reply
12-09-2019, 09:27 AM
Post: #7
RE: CAS: Hyperbolic Functions, assume (Beta)
(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
Find all posts by this user
Quote this message in a reply
12-09-2019, 12:02 PM
Post: #8
RE: CAS: Hyperbolic Functions, assume (Beta)
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.
Find all posts by this user
Quote this message in a reply
12-09-2019, 01:12 PM
Post: #9
RE: CAS: Hyperbolic Functions, assume (Beta)
Sometimes you will want exponential form, sometimes trigonometric form. That's the reason why you have commands to rewrite an expression...
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)