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

alarum: Risch integrator fails to divide by zero

166 views
Skip to first unread message

clicl...@freenet.de

unread,
Jan 12, 2017, 6:57:39 PM1/12/17
to

Grrrmbl.

A state-of-the-art implementation of a Risch integrator

)version

Value = "FriCAS 1.3.0 compiled at Thu Sep 1 17:01:37 UTC 2016"

responds to

integrate((1 + x)/((1 + x + x^2)*(a + b*x^3)^(1/3)), x)

with

>> Error detected within library code:
catdef: division by zero

In his "Symbolic Integration Tutorial", Bronstein appears to believe in
the existence of a workable integration algorithm for algebraic
integrands involving a simple radical extension. Didn't he know what he
was talking about?

Martin.

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

unread,
Jan 13, 2017, 6:17:38 PM1/13/17
to
Writing paper he ceratainly knew what is is writing. But writing
code he apparently assumed that he will be lucky. Or to put it
differetly: code he wrote is enough to "demostrate" that algorithm
works. But there remain "uninteresting" programming probles to
resolve. To the point: his code uses random integers. If
substituting those integers into one of denominators gives zero,
then you will see this error. Correct algorithm would retry
with different values. But his code just gives error. Recent
changes to FriCAS lead to change in random choice and for
some integrals (like this one) the problem became very visible.

One can try to hide the problem using more randomness. Or
one can do "uninteresting" programming and properly implement
retry.

BTW: This is FriCAS bug and proper place to report this is
FriCAS mailing list or Sourceforge bugtracke. And this
problem was was already reported (after relase of 1.3.0).

--
Waldek Hebisch

clicl...@freenet.de

unread,
Jan 14, 2017, 5:41:18 PM1/14/17
to

anti...@math.uni.wroc.pl schrieb:
Oh, I thought I was the first to try this particular variation of a
familar cube-root integrand. But to implement a loop over different
pseudo-random numbers should be easy, and its omission may be a mere
oversight. I will submit this integrand again to the next version.

Another thing has me wondering. Your antiderivatives of rational
functions can be discontinuous because the ATAN part is not always
rewritten to involve polynomial arguments only, as proposed by Rioboo.
For example, FriCAS 1.3.0 computes (expressed in Derive notation)

INT((2560*x^3 - 400*x^2 - 576*x - 84)/(320*x^4 + 80*x^3 - 12*x^2
+ 24*x + 9), x) = 2*LN(320*x^4 + 80*x^3 - 12*x^2 + 24*x + 9)
+ 2*SQRT(11)*ATAN(SQRT(11)*(10*x + 3)/(80*x^2 + 10*x - 9))

This is surprising especially since Bronstein provides pseudocode of
Rioboo's algorithm in his book (Ch. 2.8).

Martin.

oldk...@gmail.com

unread,
Jan 14, 2017, 11:05:25 PM1/14/17
to
> Oh, I thought I was the first to try this particular variation of a
> familar cube-root integrand. But to implement a loop over different
> pseudo-random numbers should be easy, and its omission may be a mere
> oversight. I will submit this integrand again to the next version.

After fixing this "division by zero" bug, your first integral seems to
loop indefinitely. I think there is no symbolic result for
"integrate((1 + x)/((1 + x + x^2)*(a + b*x^3)^(1/3)), x)".
When a,b are integers, FriCAS can give symbolic results.

> Another thing has me wondering. Your antiderivatives of rational
> functions can be discontinuous because the ATAN part is not always
> rewritten to involve polynomial arguments only, as proposed by Rioboo.

For this example, I have post a small patch to fricas-devel. After
my patch, FriCAS gives continuous result, same as SymPy.
I think this is a small programming mistake made by Manuel Bronstein.

clicl...@freenet.de

unread,
Jan 15, 2017, 12:33:23 PM1/15/17
to

oldk...@gmail.com schrieb:
>
> [...] I think there is no symbolic result for
> "integrate((1 + x)/((1 + x + x^2)*(a + b*x^3)^(1/3)), x)".
> When a,b are integers, FriCAS can give symbolic results.

Wow - we could all become world-famous if this proves to be the first
parametrized algebraic integrand with this property! Alas, my Derive
oracle says:

goursat5a((x + 1)/(x^2 + x + 1), x, a, 0, 0, b)

[false, false, false, true, true]

which means integrable :(. Might something else perhaps be amiss with
the current "demonstration-only" code of FriCAS?

>
> [...] For this example, I have post a small patch to fricas-devel.
> After my patch, FriCAS gives continuous result, same as SymPy.

Thanks, I myself obtain (up to some piecewise constant):

ATAN(SQRT(11)*(10*x + 3)/(80*x^2 + 10*x - 9)) =
- ATAN(SQRT(11)*(800*x^3 - 40*x^2 + 30*x + 57)/66)
- ATAN(SQRT(11)*(40*x - 7)/55)

Martin.

oldk...@gmail.com

unread,
Jan 15, 2017, 8:10:41 PM1/15/17
to

> Wow - we could all become world-famous if this proves to be the first
> parametrized algebraic integrand with this property!

Can you be more clear with that? Just to clarify, I test a,b with some
prime numbers, and FriCAS always gives result.

clicl...@freenet.de

unread,
Jan 16, 2017, 12:55:01 PM1/16/17
to

oldk...@gmail.com schrieb:
>
> > > I think there is no symbolic result for
> > > "integrate((1 + x)/((1 + x + x^2)*(a + b*x^3)^(1/3)), x)".
> > > When a,b are integers, FriCAS can give symbolic results.
>
You appeared to be contemplating the violation of a principle supported
by extensive observation:

Let f(p,x) be an algebraic function in both arguments; if, with respect
to x, f(p,x) possesses an elementary antiderivative for an infinite
number of complex parameter values p, then it possesses a single
symbolic elementary antiderivative F(p,x) that holds for all complex
values of p.

Proof (or disproof) of the principle is left to our top experts in
symbolic integration theory.

Martin.

oldk...@gmail.com

unread,
Jan 17, 2017, 8:03:03 AM1/17/17
to

> You appeared to be contemplating the violation of a principle supported
> by extensive observation:

Is there a conjecture like this?

Let's say "integrate(f(p,x), x) = F(p,x)", and maybe F is recursive:
F(p,x) = G(F(p-1,x))
I don't think there are algorithms can expand recursive definition.

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

unread,
Jan 17, 2017, 2:18:06 PM1/17/17
to
Look at

http://koutschan.de/conf/ICMS16/davenport.pdf

starting from page 25. It seems that we need to limit
how parameter is choosen, otherwise there is a
couterexample. The claim appeared as a theorem, but
recently couterexample was discovered, so there
remain some work to find correct statement. IIUC
the case when you substitute integers is considerd
to be proved.

--
Waldek Hebisch

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

unread,
Jan 17, 2017, 2:24:34 PM1/17/17
to
oldk...@gmail.com wrote:
>
> After fixing this "division by zero" bug, your first integral seems to
> loop indefinitely. I think there is no symbolic result for
> "integrate((1 + x)/((1 + x + x^2)*(a + b*x^3)^(1/3)), x)".
> When a,b are integers, FriCAS can give symbolic results.

Actually, computation of algebraic integrals in FriCAS may
be quite slow and require a lot of memory -- I can not say
how much but in all slow cases that I looked at there were
indication of forward progress.

--
Waldek Hebisch

clicl...@freenet.de

unread,
Jan 17, 2017, 6:46:29 PM1/17/17
to

anti...@math.uni.wroc.pl schrieb:
>
> Look at
>
> http://koutschan.de/conf/ICMS16/davenport.pdf
>
> starting from page 25. It seems that we need to limit
> how parameter is choosen, otherwise there is a
> couterexample. The claim appeared as a theorem, but
> recently couterexample was discovered, so there
> remain some work to find correct statement. IIUC
> the case when you substitute integers is considerd
> to be proved.
>

Thanks! I wasn't aware of Davenport's paper, and the "principle" was
distilled from my own and only my own experience :).

Martin.

clicl...@freenet.de

unread,
Jan 18, 2017, 1:15:36 PM1/18/17
to

anti...@math.uni.wroc.pl schrieb:
>
> Look at
>
> http://koutschan.de/conf/ICMS16/davenport.pdf
>
> starting from page 25. It seems that we need to limit
> how parameter is choosen, otherwise there is a
> couterexample. The claim appeared as a theorem, but
> recently couterexample was discovered, so there
> remain some work to find correct statement. IIUC
> the case when you substitute integers is considerd
> to be proved.
>

