Alasdair wrote:
>
> Could you enlarge on
> the Risch algorithm? I always assumed that Axiom had a complete
> implementation, but if not I'd want to be put right.
Implementation in Axiom had substantial gaps. Basically,
decision procedure due to Risch, Rothstein, Davenport,
Trager, Bronstein, etc. called "Risch algorithm" has three
main stages.
Preparatory stage:
- choose top transcendental kernel
- write integrand as an algebraic function of top transcendetal
with coefficient depending on other kernels
- remove irrationalities from denominator
First stage (Hermite reduction):
- use integration by parts to remove multiple factors
from denominator
Second stage:
- find logarithmic part of the integral
After the fist two stages remaining integrand has trivial
denominator and also integral (if exists) must have
trivial denominator.
Third stage:
- handle the remaining part (called polynomial part). In
general this involves recursion and "simpler" version
of integration problem.
First stage, that is Hermite reduction was fully implemented
in Axiom by Bronstein. The second stage that is finding
logarithmic part was inplemented for transcendental functions
(in full generality) and for purely algebraic functions
having "simple" residues. For example, if you had
function of form
f = (c_1*log(a_1) + c_2*log(a_2))
where c_1 and c_2 were general algebraic constants and
a_1 and a_2 were purely algebraic functions, then Axiom
could not handle such function -- genaral c_1 and c_2
mean that residues are too complicated (not "simple").
FriCAS contains heuristic code which can handle many
such cases, but it is still quite far from general
algorithm for purely algebraic integrands.
For algebraic integrands which are not purely algebraic
both FriCAS and Axiom can not find logarithmic part.
The third stage that in finding "polynomial part" may
look trivial at first, but in fact biggest hole were
there: algorithm in Axiom was incomplete even for
purely transcendetal integrands (sometimes Axiom would
print weird error message, sometimes return unevaluated
integral). In FriCAS this part for purely transcendental
functions is complette. For functions where top
kernel is algebraic this part is unimplemented. In
fact currently is not needed: for purely algebraic
functions one can change variables so that already
Hermite reduction produces "polynomial part", so
separate code to get "polynomial part" is not needed.
For algebraic functions depending on a transcendental,
before computing "polynomial part" we need to find
logaritmic part. But since finding logaritmic part
is unimplemented we can not get to "polynomial part"...
There is somewhat tricky situation with mixed
functions where top kernel is tanscendental, but
coefficients are algebraic. In such case our code
for "polynomial part" is incomplete, in fact when
computing polynomial part we may recursively call
a variant of code computing logaritmic part, so
core problem for mixed functions basically is that
directly or after some recursion we may be forced
to determine logarithmic part of algebraic integral.
Let me add that is is quite easy to find integrals
which are not handled by our implementations of
Risch algorithm. However, beside Risch algorithm
integrator has a bunch of tricks to handle
common simple cases. So one have to pile a few
difficulties together -- still there are relatively
small examples showing incompeleteness.
--
Waldek Hebisch