-----maxima-bounces at math.utexas.edu wrote: -----
>Hello all, Maxima fails to evaluate integral of 1/(x^4+3*x^2+1) .
>However, I think that this integral is quite simple (partial fractions
>and two arctangent). Whats wrong?
>
>Maxima is not able to factor the denominator. Is this point the source
>of the problem?
I don't know. Algorithmically, integrate shouldn't have to factor the
denominator to determine the antiderivative of a rational function.
But I don't know how Maxima tries to integrate rational functions.
The Horowitz method (the one that I once studied) for integration of
rational functions is straightforward---maybe a few pages of code
would be all that is needed. Maybe Maxima uses the Horowitz method
(or something better), I don't know.
For definite integration of rational functions, it seems that Maxima uses
factor. I'm not sure this is a good method:
(%i19) integrate(1/(x^4+3*x^2+1),x,0,1);
1 Enter factor [5*x^4+10*x^3+9*x^2+4*x+1]
1 Exit factor 5*x^4+10*x^3+9*x^2+4*x+1
(%o19) ((sqrt(5)+5)*atan((sqrt(5)+1)/2)+(sqrt(5)-5)*atan((sqrt(5)-1)/2))/10
(%i20) integrate(1/(x^4+3*x^2+1),x,0,z);
Is z positive, negative, or zero? pos;
1 Enter factor [x^4*z^4+(3*x^4+6*x^3+3*x^2)*z^2+x^4+4*x^3+6*x^2+4*x+1]
1 Exit factor x^4*z^4+3*x^4*z^2+6*x^3*z^2+3*x^2*z^2+x^4+4*x^3+6*x^2+4*x+1
Is sqrt(5) * z^4 + 3 * z^4 + 4 * z^2 - sqrt(5) + 3 positive, negative,
or zero? pos;
Is (sqrt(5)+3) * z^4 + 4 * z^2 - sqrt(5) + 3 positive, negative, or
zero?
>Should this be reported as bug?
Yes, please do. You might try to find similar bugs to see if this bug
has already been reported.
Barton