I have now looked into this a bit. A better reference is Davenport's
conference paper <http://koutschan.de/conf/ICMS16/Integration.pdf>. His
counterexample:

INT(x/((x^2 - u^2)*SQRT(x^3 - x)), x) = ?

is taken from unpublished work by Masser and Zannier. The integral is
Goursat pseudo-elliptic if and only if u^2 = -1 or u^2 = 3 +- 2*SQRT(2),
the three cases corresponding to the points [u,v]:

[#i, 1 - #i]
[SQRT(2) + 1, 2 + SQRT(2)]
[SQRT(2) - 1, (2 - SQRT(2))*#i]

on the elliptic curve v^2 = u^3 - u. I guess they are just the points
of order four on the curve. Elementary evaluations of the corresponding
Goursat integrals are:

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

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

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

Thus, the result in Davenport's paper is unnecessarily complicated -
perhaps it can be replaced still?

FriCAS 1.3.0 solves the Goursat integration problems readily. Does the
system allow to compute some (preferably simple) points of order three
on the elliptic curve? According to Davenport, Masser and Zannier claim
those points to determine an infinite number of non-Goursat integrals
that are nonetheless elementary. It would be interesting to see if
FriCAS succeeds in evaluating them and what the antiderivatives look
like.

Martin.

clicl...@freenet.de

unread,
Jan 22, 2017, 2:29:11 AM1/22/17
to

clicl...@freenet.de schrieb:
I have now also looked into the elliptic-curve aspect of this
counterexample integral.

The three Goursat cases do indeed correspond to the points of order
four. I have also determined the points of order three and discovered
that FriCAS 1.3.0 returns the associated pair of integrals unevaluated.
Something must be very wrong here - with the counterexample, with my
point computations, or with the FriCAS integrator.

Next I have tried the most simple points from those of order six: the
corresponding two integrals are again non-elementary according to FriCAS
1.3.0. Same for order eight.

Be warned, however, that I never before determined torsion points on an
elliptic curve and that I had to work from scratch because Derive lacks
commands and libraries for elliptic-curve computations.

Martin.

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

unread,
Jan 24, 2017, 8:10:54 PM1/24/17
to
My calculations indicate that points of order 3 correspond to
u^2 = 1 +- 2*sqrt(3)/3. FriCAS says that integal is nonelementary,
so something is wrong. Theory behind example is simple, so
I believe it. I am not sure about points, but this is probably
correct. So it remains to check FriCAS :(

--
Waldek Hebisch

clicl...@freenet.de

unread,
Jan 25, 2017, 12:46:52 AM1/25/17
to

anti...@math.uni.wroc.pl schrieb:
A simple theory should allow to read off simple antiderivatives for the
order-3 integrands.

I suppose you have tried the integral on Axiom as well - the problem
would have to be quite old then.

The points of order 3, 6 and 8 determined by me correspond to the
following three pairs of integrals:

INT(x/((3*x^2 + 2*SQRT(2) - 3)*SQRT(x^3 - x)), x) = ?

INT(x/((3*x^2 - 2*SQRT(2) - 3)*SQRT(x^3 - x)), x) = ?

INT(x/((x^2 + 2*SQRT(2) + 3)*SQRT(x^3 - x)), x) = ?

INT(x/((x^2 - 2*SQRT(2) + 3)*SQRT(x^3 - x)), x) = ?

INT(x/((x^2 + 2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*SQRT(x^3 - x)),
x) = ?

INT(x/((x^2 - 2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*SQRT(x^3 - x)),
x) = ?

So your result for order 3 is confirmed. I derived these x^2 - u^2 from
a recursive definition of the division polynomials and then checked the
points [u,v] by iterating the group operation.

I should mention that my statements about Goursat integrability referred
to Moebius mappings realizing the dihedral group D_2 (isomorphic to the
Klein four-group K_4) only; the special nature of the radicand x^3 - x
may open other possibilities (thus, x <-> 1/x swaps two roots and
preserves the remaining two). Compare Goursat pp. 113-118 for x^3 - 1.

Martin.

clicl...@freenet.de

unread,
Jan 31, 2017, 11:40:13 AM1/31/17
to

clicl...@freenet.de schrieb:
>
> anti...@math.uni.wroc.pl schrieb:
Actually, Goursat considered the special radicand x^3 - x as well (on
pp. 118-119) and concludes that no special pseudo-elliptic cases arise.
I tend to believe him.

The substitution x <-> 1/x takes the integral into itself, with u
replaced by 1/u. Thus my pair of order-6 integrals is equivalent to the
order-3 one.

Meanwhile I can confirm that the order-3 integrals are elementary. The
antiderivatives take less than 1000 Bytes to write down.

Martin.

Richard Fateman

unread,
Jan 31, 2017, 6:26:17 PM1/31/17
to
There are a few points that I think are worth mentioning.

1. The Risch/ etc/ methods determine algebraic anti-derivatives.
It is a bit of a stretch sometimes to identify them with functions
with certain properties. It is typically possible to multiply or add
or otherwise muck around with these functions by, for example, use
of delta or step functions. Or adding strange constants.
The results of a subsequent differentiation need not be affected.

2. Either we are dealing with functions of a single variable (e.g. x)
or multiple variables / parameterized or multidimensional integral.

a. If multiple variables, the notion of a singularity becomes much
more complicated, and insisting on a continuous function much more
hazardous. Try to find useful theorems about what amounts to
functions of several complex variables. Not too many that I have found.

b. If a single variable, you are presumably being presented with a
function that is computable and continuous [yeah, well some version of
continuous for some version of integration] within the limits of
integration (yes, I know you might not know the limits. But you really
have a lot of nerve asking for the integral of a function you are not
willing to define adequately between the limits of interest.)
Continuing on this -- a continuous function of the kind being discussed
here can almost always be integrated by numerical methods. That is
given f(x), excellent methods exist to produce a program F(a,b)
which returns the integral of f from a to b (where a and b are
numerical constants).
Arbitrarily high precision methods are available, as are error
bounds. Chance of being fooled very low.

These methods avoid the problems encountered with symbolic methods which
include (i) the uselessness of an implicit proof that there is no
elementary expression for the antiderivative or (ii) there may be one
but we can't tell for sure because there is a bug in our complicated
program or (iii) because the procedure requires a sub-algorithm that is
not computable [zero equivalence] we can't say for sure about (i) or (ii).

3. You might argue (certainly I have) that symbolic results display
more information than (say) a table of numbers for various a,b. Yet
if the result is going to be run through a plotting program, not so
convincing. A partial symbolic result can be obtained by doing a
numerical-partial-fraction decomposition of some expressions --
any denominator that looks like a polynomial in one variable with
coefficients that can be resolved to floating-point numbers can be
factored into a product of linear factors, thereby requiring only
integration of <numerator stuff>/ (x-r)^n.


4. You might argue that you need the results for a high-dimension
multiple integration (calculation of Feynman diagrams was a major
selling point of integration in the Reduce system). Eh, then you
have multiple variables, but given limits, I think.

Now if you want to posit a problem that is to find an antiderivative
that has the fewest singularities, that may be useful. Another challenge
is to find an antiderivative that is, by some data-structure complexity
measure, "the simplest". This seems to be the objective of Rubi.

These problems are interesting in a computer-sciency computer algebra
systems algebraic-geometry context.

I'm not aware of any current clamor from actual or potential users of
computer algebra systems for solution of these problems. Are there
any Feynman diagram people still out there?

I'm not saying that Bronstein's work, or the programmers attempting to
solve the problems in this thread are "wrong", just that the context and
relevance to (say) scientific computation is easy to misconstrue.

Cheers.
RJF



On 1/31/2017 8:39 AM, clicl...@freenet.de wrote:
>
> clicl...@freenet.de schrieb:
>>
>> anti...@math.uni.wroc.pl schrieb:
>>>
>>> My calculations indicate that points of order 3 correspond to
>>> u^2 = 1 +- 2*sqrt(3)/3. FriCAS says that integal is nonelementary,
>>> so something is wrong...

oldk...@gmail.com

unread,
Jan 31, 2017, 9:00:19 PM1/31/17
to

> Actually, Goursat considered the special radicand x^3 - x as well (on
> pp. 118-119) and concludes that no special pseudo-elliptic cases arise.
> I tend to believe him.

Hello Martin, can you point out which publication of Goursat are you
talking about?

oldk...@gmail.com

unread,
Jan 31, 2017, 9:22:17 PM1/31/17
to
On Wednesday, February 1, 2017 at 7:26:17 AM UTC+8, Richard Fateman wrote:
> There are a few points that I think are worth mentioning.
>
> 1. The Risch/ etc/ methods determine algebraic anti-derivatives.
> It is a bit of a stretch sometimes to identify them with functions
> with certain properties. It is typically possible to multiply or add
> or otherwise muck around with these functions by, for example, use
> of delta or step functions. Or adding strange constants.
> The results of a subsequent differentiation need not be affected.

For rational functions integration, there exists algorithms that
produce continuous anti-derivatives. It's fairly simple, I see no
reason not to implement it. As for other kinds of integration,
I don't think there's an algorithm that always works, but I think
heuristics can solve some of them.

> b. If a single variable, you are presumably being presented with a
> function that is computable and continuous [yeah, well some version of
> continuous for some version of integration] within the limits of
> integration (yes, I know you might not know the limits. But you really
> have a lot of nerve asking for the integral of a function you are not
> willing to define adequately between the limits of interest.)
> Continuing on this -- a continuous function of the kind being discussed
> here can almost always be integrated by numerical methods. That is
> given f(x), excellent methods exist to produce a program F(a,b)
> which returns the integral of f from a to b (where a and b are
> numerical constants).
> Arbitrarily high precision methods are available, as are error
> bounds. Chance of being fooled very low.

There are problems with numeric methods too, for example
if the integrand includes variables, then numeric integration
must compute over and over again for these variables.
Another one is precision, zero is zero, no matter how many
digits are computed, you can't know if it's really zero or just
a small number.

> 3. You might argue (certainly I have) that symbolic results display
> more information than (say) a table of numbers for various a,b. Yet
> if the result is going to be run through a plotting program, not so
> convincing. A partial symbolic result can be obtained by doing a
> numerical-partial-fraction decomposition of some expressions --
> any denominator that looks like a polynomial in one variable with
> coefficients that can be resolved to floating-point numbers can be
> factored into a product of linear factors, thereby requiring only
> integration of <numerator stuff>/ (x-r)^n.

If the integrand contains variables, then a symbolic result will
better than a plot (you can't draw a 4D function).

> I'm not saying that Bronstein's work, or the programmers attempting to
> solve the problems in this thread are "wrong", just that the context and
> relevance to (say) scientific computation is easy to misconstrue.
>
> Cheers.
> RJF

I think symbolic integration is also full of fun.

Cheers.

clicl...@freenet.de

unread,
Feb 1, 2017, 12:40:40 AM2/1/17
to

oldk...@gmail.com schrieb:
Edouard Goursat, Note sur quelques intégrales pseudo-elliptiques,
Bulletin de la Société Mathématique de France 15 (1887), 106-120,
on-line at:

<http://www.numdam.org/item?id=BSMF_1887__15__106_1>

Practically forgotten. Straightforward to implement in rule-based
integrators. Covers all pseudo-elliptic integrands that matter in
practice. Can be extended to cube roots.

Martin.

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

unread,
Feb 6, 2017, 10:59:34 PM2/6/17
to
clicl...@freenet.de wrote:
>
> anti...@math.uni.wroc.pl schrieb:
> >
> > clicl...@freenet.de wrote:
> > > I have now also looked into the elliptic-curve aspect of this
> > > counterexample integral.
> > >
> > > The three Goursat cases do indeed correspond to the points of order
> > > four. I have also determined the points of order three and discovered
> > > that FriCAS 1.3.0 returns the associated pair of integrals unevaluated.
> > > Something must be very wrong here - with the counterexample, with my
> > > point computations, or with the FriCAS integrator.
> >
> > My calculations indicate that points of order 3 correspond to
> > u^2 = 1 +- 2*sqrt(3)/3. FriCAS says that integal is nonelementary,
> > so something is wrong. Theory behind example is simple, so
> > I believe it. I am not sure about points, but this is probably
> > correct. So it remains to check FriCAS :(
> >
>
> A simple theory should allow to read off simple antiderivatives for the
> order-3 integrands.

It allows to read of antiderivatives. Concerning simple:
I have less practice in hand calculations than say Gauss
so I am not eager to them by hand, but in principle this
is doable. Currently FriCAS thinks that point are
of infinite order, so probably something is wrong
with FriCAS.

> I suppose you have tried the integral on Axiom as well - the problem
> would have to be quite old then.

It makes no sense: due to known bugs Axiom has no chance
to do them.

> The points of order 3, 6 and 8 determined by me correspond to the
> following three pairs of integrals:
>
> INT(x/((3*x^2 + 2*SQRT(2) - 3)*SQRT(x^3 - x)), x) = ?
>
> INT(x/((3*x^2 - 2*SQRT(2) - 3)*SQRT(x^3 - x)), x) = ?
>
> INT(x/((x^2 + 2*SQRT(2) + 3)*SQRT(x^3 - x)), x) = ?
>
> INT(x/((x^2 - 2*SQRT(2) + 3)*SQRT(x^3 - x)), x) = ?
>
> INT(x/((x^2 + 2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*SQRT(x^3 - x)),
> x) = ?
>
> INT(x/((x^2 - 2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*SQRT(x^3 - x)),
> x) = ?
>
> So your result for order 3 is confirmed. I derived these x^2 - u^2 from
> a recursive definition of the division polynomials and then checked the
> points [u,v] by iterating the group operation.

Points of order 3 are special: here second derivative of defining
function vanishes:

(1) -> f := sqrt(x^3 - x)

+------+
| 3
(1) \|x - x
Type: Expression(Integer)
(2) -> D(f, x, 2)

4 2
3x - 6x - 1
(2) -------------------
+------+
3 | 3
(4x - 4x)\|x - x
Type: Expression(Integer)
(3) -> radicalSolve(numer(%)::Expression(Integer)::Polynomial(Integer))

(3)
+-----------+ +-----------+ +---------+ +---------+
| +-+ | +-+ | +-+ | +-+
\|- 2\|3 + 3 \|- 2\|3 + 3 \|2\|3 + 3 \|2\|3 + 3
[x = --------------,x = - --------------,x = ------------,x = - ------------]
+-+ +-+ +-+ +-+
\|3 \|3 \|3 \|3
Type: List(Equation(Expression(Integer)))

I am not aware of comparable simple method for different orders.

> I should mention that my statements about Goursat integrability referred
> to Moebius mappings realizing the dihedral group D_2 (isomorphic to the
> Klein four-group K_4) only; the special nature of the radicand x^3 - x
> may open other possibilities (thus, x <-> 1/x swaps two roots and
> preserves the remaining two). Compare Goursat pp. 113-118 for x^3 - 1.
>
> Martin.

--
Waldek Hebisch

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

unread,
Feb 6, 2017, 11:09:46 PM2/6/17
to
Hmm, you checked that for order 3 one gets special case, Goursat
says that there are none and you believe Goursat? I do not
understand.

> Meanwhile I can confirm that the order-3 integrals are elementary. The
> antiderivatives take less than 1000 Bytes to write down.
>
> Martin.

--
Waldek Hebisch

clicl...@freenet.de

unread,
Feb 7, 2017, 12:12:48 PM2/7/17
to

anti...@math.uni.wroc.pl schrieb:
>
> clicl...@freenet.de wrote:
> >
> > anti...@math.uni.wroc.pl schrieb:
> > >
> > > clicl...@freenet.de wrote:
> > > >
> > > > I have now also looked into the elliptic-curve aspect of this
> > > > counterexample integral.
> > > >
> > > > The three Goursat cases do indeed correspond to the points of order
> > > > four. I have also determined the points of order three and discovered
> > > > that FriCAS 1.3.0 returns the associated pair of integrals unevaluated.
> > > > Something must be very wrong here - with the counterexample, with my
> > > > point computations, or with the FriCAS integrator.
> > >
> > > My calculations indicate that points of order 3 correspond to
> > > u^2 = 1 +- 2*sqrt(3)/3. FriCAS says that integal is nonelementary,
> > > so something is wrong. Theory behind example is simple, so
> > > I believe it. I am not sure about points, but this is probably
> > > correct. So it remains to check FriCAS :(
> > >
> >
> > A simple theory should allow to read off simple antiderivatives for
> > the order-3 integrands.
>
> It allows to read of antiderivatives. Concerning simple:
> I have less practice in hand calculations than say Gauss
> so I am not eager to them by hand, but in principle this
> is doable. Currently FriCAS thinks that point are
> of infinite order, so probably something is wrong
> with FriCAS.

There can be no doubt that something is wrong with FriCAS since Gauss
has provided me with a hand-written finite elementary evaluation of one
order-3 integral. And I find his evaluation to hold up.

>
> > I suppose you have tried the integral on Axiom as well - the problem
> > would have to be quite old then.
>
> It makes no sense: due to known bugs Axiom has no chance
> to do them.
>

Long live FriCAS!
Thanks for the details. As noted above, the special denominators x^2 -
u^2 appears as factors of the so-called division polynomials for the
elliptic curve v^2 = u^3 - u:

divpol(3, x, 0, -1, 0)

3*x^4 - 6*x^2 - 1

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

divpol(8, x, 0, -1, 0)

8*(x^6 - 5*x^4 - 5*x^2 + 1)*(x^24 - 68*x^22 - 1694*x^20 + 3276*x^18
- 19601*x^16 + 63352*x^14 - 86436*x^12 + 63352*x^10 - 19601*x^8 +
3276*x^6 - 1694*x^4 - 68*x^2 + 1)*SQRT(x^3 - x)

8*(x^2 + 1)*(x^2 + 2*SQRT(2) - 3)*(x^2 - 2*SQRT(2) - 3)*(x^2 +
2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*(x^2 - 2*SQRT(10*SQRT(2) +
14) + 4*SQRT(2) + 5)*(x^2 + 2*SQRT(41*SQRT(2) + 58) +
4*SQRT(10*SQRT(2) + 14) - 6*2^(3/4) - 8*SQRT(2) - 10*2^(1/4) -
11)*(x^2 + 2*SQRT(41*SQRT(2) + 58) - 4*SQRT(10*SQRT(2) + 14) +
6*2^(3/4) - 8*SQRT(2) + 10*2^(1/4) - 11)*(x^2 - 2*SQRT(41*SQRT(2) +
58) + 4*SQRT(10*SQRT(2) + 14) + 6*2^(3/4) - 8*SQRT(2) + 10*2^(1/4) -
11)*(x^2 - 2*SQRT(41*SQRT(2) + 58) - 4*SQRT(10*SQRT(2) + 14) -
6*2^(3/4) - 8*SQRT(2) - 10*2^(1/4) - 11)*(x^4 + 2*x^2*(5 - 4*SQRT(2))
+ 1)*(x^8 + 4*x^6*(8*SQRT(2) - 11) + 2*x^4*(51 - 32*SQRT(2)) +
4*x^2*(8*SQRT(2) - 11) + 1)*SQRT(x^3 - x)

Ugh. Note that the order-4 factors are repeated for order 8.

Martin.

clicl...@freenet.de

unread,
Feb 7, 2017, 12:13:01 PM2/7/17
to

anti...@math.uni.wroc.pl schrieb:
>
> clicl...@freenet.de wrote:
> >
> > clicl...@freenet.de schrieb:
> > >
> > > I should mention that my statements about Goursat integrability
> > > referred to Moebius mappings realizing the dihedral group D_2
> > > (isomorphic to the Klein four-group K_4) only; the special nature
> > > of the radicand x^3 - x may open other possibilities (thus, x <->
> > > 1/x swaps two roots and preserves the remaining two). Compare
> > > Goursat pp. 113-118 for x^3 - 1.
> > >
> >
> > Actually, Goursat considered the special radicand x^3 - x as well
> > (on pp. 118-119) and concludes that no special pseudo-elliptic cases
> > arise. I tend to believe him.
>
> Hmm, you checked that for order 3 one gets special case, Goursat
> says that there are none and you believe Goursat? I do not
> understand.
>

Goursat claims ("... ne fournissent pas d'intégrales pseudo-elliptiques
nouvelles") that for the special radicand x^3 - x his method of Moebius
mapping cannot detect pseudo-elliptic integrands beyond those already
found from equation (5) on p. 111 of his paper.

For x^3 - 1, however, the situation is different (pp. 113-118).

Martin.

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

unread,
Feb 11, 2017, 12:37:57 AM2/11/17
to
clicl...@freenet.de wrote:
>
> There can be no doubt that something is wrong with FriCAS since Gauss
> has provided me with a hand-written finite elementary evaluation of one
> order-3 integral. And I find his evaluation to hold up.
<snip>
> > > The points of order 3, 6 and 8 determined by me correspond to the
> > > following three pairs of integrals:
> > >
> > > INT(x/((3*x^2 + 2*SQRT(2) - 3)*SQRT(x^3 - x)), x) = ?
> > >
> > > INT(x/((3*x^2 - 2*SQRT(2) - 3)*SQRT(x^3 - x)), x) = ?
> > >
> > > INT(x/((x^2 + 2*SQRT(2) + 3)*SQRT(x^3 - x)), x) = ?
> > >
> > > INT(x/((x^2 - 2*SQRT(2) + 3)*SQRT(x^3 - x)), x) = ?
> > >
> > > INT(x/((x^2 + 2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*SQRT(x^3 - x)),
> > > x) = ?
> > >
> > > INT(x/((x^2 - 2*SQRT(10*SQRT(2) + 14) + 4*SQRT(2) + 5)*SQRT(x^3 - x)),
> > > x) = ?

FriCAS had a silly bug due to which it treated correctly computed
integral as nonelementary. For finding the bug it did not help
that point that you gave in integral for order 3 and 6 were
wrong (you wrote SQRT(2) while SQRT(3) is correct).

> Thanks for the details. As noted above, the special denominators x^2 -
> u^2 appears as factors of the so-called division polynomials for the
> elliptic curve v^2 = u^3 - u:


Using division polynomials I have found points of order 5,
one corresponds to u^2 = (1 + 2*sqrt(-1))/5. FriCAS have
now computed integrals for orders 3, 5, 6, 8. The results
are rather lengthy, so instead of posting them here I have
put them at:

http://www.math.uni.wroc.pl/~hebisch/fricas/p3

(3 above means order 3, replace 3 by 5, 6, 8 for higher order).

--
Waldek Hebisch

clicl...@freenet.de

unread,
Feb 11, 2017, 7:32:59 AM2/11/17
to

anti...@math.uni.wroc.pl schrieb:
Oops. I am sorry, the change of SQRT(3) into SQRT(2) was unintentional.
When I copy expressions from Derive, such roots consist of two
characters looking like "V3": one non-ASCII square-root character
immediately followed by the ASCII integer. In the above, I regularized
them manually to SQRT(2), unthinkingly mistaking "3" for "2", probably
doing it once and then using copy-and-paste. (The alternative is to
extract expressions from session files stored on disk; they are regular
but consist of character blocks lacking spaces and exhibiting arbitrary
line-breaks preceded by "~".)

For comparison, here are my direct and factored division polynomials for
orders 5,6,7:

divpol(5, x, 0, -1, 0)

5*x^12 - 62*x^10 - 105*x^8 + 300*x^6 - 125*x^4 + 50*x^2 + 1

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

divpol(6, x, 0, -1, 0)

2*(x^12 - 22*x^10 - 165*x^8 + 92*x^6 - 185*x^4 + 90*x^2 - 3)*(3*x^4 -
6*x^2 - 1)*SQRT(x^3 - x)

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

divpol(7, x, 0, -1, 0)

7*x^24 - 308*x^22 - 2954*x^20 + 19852*x^18 - 35231*x^16
+ 82264*x^14 - 111916*x^12 + 42168*x^10 + 15673*x^8
- 14756*x^6 + 1302*x^4 - 196*x^2 - 1

The last one exceeds my factorization capabilities. And here is the
order-3 antiderivative provided by Gauss:

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

Martin.

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

unread,
Feb 11, 2017, 10:58:05 PM2/11/17
to
clicl...@freenet.de wrote:
>
> divpol(7, x, 0, -1, 0)
>
> 7*x^24 - 308*x^22 - 2954*x^20 + 19852*x^18 - 35231*x^16
> + 82264*x^14 - 111916*x^12 + 42168*x^10 + 15673*x^8
> - 14756*x^6 + 1302*x^4 - 196*x^2 - 1
>
> The last one exceeds my factorization capabilities.

This one is irreducible. One possible u = x^2 in terms
of radicals is below:

-1
*
+---+ +-+ +-+ +---+ +-+
((- 13\|- 1 \|3 + 9)\|7 - 35\|- 1 \|3 + 21)
*
+---------------------------------------------------+2
3| +---+ +-+ +-+ +---+ +-+
\|(1524\|- 1 \|3 + 3196)\|7 - 4032\|- 1 \|3 - 8456
+
+---+ +-+
(- 42\|- 1 \|3 + 42)
*
+---------------------------------------------------+
3| +---+ +-+ +-+ +---+ +-+
\|(1524\|- 1 \|3 + 3196)\|7 - 4032\|- 1 \|3 - 8456
+
+-+
- 336\|7 + 924
/
126

--
Waldek Hebisch

clicl...@freenet.de

unread,
May 16, 2017, 12:55:31 PM5/16/17
to

clicl...@freenet.de schrieb:
>
> A state-of-the-art implementation of a Risch integrator
>
> )version
>
> Value = "FriCAS 1.3.0 compiled at Thu Sep 1 17:01:37 UTC 2016"
>
> responds to
>
> integrate((1 + x)/((1 + x + x^2)*(a + b*x^3)^(1/3)), x)
>
> with
>
> >> Error detected within library code:
> catdef: division by zero
>

Meanwhile, the FriCAS version has advanced to 1.3.2, the web interface
is running version 1.3.1, and the division by zero no longer occurs when
the integral is submitted to the web interface. Its computation,
however, exceeds the 5-minute timeout imposed by the interface (Proxy
Error - Reason: Error reading from remote server). Does FriCAS now
manage to return a correct antiderivative eventually?

Martin.

clicl...@freenet.de

unread,
May 31, 2017, 12:55:53 PM5/31/17
to

clicl...@freenet.de schrieb:
Oh my - has FriCAS been chewing on this integral for two weeks already?

Martin.

Валерий Заподовников

unread,
Jun 15, 2022, 9:39:36 AM6/15/22
to
Okay, why does the case u=i returns nonelementary
result that has weierstrassPInverse(4, 0, x) on latest
HEAD of master?

Also I cannot get these results on latest HEAD of
master I compiled today.
http://www.math.uni.wroc.pl/~hebisch/fricas/p3
not even talking about crazy
http://www.math.uni.wroc.pl/~hebisch/fricas/p5
http://www.math.uni.wroc.pl/~hebisch/fricas/p6
http://www.math.uni.wroc.pl/~hebisch/fricas/p8

This looks like a regression from 1.3.1!

Also, Masser and Zannier published very nice one

integrate(x/(x^2-1/5-2*%i/5)/(x^3-x)^(1/2), x)

It does not work, timeouts after 8 hours and looks
like even crashes because it exists (no warnings) as
if )quit happened.

nob...@nowhere.invalid

unread,
Jun 16, 2022, 2:16:00 AM6/16/22
to

??????? ???????????? schrieb:
>
> Okay, why does the case u=i returns nonelementary
> result that has weierstrassPInverse(4, 0, x) on latest
> HEAD of master?

Good grief! However:

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

still works on the web interface running version 1.3.7, the
instantaneous result being:

(log(((4*x^2+8*x+(-4))*(x^3+(-1)*x)^(1/2)+(x^4+8*x^3+2*x^2+(-8)*x+1))
/(x^4+2*x^2+1))
+2*atan(((x^2+(-2)*x+(-1))*(x^3+(-1)*x)^(1/2))/(2*x^3+(-2)*x)))/8

which is reasonably compact. As mentioned earlier in this thread, it
reduces to (in Derive notation):

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

>
> Also I cannot get these results on latest HEAD of
> master I compiled today.
> http://www.math.uni.wroc.pl/~hebisch/fricas/p3
> not even talking about crazy
> http://www.math.uni.wroc.pl/~hebisch/fricas/p5
> http://www.math.uni.wroc.pl/~hebisch/fricas/p6
> http://www.math.uni.wroc.pl/~hebisch/fricas/p8
>
> This looks like a regression from 1.3.1!
>
> Also, Masser and Zannier published very nice one
>
> integrate(x/(x^2-1/5-2*%i/5)/(x^3-x)^(1/2), x)
>
> It does not work, timeouts after 8 hours and looks
> like even crashes because it exists (no warnings) as
> if )quit happened.

I fear that the "master" branch you are using must be regarded a work
in progress. One should perhaps better stick with version 1.3.7 until
an official 1.3.8 arrives.

Martin.

Валерий Заподовников

unread,
Jun 16, 2022, 7:59:27 AM6/16/22
to
You are right, I just checked HEAD of master again,
and u=i is giving what you said. Strange.
This still of course does not work:
http://www.math.uni.wroc.pl/~hebisch/fricas/p3

BTW, I cannot compile 1.3.2, compiler does no like this
old code no longer. Do you maybe have it precompiled?

Валерий Заподовников

unread,
Jun 16, 2022, 8:21:24 AM6/16/22
to
Actually I was notified on a way to solve p3, p5, p8!

Instead of integrate(x/(x^2-1/5-2*%i/5)/(x^3-x)^(1/2), x)

use

setSimplifyDenomsFlag(true)

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

See:
https://github.com/fricas/fricas/pull/92

Case closed!

nob...@nowhere.invalid

unread,
Jun 16, 2022, 9:23:27 AM6/16/22
to

??????? ???????????? schrieb:
>
> You are right, I just checked HEAD of master again,
> and u=i is giving what you said. Strange.
> This still of course does not work:
> http://www.math.uni.wroc.pl/~hebisch/fricas/p3

For:

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

on the web interface running version 1.3.7 I get the instantaneous
result (hopefully I didn't mess it up):

(4*(6*3^(1/2)+9)^(1/4)*atan(((((27*x^6+(-171)*x^4+117*x^2+(-5))*3^(1/2)
+((-81)*x^6+315*x^4+(-171)*x^2+9))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1
/4))^3+(((-216)*x^6+216*x^4)*3^(1/2)+(324*x^6+(-360)*x^4+36*x^2))*((6*3
^(1/2)+9)^(1/4))^2+(((-270)*x^5+144*x^3+(-18)*x)*3^(1/2)+(324*x^5
+(-396)*x^3))*(x^3+(-1)*x)^(1/2)*(6*3^(1/2)+9)^(1/4)+((216*x^5+(-216)*x
^3)*3^(1/2)+(486*x^7+(-486)*x^5+18*x^3+(-18)*x)))*((((768*x^9+(-288)*x
^7+(-96)*x^5+(-96)*x^3+(-32)*x)*3^(1/2)+((-1296)*x^9+288*x^7+576*x^5
+(-32)*x^3+(-48)*x))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1/4))^3+
(((-432)*x^11+336*x^9+672*x^7+(-864)*x^5+272*x^3+16*x)*3^(1/2)+(864*x
^11+(-1440)*x^9+1152*x^7+(-1152)*x^5+544*x^3+32*x))*((6*3^(1/2)+9)^(1
/4))^2+((216*x^10+(-1080)*x^8+1104*x^6+(-1104)*x^4+600*x^2+8)*3^(1/2)
+((-216)*x^10+648*x^8+1584*x^6+(-2448)*x^4+936*x^2+8))*(x^3+(-1)*x)^(1
/2)*(6*3^(1/2)+9)^(1/4)+((864*x^10+(-1728)*x^6+1536*x^4+(-672)*x^2)*3
^(1/2)+(108*x^12+(-2376)*x^10+2916*x^8+(-2160)*x^6+2484*x^4+(-1224)*x^2
+(-4))))/(27*x^12+(-162)*x^10+297*x^8+(-108)*x^6+(-99)*x^4+(-18)*x^2
+(-1)))^(1/2)+((((-54)*x^6+(-198)*x^4+198*x^2+(-10))*3^(1/2)+(162*x^6
+342*x^4+(-378)*x^2+18))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1/4))^3
+(((-432)*x^5+144*x^3)*3^(1/2)+(324*x^5+(-504)*x^3+36*x))*(x^3+(-1)*x)
^(1/2)*(6*3^(1/2)+9)^(1/4)))/(972*x^7+(-324)*x^5+(-684)*x^3+36*x))+(4
*(6*3^(1/2)+9)^(1/4)*atan(((((27*x^6+(-171)*x^4+117*x^2+(-5))*3^(1/2)
+((-81)*x^6+315*x^4+(-171)*x^2+9))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1
/4))^3+((216*x^6+(-216)*x^4)*3^(1/2)+((-324)*x^6+360*x^4+(-36)*x^2))
*((6*3^(1/2)+9)^(1/4))^2+(((-270)*x^5+144*x^3+(-18)*x)*3^(1/2)+(324*x^5
+(-396)*x^3))*(x^3+(-1)*x)^(1/2)*(6*3^(1/2)+9)^(1/4)+(((-216)*x^5+216
*x^3)*3^(1/2)+((-486)*x^7+486*x^5+(-18)*x^3+18*x)))*(((((-768)*x^9+288
*x^7+96*x^5+96*x^3+32*x)*3^(1/2)+(1296*x^9+(-288)*x^7+(-576)*x^5+32*x^3
+48*x))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1/4))^3+(((-432)*x^11+336*x
^9+672*x^7+(-864)*x^5+272*x^3+16*x)*3^(1/2)+(864*x^11+(-1440)*x^9+1152
*x^7+(-1152)*x^5+544*x^3+32*x))*((6*3^(1/2)+9)^(1/4))^2+(((-216)*x^10
+1080*x^8+(-1104)*x^6+1104*x^4+(-600)*x^2+(-8))*3^(1/2)+(216*x^10
+(-648)*x^8+(-1584)*x^6+2448*x^4+(-936)*x^2+(-8)))*(x^3+(-1)*x)^(1/2)
*(6*3^(1/2)+9)^(1/4)+((864*x^10+(-1728)*x^6+1536*x^4+(-672)*x^2)*3^(1
/2)+(108*x^12+(-2376)*x^10+2916*x^8+(-2160)*x^6+2484*x^4+(-1224)*x^2
+(-4))))/(27*x^12+(-162)*x^10+297*x^8+(-108)*x^6+(-99)*x^4+(-18)*x^2
+(-1)))^(1/2)+((((-54)*x^6+(-198)*x^4+198*x^2+(-10))*3^(1/2)+(162*x^6
+342*x^4+(-378)*x^2+18))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1/4))^3
+(((-432)*x^5+144*x^3)*3^(1/2)+(324*x^5+(-504)*x^3+36*x))*(x^3+(-1)*x)
^(1/2)*(6*3^(1/2)+9)^(1/4)))/(972*x^7+(-324)*x^5+(-684)*x^3+36*x))+((6
*3^(1/2)+9)^(1/4)*log((((768*x^9+(-288)*x^7+(-96)*x^5+(-96)*x^3+(-32)
*x)*3^(1/2)+((-1296)*x^9+288*x^7+576*x^5+(-32)*x^3+(-48)*x))*(x^3+(-1)
*x)^(1/2)*((6*3^(1/2)+9)^(1/4))^3+(((-432)*x^11+336*x^9+672*x^7+(-864)
*x^5+272*x^3+16*x)*3^(1/2)+(864*x^11+(-1440)*x^9+1152*x^7+(-1152)*x^5
+544*x^3+32*x))*((6*3^(1/2)+9)^(1/4))^2+((216*x^10+(-1080)*x^8+1104*x^6
+(-1104)*x^4+600*x^2+8)*3^(1/2)+((-216)*x^10+648*x^8+1584*x^6+(-2448)
*x^4+936*x^2+8))*(x^3+(-1)*x)^(1/2)*(6*3^(1/2)+9)^(1/4)+((864*x^10
+(-1728)*x^6+1536*x^4+(-672)*x^2)*3^(1/2)+(108*x^12+(-2376)*x^10+2916
*x^8+(-2160)*x^6+2484*x^4+(-1224)*x^2+(-4))))/(27*x^12+(-162)*x^10+297
*x^8+(-108)*x^6+(-99)*x^4+(-18)*x^2+(-1)))+(-1)*(6*3^(1/2)+9)^(1/4)
*log(((((-768)*x^9+288*x^7+96*x^5+96*x^3+32*x)*3^(1/2)+(1296*x^9+(-288)
*x^7+(-576)*x^5+32*x^3+48*x))*(x^3+(-1)*x)^(1/2)*((6*3^(1/2)+9)^(1/4))
^3+(((-432)*x^11+336*x^9+672*x^7+(-864)*x^5+272*x^3+16*x)*3^(1/2)+(864
*x^11+(-1440)*x^9+1152*x^7+(-1152)*x^5+544*x^3+32*x))*((6*3^(1/2)+9)^(1
/4))^2+(((-216)*x^10+1080*x^8+(-1104)*x^6+1104*x^4+(-600)*x^2+(-8))*3
^(1/2)+(216*x^10+(-648)*x^8+(-1584)*x^6+2448*x^4+(-936)*x^2+(-8)))*(x^3
+(-1)*x)^(1/2)*(6*3^(1/2)+9)^(1/4)+((864*x^10+(-1728)*x^6+1536*x^4
+(-672)*x^2)*3^(1/2)+(108*x^12+(-2376)*x^10+2916*x^8+(-2160)*x^6+2484*x
^4+(-1224)*x^2+(-4))))/(27*x^12+(-162)*x^10+297*x^8+(-108)*x^6+(-99)*x^4
+(-18)*x^2+(-1))))))/24

