HP Forums
hyp2exp - 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: hyp2exp (/thread-18741.html)



hyp2exp - robmio - 09-01-2022 12:18 PM

Hello, is there the "inverse" function of "hyp2exp"? That is, is there a function that does the reverse process of "hyp2exp"?

Best regards, Roberto.


RE: hyp2exp - parisse - 09-04-2022 08:00 PM

No, but it's fairly easy: subst(expression,exp,cosh+sinh)


RE: hyp2exp - robmio - 09-05-2022 07:21 AM

(09-04-2022 08:00 PM)parisse Wrote:  No, but it's fairly easy: subst(expression,exp,cosh+sinh)

Thank you very much, parisse

Another question: why are inverse hyperbolic functions (ATANH, ACOSH, etc.) automatically represented by the corresponding logarithmic form?

Sincerely, robmio


RE: hyp2exp - Albert Chan - 09-05-2022 11:50 AM

(09-04-2022 08:00 PM)parisse Wrote:  No, but it's fairly easy: subst(expression,exp,cosh+sinh)

Above exp2hyp expression might be "simplified" to sin/cos
Just keep in mind, e^(i*x) = cos(x) + i*sin(x) = cosh(i*x) + sinh(i*x)

      cos(x) = cosh(i*x)      i*sin(x) = sinh(i*x)
      cosh(x) = cos(i*x)      i*sinh(x) = sin(i*x)

CAS> subst(e^(i*x), exp, x -> cosh(x) + sinh(x))

cos(x) + i*sin(x)

---

Same trick can be used for a "better" exp2trig

CAS> f := e^x - e^-x                                   // = 2*sinh(x)
CAS> exp2trig(f)      → e^x - e^-x
CAS> f(exp = (x -> cos(i*x) + sin(i*x)/i))     → -2*i*sin(i*x)

Or, in steps, since sinh/cosh tends to "simplify" to sin/cos

CAS> f(exp=cosh+sinh)(x=x/i)(x=x*i)          → -2*i*sin(i*x)


RE: hyp2exp - parisse - 09-05-2022 12:40 PM

(09-05-2022 07:21 AM)robmio Wrote:  Another question: why are inverse hyperbolic functions (ATANH, ACOSH, etc.) automatically represented by the corresponding logarithmic form?

Sincerely, robmio
For a CAS, it is always simpler to work with a smaller set of functions. cosh and sinh are still used sometimes (in the French curriculum system), they are not replaced, atanh and the like are never used, hence they are replaced (same as for sec/csc etc.)


RE: hyp2exp - Albert Chan - 09-05-2022 04:25 PM

Is this a bug?
acosh(z) should produce non-negative real part, same as acos(z)

CAS> acosh(-2.) // ???

1.31695789692+3.14159265359*i

CAS> acosh(-2+1e-15i)

1.31695789692+3.14159265359*i

CAS> acosh(-2-1e-15i)

1.31695789692-3.14159265359*i


RE: hyp2exp - robmio - 09-09-2022 11:46 AM

(09-05-2022 11:50 AM)Albert Chan Wrote:  
(09-04-2022 08:00 PM)parisse Wrote:  No, but it's fairly easy: subst(expression,exp,cosh+sinh)

Above exp2hyp expression might be "simplified" to sin/cos
Just keep in mind, e^(i*x) = cos(x) + i*sin(x) = cosh(i*x) + sinh(i*x)

      cos(x) = cosh(i*x)      i*sin(x) = sinh(i*x)
      cosh(x) = cos(i*x)      i*sinh(x) = sin(i*x)

CAS> subst(e^(i*x), exp, x -> cosh(x) + sinh(x))

cos(x) + i*sin(x)

---

Same trick can be used for a "better" exp2trig

CAS> f := e^x - e^-x                                   // = 2*sinh(x)
CAS> exp2trig(f)      → e^x - e^-x
CAS> f(exp = (x -> cos(i*x) + sin(i*x)/i))     → -2*i*sin(i*x)

Or, in steps, since sinh/cosh tends to "simplify" to sin/cos

CAS> f(exp=cosh+sinh)(x=x/i)(x=x*i)          → -2*i*sin(i*x)

Hello, is there an algorithm that translates the logarithmic formulas of the inverse hyperbolic functions into the inverse hyperbolic functions represented with "acosh", "asinh", "atanh", etc.?
For instance:

e^x*ln(x+√(x^2+1))-ln(ln(√(x+1)*√(x-1)+x)) --instruction--> exp(x)*asinh(x)-ln(acosh(x))

Best regards, robmio.


RE: hyp2exp - robmio - 09-13-2022 04:00 PM

(09-05-2022 12:40 PM)parisse Wrote:  
(09-05-2022 07:21 AM)robmio Wrote:  Another question: why are inverse hyperbolic functions (ATANH, ACOSH, etc.) automatically represented by the corresponding logarithmic form?

Sincerely, robmio
For a CAS, it is always simpler to work with a smaller set of functions. cosh and sinh are still used sometimes (in the French curriculum system), they are not replaced, atanh and the like are never used, hence they are replaced (same as for sec/csc etc.)

Dear professor, is there the "inverse" function of "atrig2ln"? That is, is there a function that does the reverse process of "atrig2ln"?

Best regards, Roberto.


RE: hyp2exp - parisse - 09-14-2022 05:48 PM

evalc converts complex ln to inverse trig functions. However for Inverse hyperbolic functions, you will have to implement it yourself.