Menu

#5193 acosh(0) and other special values not simplified

None
open
nobody
acosh (8)
5
2026-08-31
2026-08-29
No

acos(0) simplifies to %pi/2, but acosh(0) stays a nounform, so limit(asech(x),x,inf) prints as acosh(0) rather than %i*%pi/2. Between -1 and 1, the argument lies on acosh's branch cut, where acosh(y) = %i*acos(y), so acosh can answer wherever acos's table of special values does:

acosh(0)   = %i*%pi/2          acosh(-1)        = %i*%pi
acosh(1/2) = %i*%pi/3          acosh(-1/2)      = 2*%i*%pi/3
acosh(1/sqrt(2)) = %i*%pi/4    acosh(sqrt(3)/2) = %i*%pi/6

Discussion

  • Raymond Toy

    Raymond Toy - 2026-08-29

    I guess this is kind of an historical artifact where Maxima worked with real numbers instead of complex. Also note that acos(2) returns the noun form, but a call to rectform will give -(%i*log(2-sqrt(3))).

    Also rectform(acosh(0)) returns %i*%pi/2.

    What is my point? Not sure, but I think we should be consistent here so if we're going to simplify acosh(0), we should also simplify acos(2). However, I think I'd prefer to use rectform to get the complex value.

     
    • David Scherfgen

      David Scherfgen - 2026-08-30

      I'd restrict it to the values that acos simplifies automatically.

       
      • Raymond Toy

        Raymond Toy - 2026-08-31

        I think I'd prefer to keep existing behavior where only real results are returned. (Is that true for other elementary functions? I don't know.)

        But maybe ask on the mailing list for a consensus since we disagree?

         
        • David Scherfgen

          David Scherfgen - 2026-08-31

          We have sqrt(-2) -> %i*sqrt(2), if that's some kind of precedent. And we have li[2](2) -> %pi^2/4-%i*%pi*log(2) (not elementary).

          I don't have strong feelings for or against it, it just came up when limit(asech(x),x,inf) returned acosh(0).

           
  • Stavros Macrakis

    Maxima's general rule seems to be that f(%i*v) returns a different form if that form is "simple".
    So for example sin(%i*x) => %i*sinh(x).

    But not when the form is messy, big or hard to understand, so asinh(%i*x), log(%i*x), ... do not expand by default. Results involving atan2 are particularly problematic.

    The case acos(2) => -(%i*log(2-sqrt(3))) seems somewhat messy/big, so it's not clear. But both logarc and rectform are available to expand it.

    I tend to think that the current behavior is OK, but I don't feel strongly about it.

     

Log in to post a comment.