A much shorter version appears earlier in this thread.

>
> BTW, I cannot compile 1.3.2, compiler does no like this
> old code no longer. Do you maybe have it precompiled?

Sorry, I don't. You may also ask on fricas-devel.

Martin.

nob...@nowhere.invalid

unread,
Jun 16, 2022, 9:24:09 AM6/16/22
to

??????? ???????????? schrieb:
I had no idea that you didn't know about setSimplifyDenomsFlag(true).
In view of the potential consequences, the developers should make this
the default setting.

Martin.

Валерий Заподовников

unread,
Jun 16, 2022, 8:17:24 PM6/16/22
to
I did know about it (and did try it), but %i was the problem.

nob...@nowhere.invalid

unread,
Jun 19, 2022, 2:31:01 AM6/19/22
to

??????? ???????????? schrieb:
>
> I did know about it (and did try it), but %i was the problem.

I have no luck either when I submit the order-5 integrand with sqrt(-1)
in place of %i to the FriCAS web interface currently running version
1.3.7:

unparse(integrate(x/(x^2 - 1/5 - 2*sqrt(-1)/5)/sqrt(x^3 - x),
x)::InputForm)

There are 9 exposed and 6 unexposed library operations named -
having 2 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op -
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.

Cannot find a definition or applicable library operation named -
with argument type(s)
Polynomial(Fraction(Integer))
AlgebraicNumber

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.

