# [Maxima] try antiderivative with other CAS

Michel Talon talon at lpthe.jussieu.fr
Tue Jul 14 09:07:05 CDT 2009

```Barton Willis wrote:

> Integrate[(2*x-1)*sqrt[-(x^2-x-1)*(x^2-x+1)]/((x^2-x-1)*(x^2-x+1)),x]

^ Lacks a S here.

Mathematica gives:

In[2]:=
Integrate[(2*x-1)*Sqrt[-(x^2-x-1)*(x^2-x+1)]/((x^2-x-1)*(x^2-x+1)),x]

1/6                          2/3     2
> Out[2]= (6 (-1)    (1 + Sqrt[5] - 2 x) ((-1)    + x)

-1 + Sqrt[5] + 2 x          3/2
>      (-----------------------------------)
2/3
(Sqrt[3] - I Sqrt[5]) ((-1)    + x)

5/6       5/6
>      Sqrt[-((-2 I + (-1)    + (-1)    Sqrt[5] + (Sqrt[3] - I Sqrt[5]) x) /

2/3
>          ((Sqrt[3] + I Sqrt[5]) ((-1)    + x)))]

>      (EllipticF[ArcSin[Sqrt[-((3 I + Sqrt[3] - I Sqrt[5] + Sqrt[15] -

>                2 Sqrt[3] x + (2 I) Sqrt[5] x) /

>              (-3 I + Sqrt[3] + I Sqrt[5] + Sqrt[15] -

I + Sqrt[15]
>                2 (Sqrt[3] + I Sqrt[5]) x))]], ------------] -
I - Sqrt[15]

Sqrt[3] + I Sqrt[5]
>        2 EllipticPi[-(-------------------),
Sqrt[3] - I Sqrt[5]

>          ArcSin[Sqrt[-((3 I + Sqrt[3] - I Sqrt[5] + Sqrt[15] -

>                 2 Sqrt[3] x + (2 I) Sqrt[5] x) /

>               (-3 I + Sqrt[3] + I Sqrt[5] + Sqrt[15] -

I + Sqrt[15]
>                 2 (Sqrt[3] + I Sqrt[5]) x))]], ------------])) /
I - Sqrt[15]

1/3                  1 + Sqrt[5] - 2 x
>    ((1 + (-1)   ) Sqrt[-(-----------------------------------)]
2/3
(Sqrt[3] + I Sqrt[5]) ((-1)    + x)

2      3    4
>      (-1 + Sqrt[5] + 2 x) Sqrt[1 - x  + 2 x  - x ])

As for Maple it gives a big expression which simplifies somewhat under
symplify(...,symbolic)

rose% maple
|\^/|     Maple 10 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc.
2005
<____ ____>  Waterloo Maple Inc.
|       Type ? for help.
> simplify(int((2*x-1)*sqrt(-(x^2-x-1)*(x\
> ^2-x+1))/((x^2-x-1)*(x^2-x+1)),x),symbolic);
bytes used=8000960, alloc=6814496, time=0.18
bytes used=16001552, alloc=10221744, time=0.37
bytes used=24002128, alloc=10614888, time=0.59
bytes used=32002720, alloc=10614888, time=0.75
bytes used=40003176, alloc=10876984, time=0.92
1/2  1/2                   1/2  1/2         1/2         1/2
4 I (-2 5    3    %2 + 10 I %2 + 4 5    3    %2 x + 3    %6 - 2 3    %4 - 3
I %6

1/2         1/2     2      1/2         1/2     1/2
+ 6 I %4 - 5 3    %5 + 4 3    %6 x  - 4 3    %6 x - 3    %6 5

1/2     2      1/2           1/2     1/2
- 8 3    %4 x  + 8 3    %4 x + 2 3    %4 5    + 6 I %6 x - 12 I %4 x

1/2      1/2     1/2             1/2      1/2  1/2
- 6 I %4 5    + 2 3    %6 5    x + 3 I %6 5    - 2 5    3    %5 x

1/2             1/2     2    1/2  1/2       1/2
- 4 I 5    %5 x + 4 I 5    %5 x  + 5    3    %5 + 5    %5 I - 5 I %5

1/2     1/2                      1/2          1/2
+ 10 I %5 x - 4 3    %4 5    x - 20 I %2 x - 2 I 5    %2 + 10 3    %2

1/2             1/2     2    /    1/2      1/2     1/2      1/2
1/2
+ 8 I 5    %2 x - 8 I 5    %2 x )  /  ((3    I - 5   ) (-3    I + 5   )
/

1/2      1/2 1/2             1/2              1/2
(3    I + 5   )    (2 x - 1 + 5   ) (2 x - 1 + 3    I))

1/2 1/2
2 I (4 x - 2 - 2 5   )
%1 := -----------------------------------
1/2      1/2              1/2 1/2
(3    I + 5   ) (2 x - 1 + 5   )

1/2      1/2   1/2      1/2
3    I + 5     3    I + 5
%2 := EllipticPi(%1, -------------, --------------)
1/2      1/2    1/2      1/2
3    I - 5     -3    I + 5

1/2             1/2   1/2
2 2    (2 x - 1 - 3    I)
%3 := -------------------------------------
1/2      1/2              1/2   1/2
(3    I + 5   ) (2 x - 1 + 3    I)

1/2      1/2    1/2      1/2
3    I + 5      3    I + 5
%4 := EllipticPi(%3, --------------, --------------)
1/2      1/2    1/2      1/2
-3    I + 5     -3    I + 5

1/2      1/2
3    I + 5
%5 := EllipticF(%1, --------------)
1/2      1/2
-3    I + 5

1/2      1/2
3    I + 5
%6 := EllipticF(%3, --------------)
1/2      1/2
-3    I + 5

None is very simple. The appearance of sqrt(3) and sqrt(5) is normal since:

solve((x^2-x-1)*(x^2-x+1),x);
1/2         1/2
1/2               1/2        5           5
1/2 + 1/2 I 3   , 1/2 - 1/2 I 3   , 1/2 + ----, 1/2 - ----
2           2

and the algorithm for integration of square root of degree 4 polynomials
starts from its four roots. Now of course there are so many identities
between elliptic functions that it always may be possible to simplify
an elliptic expression. This being said, finding at least one integral form
is a valuable goal in my opinion.

--
Michel Talon

```