Algebraic gcd and Rothstein-Trager algorithm



 "Raymond Toy" <raymond.toy at ericsson.com> wrote:
> I was reading over the Rothstein-Trager algorithm for integrating the
> logarithmic part of rational functions in Symbolic Integration by
> Bronstein.  (Which is available on Google Books, by the way).
>
> Maxima seems to have almost all of the necessary pieces to implement
> this, but I don't know how to compute the gcd.  In the example on page
> 48, we need to compute
>
> gcd(x^6-5*x^4+x*x^2+4, x^4-3*x^2+6-a*(6*x^5-20*x^3+10*x))
>
> where a is the algebraic number such that 4*a^2+1 = 0.
>
> The book says the gcd is x^3+2*a*x^2-3*x-4*a.
>
> Can I get maxima to do that?
>

You have a typo in your example, in Bronsteins book
the polynomials are:
  x^6-5*x^4+5*x^2+4
  x^4-3*x^2+6-a*(3*x^5-10*x^3+5*x)

Macsyma does it this way:

tellrat(t^2 + 1);

gcd(x^6-5*x^4+5*x^2+4, 
x^4-3*x^2+6-t*(3*x^5-10*x^3+5*x)),gcd:subres,algebraic:true

This works for me in Maxima 5.9.1

Hint: tellrat requires a monic polynomial.
4*a^2 + 1 is not monic, but a variable substitution  x -> t/2 gives a
monic polynomial. Do not forget to multiply the
polynomial   6*x^5-20*x^3+10*x   with the factor 1/2 of the variable
substitution.


Greetings
Boris