The integral cannot be expressed in terms of elementary functions. When you take 'complexIntegrate' it should work, although Google KI says that it requires the Hypergeometric function [2]F[1] to evaluate the second integral "integrate(x^2/sqrt(1-x^4),x)" which is left after partial integration, so I guarantees if (1) below is correct ;) However, I think it is ...

To verify the result below, one has also to use the
fact that

acos(x) = -%i * log(x+sqrt(x^2-1) holds.


(1) -> complexIntegrate(acos(x^2),x)

   (1)
                      +------+
                      | 4         2             +------+
        2 +---+    - \|x  - 1  - x        +---+ | 4
       x \|- 1 log(----------------) - 4 \|- 1 \|x  - 1
                     +------+
                     | 4         2
                    \|x  - 1  - x
     +
           +---+          1            +---+          1
       4 x\|- 1 ellipticF(-,- 1) - 4 x\|- 1 ellipticE(-,- 1)
                          x                           x
  /
     2 x
Type: Expression(Integer)


On 27/01/2026 19:25, Fabian wrote:
Hello Dima,

This was a fast reply!

Fabian

On Tuesday, January 27, 2026 at 6:52:13 PM UTC+1 Dima Pasechnik wrote:

    I can add that I can repeat this at Fricas prompt, it has nothing to
    do with Sage per se.
    It's for me on Gentoo Linux, with

    $ fricas
    Checking for foreign routines
    FRICAS="/usr/lib64/fricas/target/x86_64-pc-linux-gnu"
    spad-lib="/usr/lib64/fricas/target/x86_64-pc-linux-gnu/lib/libspad.so"
    foreign routines found
    openServer result 0
    FriCAS Computer Algebra System
    Version: FriCAS 1.3.12 built with sbcl 2.5.11
    Timestamp: Thu Dec 11 00:10:42 CST 2025


    On Tue, Jan 27, 2026 at 11:42 AM Fabian <[email protected]> wrote:
     >
     > Hello FriCAS group,
     >
     > It looks like I found a bug in FriCAS:
     > F:=integrate(acos(x^2),x)
     > gives:
     > +--------+
     > | 4 2 2
     > - 2 \|- x + 1 + x acos(x )
     > ----------------------------
     > x
     >
     > D(F,x)-acos(x^2)
     > gives the following instead of 0:
     > 2
     > -------------
     > +--------+
     > 2 | 4
     > x \|- x + 1
     >
     > I use FriCAS via https://sagecell.sagemath.org/ <https://
    sagecell.sagemath.org/> . Here is some Sage-code that produces the
    above output:
     >
     > from sage.interfaces.fricas import fricas
     > fricas.eval(
     > "F:=integrate(acos(x^2),x)"
     > )
     > print("F=\n",fricas("F"))
     > fricas.eval("f:=D(F,x)-acos(x^2)")
     > print("F'-acos(x^2)=\n",fricas("f"))
     >
     > The FriCAS version is 1.3.12. (print(fricas.eval(")lisp |
    $build_version|") tells me this.)
     >
     > The SageMath version is 10.8, Release Date: 2025-12-18.
    (version() tells me this.)
     >
     > Fabian
     >
     > --
     > You received this message because you are subscribed to the
    Google Groups "FriCAS - computer algebra system" group.
     > To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected].
     > To view this discussion visit https://groups.google.com/d/msgid/
    fricas-devel/e5fde980-d9d7-4e5d-9fb9-
    d1cc5c45c021n%40googlegroups.com <https://groups.google.com/d/msgid/
    fricas-devel/e5fde980-d9d7-4e5d-9fb9-d1cc5c45c021n%40googlegroups.com>.

--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:fricas- [email protected]>. To view this discussion visit https://groups.google.com/d/msgid/fricas- devel/8c7487d9-e797-475a-982b-2043ecec037cn%40googlegroups.com <https:// groups.google.com/d/msgid/fricas-devel/8c7487d9- e797-475a-982b-2043ecec037cn%40googlegroups.com? utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/80be1a29-8c93-43cd-857e-390515b95df7%40gmail.com.

Reply via email to