Bug 754823 integrate(x^2/sqrt(1-x^2)/(1+x^2))



I've looked into this integral a bit, and I think I know why the
result is wrong.

It basically does a partial fraction expansion of 1/(1+x^2) to get the
integral into the form 1/(x+a)/sqrt(1-x^2).  This might be ok, but
then maxima applies the transformation y=x+a.  This would be ok too,
except a is +/- %i and the resulting integral is of the form
1/y/sqrt(<quadratic with imaginary coefficients>).

Maxima uses integration formulas for 1/sqrt(<quadratic>), but I'm
pretty sure the formulas hold only if the quadratic has real
coefficients.

G&R gives some methods for integrating functions of the form
1/(e+f*x+g*x^2)/sqrt(a+b*x+c*x^2), but I'm too lazy to implement them
right now.

So, for now, I'm going to modify maxima so that this integral and
similar integrals will return the integral.

How does that sound?

Ray