(the answer "in general" is quite a mess as a function of
a,b,c,e,f,g). Macsyma asks a bunch of questions.
Raymond Toy wrote:
>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.
>
>
Here is the formula from Mathematica.
(Sqrt[2]*g*
(-(Log[(2*Sqrt[f^2 - 4*e*g]*Sqrt[a + x*(b + c*x)])/
(f - Sqrt[f^2 - 4*e*g] + 2*g*x) +
(-4*a*g*Sqrt[f^2 - 4*e*g] +
2*c*(-f^2 + 4*e*g + f*Sqrt[f^2 - 4*e*g])*x +
b*(-f^2 + 4*e*g + f*Sqrt[f^2 - 4*e*g] -
2*g*Sqrt[f^2 - 4*e*g]*x))/
(Sqrt[2]*Sqrt[g*(-(b*f) + 2*a*g +
b*Sqrt[f^2 - 4*e*g]) +
c*(f^2 - 2*e*g - f*Sqrt[f^2 - 4*e*g])]*
(-f + Sqrt[f^2 - 4*e*g] - 2*g*x))]/
Sqrt[g*(-(b*f) + 2*a*g + b*Sqrt[f^2 - 4*e*g]) +
c*(f^2 - 2*e*g - f*Sqrt[f^2 - 4*e*g])]) +
Log[(-4*Sqrt[f^2 - 4*e*g]*Sqrt[a + x*(b + c*x)] +
(Sqrt[2]*(2*(-2*a*g*Sqrt[f^2 - 4*e*g] +
c*(f^2 - 4*e*g + f*Sqrt[f^2 - 4*e*g])*x) +
b*(f^2 + f*Sqrt[f^2 - 4*e*g] -
2*g*(2*e + Sqrt[f^2 - 4*e*g]*x))))/
Sqrt[c*(f^2 - 2*e*g + f*Sqrt[f^2 - 4*e*g]) +
g*(2*a*g - b*(f + Sqrt[f^2 - 4*e*g]))])/
(2*(f + Sqrt[f^2 - 4*e*g] + 2*g*x))]/
Sqrt[c*(f^2 - 2*e*g + f*Sqrt[f^2 - 4*e*g]) +
g*(2*a*g - b*(f + Sqrt[f^2 - 4*e*g]))]))/
Sqrt[f^2 - 4*e*g]
>So, for now, I'm going to modify maxima so that this integral and
>similar integrals will return the integral.
>
>How does that sound?
>
If it avoids giving a definitely wrong answer, sure.
>
>Ray
>
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>
>