FW: [ maxima-Bugs-1051437 ] Trig integral error



Richard Fateman <fateman@cs.berkeley.edu> writes:

> It appears that yor change allows 1/x^2 to be represented by
>
> (x -2 1) . 1 
[...]
> This is a pretty big break with the principles of the representation of
> polynomials.
[cut recall of CRE concepts]

The risch module manipulates Laurent polynomials via the macros R+, R-
and R* (defined in ratmac.lisp), which are used only in risch.lisp and
sinint.lisp (the latter file contains some helper functions for
risch.lisp).  Also, RISCHINT DISREPs the result before returning it to
the outside world.  So I guess that this bold attempt at a
re-interpretation of the CRE representation is pretty much confined to
the risch module.

Now, currently these macros expand to calls to functions in the
rational function package.  It might well be that

> whoever produced this form was doing significant violence to the
> rational function package, perhaps in error?

but it might also be the case that the author thought that it would be
easy to stretch things a bit so that addition and multiplication of
Laurent polynomials could simply be done by the rational function
module.  I am exploring this possibility.  Of course, the operands of
R+ etc. must agree about what they put in the denominator (constants,
conceptually), so that things like

> not simplifying to zero expressions like  x^(-2) -1/x^2

can't happen.

> If no one else ever produces a polynomial with a negative exponent,
> this might fix the problem without breaking anything else, but I
> find it hard to believe this is the "optimal" patch.

I agree that this is a quick'n'dirty thing, and, of course, 

> There IS a variation of the rational function package used for
> truncated power series / taylor series, in which negative powers are
> allowed.

but I'd rather not use it because the internal format is somewhat
different, it has its own way of managing the genvar <-> varlist
correspondence, we would have to deal with truncation levels...

Writing a dedicated Laurent polynomial module would probably be a
clean solution but this would mean a huge amount of code duplication.

By the way, there's also some code for playing with these things from
the Maxima top-level (see the url given in my previous message).

Wolfgang