10.4 Problem number 16

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

Optimal antiderivative \[ \frac {2 b^{2} \left (5 b B d f h +2 C \left (a d f h -2 b \left (c f h +d e h +d f g \right )\right )\right ) \sqrt {d x +c}\, \sqrt {f x +e}\, \sqrt {h x +g}}{15 d^{2} f^{2} h^{2}}+\frac {2 b^{2} C \left (b x +a \right ) \sqrt {d x +c}\, \sqrt {f x +e}\, \sqrt {h x +g}}{5 d f h}-\frac {2 b \left (15 a^{2} C \,d^{2} f^{2} h^{2}-10 a b d f h \left (3 B d f h -C \left (c f h +d e h +d f g \right )\right )+b^{2} \left (10 B d f h \left (c f h +d e h +d f g \right )-C \left (8 c^{2} f^{2} h^{2}+7 c d f h \left (e h +f g \right )+d^{2} \left (8 e^{2} h^{2}+7 e f g h +8 f^{2} g^{2}\right )\right )\right )\right ) \EllipticE \left (\frac {\sqrt {f}\, \sqrt {d x +c}}{\sqrt {c f -d e}}, \sqrt {\frac {\left (-c f +d e \right ) h}{f \left (-c h +d g \right )}}\right ) \sqrt {c f -d e}\, \sqrt {\frac {d \left (f x +e \right )}{-c f +d e}}\, \sqrt {h x +g}}{15 d^{3} f^{\frac {5}{2}} h^{3} \sqrt {f x +e}\, \sqrt {\frac {d \left (h x +g \right )}{-c h +d g}}}-\frac {2 \left (15 a^{3} C \,d^{2} f^{2} h^{3}-15 a^{2} b \,d^{2} f^{2} h^{2} \left (B h +C g \right )+5 a \,b^{2} d f h \left (6 B d f g h -C \left (c h \left (-e h +f g \right )+d g \left (e h +2 f g \right )\right )\right )-b^{3} \left (5 B d f h \left (c h \left (-e h +f g \right )+d g \left (e h +2 f g \right )\right )-C \left (4 c^{2} f \,h^{2} \left (-e h +f g \right )+c d h \left (-4 e^{2} h^{2}+e f g h +3 f^{2} g^{2}\right )+d^{2} g \left (4 e^{2} h^{2}+3 e f g h +8 f^{2} g^{2}\right )\right )\right )\right ) \EllipticF \left (\frac {\sqrt {f}\, \sqrt {d x +c}}{\sqrt {c f -d e}}, \sqrt {\frac {\left (-c f +d e \right ) h}{f \left (-c h +d g \right )}}\right ) \sqrt {c f -d e}\, \sqrt {\frac {d \left (f x +e \right )}{-c f +d e}}\, \sqrt {\frac {d \left (h x +g \right )}{-c h +d g}}}{15 d^{3} f^{\frac {5}{2}} h^{3} \sqrt {f x +e}\, \sqrt {h x +g}} \]

command

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

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

