Menu

#4822 Antiderivative of acoth is complex where acoth is real

None
open
nobody
5
2026-07-16
2026-07-16
No

Spotted by Gemini.

(%i1) integrate(acoth(x), x);
(%o1) log(1-x^2)/2+x*acoth(x)

acoth(x) is real for abs(x) > 1. But then log(1-x^2) becomes complex.
Change the antiderivative to log(x^2-1)/2+x*acoth(x) to make it real where acoth(x) is real. Bonus: Differentiating this directly gives acoth(x) without further manipulation.

Discussion

  • David Scherfgen

    David Scherfgen - 2026-07-16

    I'm a bit hesitant about this because having both atanh(x) and acoth(x) use log(1-x^2) probably has some advantages. But for people using Maxima for "real" calculus, this may seem like a bug. Opinions?

     
    • Raymond Toy

      Raymond Toy - 2026-07-16

      Good question. I think I prefer your solution because acoth(x) is real only when abs(x) >= 1.

      For kicks, I tried integrate(acoth(x),x,1,t):

      (%i22) integrate(acoth(x),x,1,t);
      Is t - 1 positive, negative or zero?
      
      pos;
      Evaluation took 0.0400 seconds (1.8600 elapsed) using 2.560 MB.
                        2                1
                   log(t  - 1) + 2 atanh(─) t + %i %pi
                                         t                        %i %pi
      (%o22)       ─────────────────────────────────── - log(2) - ──────
                                    2                               2
      (%i23) expand(%);
      Evaluation took 0.0000 seconds (0.0000 elapsed) using 12.617 KB.
                                  2
                             log(t  - 1)         1
      (%o23)                 ─────────── + atanh(─) t - log(2)
                                  2              t
      

      Rather messy, but Maxima can differentiate this and get atanh(1/t). At least this uses log(t^2-1), so, that's some hint that your solution is better.

       

Log in to post a comment.

Monday.com Logo