7.7 Problem number 28

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

Optimal antiderivative \[ \frac {\left (-4 B f +C e \right ) \left (f x +e \right )^{2} \left (-b^{2} x^{2}+a^{2}\right )}{12 b^{2} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}-\frac {C \left (f x +e \right )^{3} \left (-b^{2} x^{2}+a^{2}\right )}{4 b^{2} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}-\frac {\left (16 a^{2} f^{2} \left (B f +2 C e \right )-4 b^{2} e \left (C \,e^{2}-4 f \left (3 A f +B e \right )\right )+f \left (9 a^{2} C \,f^{2}-b^{2} \left (2 C \,e^{2}-4 f \left (3 A f +2 B e \right )\right )\right ) x \right ) \left (-b^{2} x^{2}+a^{2}\right )}{24 b^{4} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}+\frac {\left (4 A \left (a^{2} b^{2} f^{2}+2 b^{4} e^{2}\right )+a^{2} \left (3 a^{2} C \,f^{2}+4 b^{2} e \left (2 B f +C e \right )\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}}{8 b^{5} \sqrt {c}\, \sqrt {b x +a}\, \sqrt {-b c x +a c}} \]

command

integrate((f*x+e)^2*(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 (2 \, {\left (\frac {3 \, {\left (b x + a\right )} C f^{2}}{c} - \frac {9 \, C a c^{3} f^{2} - 4 \, B b c^{3} f^{2} - 8 \, C b c^{3} f e}{c^{4}}\right )} {\left (b x + a\right )} + \frac {27 \, C a^{2} c^{3} f^{2} - 16 \, B a b c^{3} f^{2} + 12 \, A b^{2} c^{3} f^{2} - 32 \, C a b c^{3} f e + 24 \, B b^{2} c^{3} f e + 12 \, C b^{2} c^{3} e^{2}}{c^{4}}\right )} {\left (b x + a\right )} - \frac {3 \, {\left (5 \, C a^{3} c^{3} f^{2} - 8 \, B a^{2} b c^{3} f^{2} + 4 \, A a b^{2} c^{3} f^{2} - 16 \, C a^{2} b c^{3} f e + 8 \, B a b^{2} c^{3} f e - 16 \, A b^{3} c^{3} f e + 4 \, C a b^{2} c^{3} e^{2} - 8 \, B b^{3} c^{3} e^{2}\right )}}{c^{4}}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} + \frac {6 \, {\left (3 \, C a^{4} f^{2} + 4 \, A a^{2} b^{2} f^{2} + 8 \, B a^{2} b^{2} f e + 4 \, C a^{2} b^{2} e^{2} + 8 \, A b^{4} e^{2}\right )} \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}}}{24 \, b^{5}} \]

Giac 1.7.0 via sagemath 9.3 output

\[ \text {Timed out} \]________________________________________________________________________________________