Grrrmbl. Will version 1.3.8 do better?

Martin.

Валерий Заподовников

unread,
Jun 19, 2022, 2:57:32 AM6/19/22
to
No, you need both. Then it works.

Nasser M. Abbasi

unread,
Jun 19, 2022, 3:35:28 AM6/19/22
to
I just build the pre-release 1.3.8 from github on Linux and got this:

setSimplifyDenomsFlag(true)
r=integrate(x/((x^2 - ((1 + 2*sqrt(-1))/5))*sqrt(x^3 - x)), x);
unparse(r::InputForm)


"((4^(1/4))^3*((-2)*(-1)^(1/2)+11)^(1/4)*log(((((75669959187507629394531250*x
^18+(-669388100504875183105468750)*x^16+1261942088603973388671875000*x^14+959
26225185394287109375000*x^12+(-1562852412462234497070312500)*x^10+86302682757
3776245117187500*x^8+(-33326447010040283203125000)*x^6+(-41164457798004150390
625000)*x^4+3458932042121887207031250*x^2+31664967536926269531250)*(-1)^(1/2)
+((-52386894822120666503906250)*x^18+29103830456733703613281250*x^16+11501833
79650115966796875000*x^14+(-2308748662471771240234375000)*x^12+10368414223194
12231445312500*x^10+378187745809555053710937500*x^8+(-28655678033828735351562
5000)*x^6+28498470783233642578125000*x^4+2047047019004821777343750*x^2+(-5774
1999626159667968750)))*(4^(1/4))^2*(((-2)*(-1)^(1/2)+11)^(1/4))^2+((488944351
673126220703125000*x^17+3352761268615722656250000000*x^15+(-13653188943862915
039062500000)*x^13+12353062629699707031250000000*x^11+(-882893800735473632812
50000)*x^9+(-3137230873107910156250000000)*x^7+748246908187866210937500000*x^
5+7510185241699218750000000*x^3+(-5058944225311279296875000)*x)*(-1)^(1/2)+(1
676380634307861328125000000*x^17+(-6798654794692993164062500000)*x^15+4079192
876815795898437500000*x^13+8519738912582397460937500000*x^11+(-95494091510772
70507812500000)*x^9+1992255449295043945312500000*x^7+412732362747192382812500
000*x^5+(-104635953903198242187500000)*x^3+1281499862670898437500000*x)))*(x^
3+(-1)*x)^(1/2)+(((128056854009628295898437500*x^19+(-50058588385581970214843
7500)*x^17+9313225746154785156250000*x^15+1659616827964782714843750000*x^13+(
-1897476613521575927734375000)*x^11+522278249263763427734375000*x^9+139370560
646057128906250000*x^7+(-64030289649963378906250000)*x^5+33043324947357177734
37500*x^3+152736902236938476562500*x)*(-1)^(1/2)+(23283064365386962890625000*
x^19+(-535510480403900146484375000)*x^17+1732259988784790039062500000*x^15+(-
1598149538040161132812500000)*x^13+(-192597508430480957031250000)*x^11+860676
169395446777343750000*x^9+(-301808118820190429687500000)*x^7+6645917892456054
687500000*x^5+5342066287994384765625000*x^3+(-141561031341552734375000)*x))*4
^(1/4)*(((-2)*(-1)^(1/2)+11)^(1/4))^3+((5820766091346740722656250*x^20+(-3492
45965480804443359375000)*x^18+2005835995078086853027343750*x^16+(-32074749469
75708007812500000)*x^14+960472971200942993164062500*x^12+14509409666061401367
18750000*x^10+(-1016844063997268676757812500)*x^8+131219625473022460937500000
*x^6+19775703549385070800781250*x^4+(-2406537532806396484375000)*x^2+(-186264
5149230957031250))*(-1)^(1/2)+((-32014213502407073974609375)*x^20+46566128730
7739257812500000*x^18+(-554719008505344390869140625)*x^16+(-16838312149047851
56250000000)*x^14+3611529245972633361816406250*x^12+(-19629001617431640625000
00000)*x^10+(-26958063244819641113281250)*x^8+226378440856933593750000000*x^6
+(-32397918403148651123046875)*x^4+(-268220901489257812500000)*x^2+1024454832
0770263671875))*(4^(1/4))^3*((-2)*(-1)^(1/2)+11)^(1/4)))/(1600000*x^20+(-3200
000)*x^18+4160000*x^16+(-3584000)*x^14+2380800*x^12+(-1193984)*x^10+476160*x^
8+(-143360)*x^6+33280*x^4+(-5120)*x^2+512))+((-1)*(4^(1/4))^3*((-2)*(-1)^(1/2
)+11)^(1/4)*log(((((75669959187507629394531250*x^18+(-66938810050487518310546
8750)*x^16+1261942088603973388671875000*x^14+95926225185394287109375000*x^12+
(-1562852412462234497070312500)*x^10+863026827573776245117187500*x^8+(-333264
47010040283203125000)*x^6+(-41164457798004150390625000)*x^4+34589320421218872
07031250*x^2+31664967536926269531250)*(-1)^(1/2)+((-5238689482212066650390625
0)*x^18+29103830456733703613281250*x^16+1150183379650115966796875000*x^14+(-2
308748662471771240234375000)*x^12+1036841422319412231445312500*x^10+378187745
809555053710937500*x^8+(-286556780338287353515625000)*x^6+2849847078323364257
8125000*x^4+2047047019004821777343750*x^2+(-57741999626159667968750)))*(4^(1/
4))^2*(((-2)*(-1)^(1/2)+11)^(1/4))^2+((488944351673126220703125000*x^17+33527
61268615722656250000000*x^15+(-13653188943862915039062500000)*x^13+1235306262
9699707031250000000*x^11+(-88289380073547363281250000)*x^9+(-3137230873107910
156250000000)*x^7+748246908187866210937500000*x^5+7510185241699218750000000*x
^3+(-5058944225311279296875000)*x)*(-1)^(1/2)+(1676380634307861328125000000*x
^17+(-6798654794692993164062500000)*x^15+4079192876815795898437500000*x^13+85
19738912582397460937500000*x^11+(-9549409151077270507812500000)*x^9+199225544
9295043945312500000*x^7+412732362747192382812500000*x^5+(-1046359539031982421
87500000)*x^3+1281499862670898437500000*x)))*(x^3+(-1)*x)^(1/2)+((((-12805685
4009628295898437500)*x^19+500585883855819702148437500*x^17+(-9313225746154785
156250000)*x^15+(-1659616827964782714843750000)*x^13+189747661352157592773437
5000*x^11+(-522278249263763427734375000)*x^9+(-139370560646057128906250000)*x
^7+64030289649963378906250000*x^5+(-3304332494735717773437500)*x^3+(-15273690
2236938476562500)*x)*(-1)^(1/2)+((-23283064365386962890625000)*x^19+535510480
403900146484375000*x^17+(-1732259988784790039062500000)*x^15+1598149538040161
132812500000*x^13+192597508430480957031250000*x^11+(-860676169395446777343750
000)*x^9+301808118820190429687500000*x^7+(-6645917892456054687500000)*x^5+(-5
342066287994384765625000)*x^3+141561031341552734375000*x))*4^(1/4)*(((-2)*(-1
)^(1/2)+11)^(1/4))^3+(((-5820766091346740722656250)*x^20+34924596548080444335
9375000*x^18+(-2005835995078086853027343750)*x^16+320747494697570800781250000
0*x^14+(-960472971200942993164062500)*x^12+(-1450940966606140136718750000)*x^
10+1016844063997268676757812500*x^8+(-131219625473022460937500000)*x^6+(-1977
5703549385070800781250)*x^4+2406537532806396484375000*x^2+1862645149230957031
250)*(-1)^(1/2)+(32014213502407073974609375*x^20+(-46566128730773925781250000
0)*x^18+554719008505344390869140625*x^16+1683831214904785156250000000*x^14+(-
3611529245972633361816406250)*x^12+1962900161743164062500000000*x^10+26958063
244819641113281250*x^8+(-226378440856933593750000000)*x^6+3239791840314865112
3046875*x^4+268220901489257812500000*x^2+(-10244548320770263671875)))*(4^(1/4
))^3*((-2)*(-1)^(1/2)+11)^(1/4)))/(1600000*x^20+(-3200000)*x^18+4160000*x^16+
(-3584000)*x^14+2380800*x^12+(-1193984)*x^10+476160*x^8+(-143360)*x^6+33280*x
^4+(-5120)*x^2+512))+((-1)*(-1)^(1/2)*(4^(1/4))^3*((-2)*(-1)^(1/2)+11)^(1/4)*
log((((((-75669959187507629394531250)*x^18+669388100504875183105468750*x^16+(
-1261942088603973388671875000)*x^14+(-95926225185394287109375000)*x^12+156285
2412462234497070312500*x^10+(-863026827573776245117187500)*x^8+33326447010040
283203125000*x^6+41164457798004150390625000*x^4+(-3458932042121887207031250)*
x^2+(-31664967536926269531250))*(-1)^(1/2)+(52386894822120666503906250*x^18+(
-29103830456733703613281250)*x^16+(-1150183379650115966796875000)*x^14+230874
8662471771240234375000*x^12+(-1036841422319412231445312500)*x^10+(-3781877458
09555053710937500)*x^8+286556780338287353515625000*x^6+(-28498470783233642578
125000)*x^4+(-2047047019004821777343750)*x^2+57741999626159667968750))*(4^(1/
4))^2*(((-2)*(-1)^(1/2)+11)^(1/4))^2+((488944351673126220703125000*x^17+33527
61268615722656250000000*x^15+(-13653188943862915039062500000)*x^13+1235306262
9699707031250000000*x^11+(-88289380073547363281250000)*x^9+(-3137230873107910
156250000000)*x^7+748246908187866210937500000*x^5+7510185241699218750000000*x
^3+(-5058944225311279296875000)*x)*(-1)^(1/2)+(1676380634307861328125000000*x
^17+(-6798654794692993164062500000)*x^15+4079192876815795898437500000*x^13+85
19738912582397460937500000*x^11+(-9549409151077270507812500000)*x^9+199225544
9295043945312500000*x^7+412732362747192382812500000*x^5+(-1046359539031982421
87500000)*x^3+1281499862670898437500000*x)))*(x^3+(-1)*x)^(1/2)+(((2328306436
5386962890625000*x^19+(-535510480403900146484375000)*x^17+1732259988784790039
062500000*x^15+(-1598149538040161132812500000)*x^13+(-19259750843048095703125
0000)*x^11+860676169395446777343750000*x^9+(-301808118820190429687500000)*x^7
+6645917892456054687500000*x^5+5342066287994384765625000*x^3+(-14156103134155
2734375000)*x)*(-1)^(1/2)+((-128056854009628295898437500)*x^19+50058588385581
9702148437500*x^17+(-9313225746154785156250000)*x^15+(-1659616827964782714843
750000)*x^13+1897476613521575927734375000*x^11+(-522278249263763427734375000)
*x^9+(-139370560646057128906250000)*x^7+64030289649963378906250000*x^5+(-3304
332494735717773437500)*x^3+(-152736902236938476562500)*x))*4^(1/4)*(((-2)*(-1
)^(1/2)+11)^(1/4))^3+((32014213502407073974609375*x^20+(-46566128730773925781
2500000)*x^18+554719008505344390869140625*x^16+1683831214904785156250000000*x
^14+(-3611529245972633361816406250)*x^12+1962900161743164062500000000*x^10+26
958063244819641113281250*x^8+(-226378440856933593750000000)*x^6+3239791840314
8651123046875*x^4+268220901489257812500000*x^2+(-10244548320770263671875))*(-
1)^(1/2)+(5820766091346740722656250*x^20+(-349245965480804443359375000)*x^18+
2005835995078086853027343750*x^16+(-3207474946975708007812500000)*x^14+960472
971200942993164062500*x^12+1450940966606140136718750000*x^10+(-10168440639972
68676757812500)*x^8+131219625473022460937500000*x^6+1977570354938507080078125
0*x^4+(-2406537532806396484375000)*x^2+(-1862645149230957031250)))*(4^(1/4))^
3*((-2)*(-1)^(1/2)+11)^(1/4)))/(1600000*x^20+(-3200000)*x^18+4160000*x^16+(-3
584000)*x^14+2380800*x^12+(-1193984)*x^10+476160*x^8+(-143360)*x^6+33280*x^4+
(-5120)*x^2+512))+(-1)^(1/2)*(4^(1/4))^3*((-2)*(-1)^(1/2)+11)^(1/4)*log((((((
-75669959187507629394531250)*x^18+669388100504875183105468750*x^16+(-12619420
88603973388671875000)*x^14+(-95926225185394287109375000)*x^12+156285241246223
4497070312500*x^10+(-863026827573776245117187500)*x^8+33326447010040283203125
000*x^6+41164457798004150390625000*x^4+(-3458932042121887207031250)*x^2+(-316
64967536926269531250))*(-1)^(1/2)+(52386894822120666503906250*x^18+(-29103830
456733703613281250)*x^16+(-1150183379650115966796875000)*x^14+230874866247177
1240234375000*x^12+(-1036841422319412231445312500)*x^10+(-3781877458095550537
10937500)*x^8+286556780338287353515625000*x^6+(-28498470783233642578125000)*x
^4+(-2047047019004821777343750)*x^2+57741999626159667968750))*(4^(1/4))^2*(((
-2)*(-1)^(1/2)+11)^(1/4))^2+((488944351673126220703125000*x^17+33527612686157
22656250000000*x^15+(-13653188943862915039062500000)*x^13+1235306262969970703
1250000000*x^11+(-88289380073547363281250000)*x^9+(-3137230873107910156250000
000)*x^7+748246908187866210937500000*x^5+7510185241699218750000000*x^3+(-5058
944225311279296875000)*x)*(-1)^(1/2)+(1676380634307861328125000000*x^17+(-679
8654794692993164062500000)*x^15+4079192876815795898437500000*x^13+85197389125
82397460937500000*x^11+(-9549409151077270507812500000)*x^9+199225544929504394
5312500000*x^7+412732362747192382812500000*x^5+(-104635953903198242187500000)
*x^3+1281499862670898437500000*x)))*(x^3+(-1)*x)^(1/2)+((((-23283064365386962
890625000)*x^19+535510480403900146484375000*x^17+(-17322599887847900390625000
00)*x^15+1598149538040161132812500000*x^13+192597508430480957031250000*x^11+(
-860676169395446777343750000)*x^9+301808118820190429687500000*x^7+(-664591789
2456054687500000)*x^5+(-5342066287994384765625000)*x^3+1415610313415527343750
00*x)*(-1)^(1/2)+(128056854009628295898437500*x^19+(-500585883855819702148437
500)*x^17+9313225746154785156250000*x^15+1659616827964782714843750000*x^13+(-
1897476613521575927734375000)*x^11+522278249263763427734375000*x^9+1393705606
46057128906250000*x^7+(-64030289649963378906250000)*x^5+330433249473571777343
7500*x^3+152736902236938476562500*x))*4^(1/4)*(((-2)*(-1)^(1/2)+11)^(1/4))^3+
(((-32014213502407073974609375)*x^20+465661287307739257812500000*x^18+(-55471
9008505344390869140625)*x^16+(-1683831214904785156250000000)*x^14+36115292459
72633361816406250*x^12+(-1962900161743164062500000000)*x^10+(-269580632448196
41113281250)*x^8+226378440856933593750000000*x^6+(-32397918403148651123046875
)*x^4+(-268220901489257812500000)*x^2+10244548320770263671875)*(-1)^(1/2)+((-
5820766091346740722656250)*x^20+349245965480804443359375000*x^18+(-2005835995
078086853027343750)*x^16+3207474946975708007812500000*x^14+(-9604729712009429
93164062500)*x^12+(-1450940966606140136718750000)*x^10+1016844063997268676757
812500*x^8+(-131219625473022460937500000)*x^6+(-19775703549385070800781250)*x
^4+2406537532806396484375000*x^2+1862645149230957031250))*(4^(1/4))^3*((-2)*(
-1)^(1/2)+11)^(1/4)))/(1600000*x^20+(-3200000)*x^18+4160000*x^16+(-3584000)*x
^14+2380800*x^12+(-1193984)*x^10+476160*x^8+(-143360)*x^6+33280*x^4+(-5120)*x
^2+512)))))/80"

