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



This is a pretty big break with the principles of the representation of
polynomials.  The understanding in the rational function package (including
RAT3A)  is that you are working with polynomials in one or more variables
and that out of these one produces rational functions by ratios of
polynomials.
For example, 5x^2+1 is represented by the moral equivalent of

(x 2 5 0 1) . 1  {denominator is 1}

   and 1/x^2 is represented by the moral equivalent of
1 . (x 2 1)

[Why moral? we don't really use "x" in here; there is a header that gives an
equivalent name for x.]

It appears that yor change allows 1/x^2 to be represented by

(x -2 1) . 1 

Which suggests to me
(a) whoever produced this form was doing significant violence to the
rational function package, perhaps in error?  and
(b) will, if carried any further, make things really break badly,
such as not doing polynomial GCD correctly, not simplifying to
zero expressions like  x^(-2) -1/x^2, display in some strange way,
etc etc.
 
 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.

There IS a variation of the rational function package used for
truncated power series / taylor series, in which negative powers
are allowed.  I think these are  hrat  expressions.  The exponents
are in fact generalized to be rational numbers.  Look at the lisp
representation of   taylor(x^(-5),x,1,4), for example.

RJF


Billinghurst, David (CALCRTS) wrote:

>>Raymond Toy <raymond.toy@ericsson.com> writes:
>>
>>[The integral of
>>  2*COT(x)^2*COS(2*x)/(CSC(2*x)+COT(2*x));
>>is wrong]
>>
>>    
>>
>>>    David> This bug is annoying me enough to want to try and fix it.  
>>>    David> Any thoughts on where to start looking?
>>>
>>>integrate calls sinint in sin.lisp.
>>>      
>>>
>>Actually, the integral is solved by RISCHINT and friends, who
>>EXPONENTIALIZE the integrand, so that it is amenable to the
>>hyperexponential case of the Risch algorithm 
>>
>>...
>>Indeed, most of the basic code we need does work for negative
>>exponents as well, so I am thinking of a simple-minded fix like
>>
>>http://members.inode.at/wjenkner/maxima/rat3a.lisp.diff
>>
>>...
>>
>>Please note that all of this is very tentative at the moment.
>>
>>Wolfgang
>>    
>>
>
>I tested Wolfgang's patch.  It worked for me, and did not cause any 
>regressions in the testsuite or the share/contrib/diffequations 
>testsuite (once they were downcased).
>
>I can't comment on the patch itself.  I have borrowed a copy of 
>Bronstein, but Chapter 5.9 is a long way into the book.  Interesting
>reading though, and it has helped with another problem I have.
>
>	David
>
>
>NOTICE
>This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
>This notice should not be removed.
>