7.8 Problem number 29

\[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {a+b x} \sqrt {a c-b c x}} \, dx \]

Optimal antiderivative \[ -\frac {C \left (f x +e \right )^{2} \left (-b^{2} x^{2}+a^{2}\right )}{3 b^{2} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}-\frac {\left (4 a^{2} C \,f^{2}-2 b^{2} \left (C \,e^{2}-3 f \left (A f +B e \right )\right )-b^{2} f \left (-3 B f +C e \right ) x \right ) \left (-b^{2} x^{2}+a^{2}\right )}{6 b^{4} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}+\frac {\left (2 A \,b^{2} e +a^{2} \left (B f +C e \right )\right ) \arctan \left (\frac {b x \sqrt {c}}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right ) \sqrt {-b^{2} c \,x^{2}+a^{2} c}}{2 b^{3} \sqrt {c}\, \sqrt {b x +a}\, \sqrt {-b c x +a c}} \]

command

integrate((f*x+e)*(C*x^2+B*x+A)/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="giac")

Giac 1.9.0-11 via sagemath 9.6 output

\[ -\frac {{\left ({\left (\frac {2 \, {\left (b x + a\right )} C f}{c} - \frac {4 \, C a c^{2} f - 3 \, B b c^{2} f - 3 \, C b c^{2} e}{c^{3}}\right )} {\left (b x + a\right )} + \frac {3 \, {\left (2 \, C a^{2} c^{2} f - B a b c^{2} f + 2 \, A b^{2} c^{2} f - C a b c^{2} e + 2 \, B b^{2} c^{2} e\right )}}{c^{3}}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} + \frac {6 \, {\left (B a^{2} b f + C a^{2} b e + 2 \, A b^{3} e\right )} \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}}}{6 \, b^{4}} \]

Giac 1.7.0 via sagemath 9.3 output

\[ \text {Timed out} \]________________________________________________________________________________________