--Nasser

Nasser M. Abbasi

unread,
Jun 19, 2022, 3:41:34 AM6/19/22
to
Opps, sorry, it looks I used the wrong integral from another listing.

Let me try again

setSimplifyDenomsFlag(true)
r=integrate(x/(x^2 - 1/5 - 2*sqrt(-1)/5)/sqrt(x^3 - x),x);
There are 9 exposed and 6 unexposed library operations named -
having 2 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op -
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.

Cannot find a definition or applicable library operation named -
with argument type(s)
Polynomial(Fraction(Integer))
AlgebraicNumber

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.


So I get same error as you do on the pre-release 1.3.8 Fricas

--Nasser

Валерий Заподовников

unread,
Jun 19, 2022, 9:15:44 AM6/19/22
to
But that is the same integral, Nasser.

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

unread,
Jun 19, 2022, 9:56:31 AM6/19/22
to
For Linux there are binaries at SourceForge.

--
Waldek Hebisch

Nasser M. Abbasi

unread,
Jun 19, 2022, 4:49:49 PM6/19/22
to
On 6/19/2022 8:15 AM, Валерий Заподовников wrote:
> But that is the same integral, Nasser.

You are right. But they are written differently. Since one gave an error
and not the second, I assumed they are different and I thought I copied
the wrong one from somewhere else.

This looks like bug in Fricas parser in this case?

(1) -> setSimplifyDenomsFlag(true)
(2) -> r=integrate(x/((x^2 - ((1 + 2*sqrt(-1))/5))*sqrt(x^3 - x)), x);
Type: Equation(Expression(Integer))

(3) -> r2=integrate(x/(x^2 - 1/5 - 2*sqrt(-1)/5)/sqrt(x^3 - x),x);
There are 9 exposed and 6 unexposed library operations named -
having 2 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op -
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.

Cannot find a definition or applicable library operation named -
with argument type(s)
Polynomial(Fraction(Integer))
AlgebraicNumber

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.


--Nasser

nob...@nowhere.invalid

unread,
Jun 20, 2022, 3:10:35 AM6/20/22
to

"Nasser M. Abbasi" schrieb:
I would consider it a natural behaviour for the FriCAS parser to
resolve:

Polynomial(Fraction(Integer)) - AlgebraicNumber

by automatically downgrading to Polynomial(AlgebraicNumber), assuming
that is a valid FriCAS type. Presumably, the integrand would then again
end up as Expression(Integer) and thus be palatable to the integrator.

Martin.

Валерий Заподовников

unread,
Jun 21, 2022, 1:17:21 PM6/21/22