Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FriCAS result on an algebraic integral

44 views
Skip to first unread message

Sam Blake

unread,
Jan 20, 2022, 12:48:43 AM1/20/22
to
Greetings,

I was looking at this test on Nasser's website:

<https://12000.org/my_notes/CAS_integration_tests/reports/summer_2021/test_cases/9_Blake_problems/resu1078.htm#x1106-11050003.11.64>

Unless I am mistaken, the result from FriCAS is seemingly not in the minimal extension field. I vaguely recall this is a guarantee for the transcendental case of the Risch-Trager-Bronstein algorithm. Is this not the case for Risch-Trager-Bronstein for algebraic integrals? To be clear, I am puzzled by the nested radicals within the arctans, ie Sqrt[(x^2 + Sqrt[2] x (-1 + x^3)^(1/4) + Sqrt[-1 + x^3])/x^2]. In comparison, Trager's algorithm in Maple does not return nested radicals.

Sam

anti...@math.uni.wroc.pl

unread,
Jan 21, 2022, 4:54:05 PM1/21/22
to
It is not clear which example you have in mind. Note:
- ATM FriCAS makes no attempt to denest root, so if nested root is
created at some stage it has high chance to appear in final result
- FriCAS may discover that there is nontrivial algebraic dependency
in the input and express is using nested root
- things like asin effectively have hidden root which will be
visible in result
- FriCAS takes shorcuts in some places. Shortcuts may lead to
algebraic extentions.

--
Waldek Hebisch

Sam Blake

unread,
Jan 23, 2022, 4:44:09 AM1/23/22
to
The example is

integrate(x^2*(x^3-4)/(x^3-1)^(3/4)/(x^4+x^3-1),x)

Per Nasser's website, FriCAS returns

2*sqrt(2)*arctan((sqrt(2)*x*sqrt((x^2 + sqrt(2)*(x^3 - 1)^(1/4)*x + sqrt(x^3 - 1))/x^2) - x - sqrt(2)*(x^3 - 1)^(1/4))/x) + 2*sqrt(2)*arctan((sqrt(2)*x*sqrt((x^2 - sqrt(2)*(x^3 - 1)^(1/4)*x + sqrt(x^3 - 1))/x^2) + x - sqrt(2)*(x^3 - 1)^(1/4))/x) - 1/2*sqrt(2)*log(4*(x^2 + sqrt(2)*(x^3 - 1)^(1/4)*x + sqrt(x^3 - 1))/x^2) + 1/2*sqrt(2)*log(4*(x^2 - sqrt(2)*(x^3 - 1)^(1/4)*x + sqrt(x^3 - 1))/x^2)

anti...@math.uni.wroc.pl

unread,
Jan 23, 2022, 7:39:40 AM1/23/22
to
This is postprocessing. Actual result from integrator is:

+------+
4| 3
--+ \|x - 1
> %LTJ log(- %LTJ + ---------)
--+ x
4
%LTJ + 1 = 0

That is root sum over roots of order 4 from 1. This gets expanded
to more explicit form. In this case expander messed up things...

--
Waldek Hebisch

nob...@nowhere.invalid

unread,
Jan 29, 2022, 5:29:37 AM1/29/22
to

