On Sun, Jan 10, 2021 at 08:22:25PM +0800, oldk1331 wrote:
> The patch is as following or see the attachment.
>
> This code only solves the case like
>
> %iint(x,c1*%iint(c2*%iint(c3*%iint(...)/f3(x))/f2(x))/f1(x))
>
> Which is the case we encountered.
>
> I'm not aware about other integrals it can't handle, yet.
First general comment: idea behind 'integrat.spad' is rather
simple: build isomorphism from input to differential field
expected by integrator. Isomorphism includes inverse mapping.
This simple idea is spoiled but some difficulties. First,
input may be written in redundant way, so we get map back
but it is not inverse on datastructure level. Second,
'integrat.spad' tries to do its work as composition of
helper functions. Unfortunately, composition introduces
troubles. At core of current bug is fact that single
kernel like 'polylog(3, x)' generates differential
field of transcendence degree 3 over Q(x), so needs
3 kernels. One of kernels is 'log' which causes no
trouble. But 'realLiovillian' produces two '%iint'-s
while there is only single 'polylog(3, x)' in the input.
Proper solution would note that input differential field
contains 'polylog(2, x)'. It is problematic to do this
in clean way, as we should simultaneously build mapping
in one direction and the inverse. However, the attached
patch is doing that in moderately hacky way.
AFAICS your patch tries to cure symptoms. It probably
would work, but I think it is better to get closer
to source of the problem.
BTW: 'integrat.spad' currently contains a pile of hacks,
for that reason alone I would like to restructure it.
There are also problems that I do not know how to fix
by simple hacks. In this case I thought that fix would
be more complicated, but writing explanation above
I realised that relatively simple hack may work.
--
Waldek Hebisch