Algebraic gcd? (Was Re: Rothstein-Trager algorithm)



On 5/3/10 9:41 AM, Raymond Toy wrote:
> Here is a very rudimentary implementation of the Rothstein-Trager
> algorithm.  Seems to work for the few tests that I've run. 
> 
> f:(x^4-3*x^2+6)/(x^6-5*x^4+5*x^2+4)$
> int_rational_function(f,x);
> -> lsum(t*log(x^3+t*x^2-3*x-2*t)/2,t,rootsof(t^2+1))
> 
> One refinement that needs to be done is to try to solve for the roots
> and substitute them in if possible, instead of leaving the result as a
> sum over the roots.

I've enhanced the code somewhat, but am now running into a problem.

When trying to integrate (x^7-24*x^4-4*x^2+8*x-8) /
(x^8+6*x^6+12*x^4+8*x^2), the Rothstein-Trager algorithm is called to
integrate 1/x.

To do this, the algorithm wants to compute gcd(x,1-t) where t is an
algebraic number such that t-1=0.

tellrat(t-1)$
gcd(x,1-t),algebraic:true,gcd:subres;

-> 1.

Is that correct?  Based on the algorithm description, it seems that the
expected answer is x.  Then the algorithm would return
lsum(t*log(x),t,rootsof(t-1)) = log(x).

Ray