9.1 Problem number 33

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

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

command

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

Fricas 1.3.8 (sbcl 2.2.11.debian) via sagemath 9.6 output

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

Fricas 1.3.7 via sagemath 9.3 output

\[ \text {Timed out} \]