7.6 Problem number 27

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

Optimal antiderivative \[ -\frac {\left (16 a^{2} C \,f^{2}-b^{2} \left (3 C \,e^{2}-5 f \left (4 A f +3 B e \right )\right )\right ) \left (f x +e \right )^{2} \left (-b^{2} x^{2}+a^{2}\right )}{60 b^{4} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}+\frac {\left (-5 B f +C e \right ) \left (f x +e \right )^{3} \left (-b^{2} x^{2}+a^{2}\right )}{20 b^{2} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}-\frac {C \left (f x +e \right )^{4} \left (-b^{2} x^{2}+a^{2}\right )}{5 b^{2} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}-\frac {\left (64 a^{4} C \,f^{4}+16 a^{2} b^{2} f^{2} \left (13 C \,e^{2}+5 f \left (A f +3 B e \right )\right )-4 b^{4} e^{2} \left (3 C \,e^{2}-5 f \left (16 A f +3 B e \right )\right )+b^{2} f \left (a^{2} f^{2} \left (45 B f +71 C e \right )-2 b^{2} e \left (3 C \,e^{2}-5 f \left (10 A f +3 B e \right )\right )\right ) x \right ) \left (-b^{2} x^{2}+a^{2}\right )}{120 b^{6} f \sqrt {b x +a}\, \sqrt {-b c x +a c}}+\frac {\left (4 A \left (3 a^{2} b^{2} e \,f^{2}+2 b^{4} e^{3}\right )+a^{2} \left (3 a^{2} f^{2} \left (B f +3 C e \right )+4 b^{2} e^{2} \left (3 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)^3*(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 (3 \, {\left (\frac {4 \, {\left (b x + a\right )} C f^{3}}{c} - \frac {16 \, C a c^{4} f^{3} - 5 \, B b c^{4} f^{3} - 15 \, C b c^{4} f^{2} e}{c^{5}}\right )} {\left (b x + a\right )} + \frac {88 \, C a^{2} c^{4} f^{3} - 45 \, B a b c^{4} f^{3} + 20 \, A b^{2} c^{4} f^{3} - 135 \, C a b c^{4} f^{2} e + 60 \, B b^{2} c^{4} f^{2} e + 60 \, C b^{2} c^{4} f e^{2}}{c^{5}}\right )} {\left (b x + a\right )} - \frac {5 \, {\left (32 \, C a^{3} c^{4} f^{3} - 27 \, B a^{2} b c^{4} f^{3} + 16 \, A a b^{2} c^{4} f^{3} - 81 \, C a^{2} b c^{4} f^{2} e + 48 \, B a b^{2} c^{4} f^{2} e - 36 \, A b^{3} c^{4} f^{2} e + 48 \, C a b^{2} c^{4} f e^{2} - 36 \, B b^{3} c^{4} f e^{2} - 12 \, C b^{3} c^{4} e^{3}\right )}}{c^{5}}\right )} {\left (b x + a\right )} + \frac {15 \, {\left (8 \, C a^{4} c^{4} f^{3} - 5 \, B a^{3} b c^{4} f^{3} + 8 \, A a^{2} b^{2} c^{4} f^{3} - 15 \, C a^{3} b c^{4} f^{2} e + 24 \, B a^{2} b^{2} c^{4} f^{2} e - 12 \, A a b^{3} c^{4} f^{2} e + 24 \, C a^{2} b^{2} c^{4} f e^{2} - 12 \, B a b^{3} c^{4} f e^{2} + 24 \, A b^{4} c^{4} f e^{2} - 4 \, C a b^{3} c^{4} e^{3} + 8 \, B b^{4} c^{4} e^{3}\right )}}{c^{5}}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} + \frac {30 \, {\left (3 \, B a^{4} b f^{3} + 9 \, C a^{4} b f^{2} e + 12 \, A a^{2} b^{3} f^{2} e + 12 \, B a^{2} b^{3} f e^{2} + 4 \, C a^{2} b^{3} e^{3} + 8 \, A b^{5} e^{3}\right )} \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}}}{120 \, b^{6}} \]

Giac 1.7.0 via sagemath 9.3 output

\[ \text {Timed out} \]________________________________________________________________________________________