anti...@math.uni.wroc.pl schrieb:
>
> Sam Blake <samuel.th...@gmail.com> wrote:
> > On Saturday, January 22, 2022 at 8:54:05 AM UTC+11, anti...@math.uni.wroc.pl wrote:
> > > Sam Blake <samuel.th...@gmail.com> wrote:
> > > > Greetings,
> > > >
> > > > I was looking at this test on Nasser's website:
> > > >
> > > > <https://12000.org/my_notes/CAS_integration_tests/reports/summer_2021/test_cases/9_Blake_problems/resu1078.htm#x1106-11050003.11.64>
> > > >
> > > > Unless I am mistaken, the result from FriCAS is seemingly not
> > > > in the minimal extension field. I vaguely recall this is a
> > > > guarantee for the transcendental case of the
> > > > Risch-Trager-Bronstein algorithm. Is this not the case for
> > > > Risch-Trager-Bronstein for algebraic integrals? To be clear, I
> > > > am puzzled by the nested radicals within the arctans, ie
> > > > Sqrt[(x^2 + Sqrt[2] x (-1 + x^3)^(1/4) + Sqrt[-1 + x^3])/x^2].
> > > > In comparison, Trager's algorithm in Maple does not return
> > > > nested radicals.
> > > It is not clear which example you have in mind. Note:
> > > - ATM FriCAS makes no attempt to denest root, so if nested root is
> > > created at some stage it has high chance to appear in final result
> > > - FriCAS may discover that there is nontrivial algebraic
> > > dependency in the input and express is using nested root
> > > - things like asin effectively have hidden root which will be
> > > visible in result
> > > - FriCAS takes shorcuts in some places. Shortcuts may lead to
> > > algebraic extentions.
> > >
> >
> > The example is
> >
> > integrate(x^2*(x^3-4)/(x^3-1)^(3/4)/(x^4+x^3-1),x)
> >
> > Per Nasser's website, FriCAS returns
> >
> > 2*sqrt(2)*arctan((sqrt(2)*x*sqrt((x^2 + sqrt(2)*(x^3 - 1)^(1/4)*x
> > + sqrt(x^3 - 1))/x^2) - x - sqrt(2)*(x^3 - 1)^(1/4))/x) + > > 2*sqrt(2)*arctan((sqrt(2)*x*sqrt((x^2 - sqrt(2)*(x^3 - 1)^(1/4)*x
> > + sqrt(x^3 - 1))/x^2) + x - sqrt(2)*(x^3 - 1)^(1/4))/x) -
> > 1/2*sqrt(2)*log(4*(x^2 + sqrt(2)*(x^3 - 1)^(1/4)*x + sqrt(x^3 -
> > 1))/x^2) + 1/2*sqrt(2)*log(4*(x^2 - sqrt(2)*(x^3 - 1)^(1/4)*x +
> > sqrt(x^3 - 1))/x^2)
> >
>
> This is postprocessing. Actual result from integrator is:
>
> +------+
> 4| 3
> --+ \|x - 1
> > %LTJ log(- %LTJ + ---------)
> --+ x
> 4
> %LTJ + 1 = 0
>
> That is root sum over roots of order 4 from 1. This gets expanded
> to more explicit form. In this case expander messed up things...
>

The postprocessing designer must have had something in mind.

On the real axis, a term of the form C*ATAN(f(x)) can only take values
from (-C*pi/2, +C*pi/2); antiderivatives involving such a term must
therefore exhibit jump discontinuities if they need to cover a larger
range. Using familiar relations of trigonometry, the ATAN term may be
rewritten as C/2*ATAN(f2(x)) and more generally as C/n*ATAN(fn(x)),
which, however, makes matters worse. Integrators should therefore
produce antiderivatives transformed in the reverse manner as long as
this is possible without introducing spurious radical extensions.

To my knowledge, FriCAS is not doing this consistently. In the case at
hand, it is even going one step too far, introducing the unnecessary
nested radical

SQRT((x^2 - SQRT(2)*(x^3 - 1)^(1/4)*x + SQRT(x^3 - 1))/x^2)

supposedly in order to avoid discontinuities. Without this step, the
antiderivative simply reads:

INT(x^2*(-4 + x^3)/((-1 + x^3)^(3/4)*(-1 + x^3 + x^4)), x) =
SQRT(2)*ATAN(SQRT(2)*x*(-1 + x^3)^(1/4)/(- x^2 + SQRT(-1 + x^3))) -
SQRT(2)*ATANH(SQRT(2)*x*(-1 + x^3)^(1/4)/(x^2 + SQRT(-1 + x^3)))

which, apart from two logarithmic poles, is continuous on the real axis
nonetheless.

Martin.

anti...@math.uni.wroc.pl

unread,
Jan 30, 2022, 8:45:11 AM1/30/22
to
Yes.

> To my knowledge, FriCAS is not doing this consistently. In the case at
> hand, it is even going one step too far, introducing the unnecessary
> nested radical
>
> SQRT((x^2 - SQRT(2)*(x^3 - 1)^(1/4)*x + SQRT(x^3 - 1))/x^2)
>
> supposedly in order to avoid discontinuities. Without this step, the
> antiderivative simply reads:
>
> INT(x^2*(-4 + x^3)/((-1 + x^3)^(3/4)*(-1 + x^3 + x^4)), x) =
> SQRT(2)*ATAN(SQRT(2)*x*(-1 + x^3)^(1/4)/(- x^2 + SQRT(-1 + x^3))) -
> SQRT(2)*ATANH(SQRT(2)*x*(-1 + x^3)^(1/4)/(x^2 + SQRT(-1 + x^3)))
>
> which, apart from two logarithmic poles, is continuous on the real axis
> nonetheless.

This is really ancient principle "left hand does not know what
right hand is doing". As part of postprocessing FriCAS checks
that function is real and in such case computes real part of
integral. But code computing real part does not know that
works on result of integration. In fact, code computingh real
part does not know if it is dealing with a function or a constant.
Simply, it applies general formulas. But general formula contains
square root...

And to clarify: this is going to change. But currently
this step is helping in several cases and any replacement
must handle cases handled well by current code.

--
Waldek Hebisch
0 new messages