\[ \frac {2 \, {\left (3 \, {\left (3 \, C b^{3} d^{3} f^{3} h^{3} x - 4 \, C b^{3} d^{3} f^{3} g h^{2} - 4 \, C b^{3} d^{3} f^{2} h^{3} e - {\left (4 \, C b^{3} c d^{2} - 5 \, {\left (C a b^{2} + B b^{3}\right )} d^{3}\right )} f^{3} h^{3}\right )} \sqrt {d x + c} \sqrt {f x + e} \sqrt {h x + g} - {\left (8 \, C b^{3} d^{3} f^{3} g^{3} + 8 \, C b^{3} d^{3} h^{3} e^{3} + {\left (3 \, C b^{3} c d^{2} - 10 \, {\left (C a b^{2} + B b^{3}\right )} d^{3}\right )} f^{3} g^{2} h + {\left (3 \, C b^{3} c^{2} d - 5 \, {\left (C a b^{2} + B b^{3}\right )} c d^{2} - 15 \, {\left (C a^{2} b - 2 \, B a b^{2}\right )} d^{3}\right )} f^{3} g h^{2} + {\left (8 \, C b^{3} c^{3} - 10 \, {\left (C a b^{2} + B b^{3}\right )} c^{2} d - 15 \, {\left (C a^{2} b - 2 \, B a b^{2}\right )} c d^{2} + 45 \, {\left (C a^{3} - B a^{2} b\right )} d^{3}\right )} f^{3} h^{3} + {\left (3 \, C b^{3} d^{3} f g h^{2} + {\left (3 \, C b^{3} c d^{2} - 10 \, {\left (C a b^{2} + B b^{3}\right )} d^{3}\right )} f h^{3}\right )} e^{2} + {\left (3 \, C b^{3} d^{3} f^{2} g^{2} h + {\left (3 \, C b^{3} c d^{2} - 5 \, {\left (C a b^{2} + B b^{3}\right )} d^{3}\right )} f^{2} g h^{2} + {\left (3 \, C b^{3} c^{2} d - 5 \, {\left (C a b^{2} + B b^{3}\right )} c d^{2} - 15 \, {\left (C a^{2} b - 2 \, B a b^{2}\right )} d^{3}\right )} f^{2} h^{3}\right )} e\right )} \sqrt {d f h} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (d^{2} f^{2} g^{2} - c d f^{2} g h + c^{2} f^{2} h^{2} + d^{2} h^{2} e^{2} - {\left (d^{2} f g h + c d f h^{2}\right )} e\right )}}{3 \, d^{2} f^{2} h^{2}}, -\frac {4 \, {\left (2 \, d^{3} f^{3} g^{3} - 3 \, c d^{2} f^{3} g^{2} h - 3 \, c^{2} d f^{3} g h^{2} + 2 \, c^{3} f^{3} h^{3} + 2 \, d^{3} h^{3} e^{3} - 3 \, {\left (d^{3} f g h^{2} + c d^{2} f h^{3}\right )} e^{2} - 3 \, {\left (d^{3} f^{2} g^{2} h - 4 \, c d^{2} f^{2} g h^{2} + c^{2} d f^{2} h^{3}\right )} e\right )}}{27 \, d^{3} f^{3} h^{3}}, \frac {3 \, d f h x + d f g + c f h + d h e}{3 \, d f h}\right ) - 3 \, {\left (8 \, C b^{3} d^{3} f^{3} g^{2} h + 8 \, C b^{3} d^{3} f h^{3} e^{2} + {\left (7 \, C b^{3} c d^{2} - 10 \, {\left (C a b^{2} + B b^{3}\right )} d^{3}\right )} f^{3} g h^{2} + {\left (8 \, C b^{3} c^{2} d - 10 \, {\left (C a b^{2} + B b^{3}\right )} c d^{2} - 15 \, {\left (C a^{2} b - 2 \, B a b^{2}\right )} d^{3}\right )} f^{3} h^{3} + {\left (7 \, C b^{3} d^{3} f^{2} g h^{2} + {\left (7 \, C b^{3} c d^{2} - 10 \, {\left (C a b^{2} + B b^{3}\right )} d^{3}\right )} f^{2} h^{3}\right )} e\right )} \sqrt {d f h} {\rm weierstrassZeta}\left (\frac {4 \, {\left (d^{2} f^{2} g^{2} - c d f^{2} g h + c^{2} f^{2} h^{2} + d^{2} h^{2} e^{2} - {\left (d^{2} f g h + c d f h^{2}\right )} e\right )}}{3 \, d^{2} f^{2} h^{2}}, -\frac {4 \, {\left (2 \, d^{3} f^{3} g^{3} - 3 \, c d^{2} f^{3} g^{2} h - 3 \, c^{2} d f^{3} g h^{2} + 2 \, c^{3} f^{3} h^{3} + 2 \, d^{3} h^{3} e^{3} - 3 \, {\left (d^{3} f g h^{2} + c d^{2} f h^{3}\right )} e^{2} - 3 \, {\left (d^{3} f^{2} g^{2} h - 4 \, c d^{2} f^{2} g h^{2} + c^{2} d f^{2} h^{3}\right )} e\right )}}{27 \, d^{3} f^{3} h^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (d^{2} f^{2} g^{2} - c d f^{2} g h + c^{2} f^{2} h^{2} + d^{2} h^{2} e^{2} - {\left (d^{2} f g h + c d f h^{2}\right )} e\right )}}{3 \, d^{2} f^{2} h^{2}}, -\frac {4 \, {\left (2 \, d^{3} f^{3} g^{3} - 3 \, c d^{2} f^{3} g^{2} h - 3 \, c^{2} d f^{3} g h^{2} + 2 \, c^{3} f^{3} h^{3} + 2 \, d^{3} h^{3} e^{3} - 3 \, {\left (d^{3} f g h^{2} + c d^{2} f h^{3}\right )} e^{2} - 3 \, {\left (d^{3} f^{2} g^{2} h - 4 \, c d^{2} f^{2} g h^{2} + c^{2} d f^{2} h^{3}\right )} e\right )}}{27 \, d^{3} f^{3} h^{3}}, \frac {3 \, d f h x + d f g + c f h + d h e}{3 \, d f h}\right )\right )\right )}}{45 \, d^{4} f^{4} h^{4}} \]

Fricas 1.3.7 via sagemath 9.3 output

\[ {\rm integral}\left (\frac {{\left (C b^{3} x^{3} - C a^{3} + B a^{2} b + {\left (C a b^{2} + B b^{3}\right )} x^{2} - {\left (C a^{2} b - 2 \, B a b^{2}\right )} x\right )} \sqrt {d x + c} \sqrt {f x + e} \sqrt {h x + g}}{d f h x^{3} + c e g + {\left (d f g + {\left (d e + c f\right )} h\right )} x^{2} + {\left (c e h + {\left (d e + c f\right )} g\right )} x}, x\right ) \]