10.2 Problem number 2

\[ \int \frac {(a+b x) (A+B x)}{\sqrt {c+d x} \sqrt {e+f x} \sqrt {g+h x}} \, dx \]

Optimal antiderivative \[ \frac {2 b B \sqrt {d x +c}\, \sqrt {f x +e}\, \sqrt {h x +g}}{3 d f h}+\frac {2 \left (3 a B d f h +b \left (3 A d f h -2 B \left (c f h +d e h +d f g \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}}{3 d^{2} f^{\frac {3}{2}} h^{2} \sqrt {f x +e}\, \sqrt {\frac {d \left (h x +g \right )}{-c h +d g}}}-\frac {2 \left (3 a d f h \left (-A h +B g \right )+b \left (3 A d f g h -B \left (c h \left (-e h +f g \right )+d g \left (e h +2 f g \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}}}{3 d^{2} f^{\frac {3}{2}} h^{2} \sqrt {f x +e}\, \sqrt {h x +g}} \]

command

integrate((b*x+a)*(B*x+A)/(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 \, \sqrt {d x + c} \sqrt {f x + e} \sqrt {h x + g} B b d^{2} f^{2} h^{2} + {\left (2 \, B b d^{2} f^{2} g^{2} + 2 \, B b d^{2} h^{2} e^{2} + {\left (B b c d - 3 \, {\left (B a + A b\right )} d^{2}\right )} f^{2} g h + {\left (2 \, B b c^{2} + 9 \, A a d^{2} - 3 \, {\left (B a + A b\right )} c d\right )} f^{2} h^{2} + {\left (B b d^{2} f g h + {\left (B b c d - 3 \, {\left (B a + A b\right )} d^{2}\right )} f h^{2}\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 (2 \, B b d^{2} f^{2} g h + 2 \, B b d^{2} f h^{2} e + {\left (2 \, B b c d - 3 \, {\left (B a + A b\right )} d^{2}\right )} f^{2} h^{2}\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 )}}{9 \, d^{3} f^{3} h^{3}} \]

Fricas 1.3.7 via sagemath 9.3 output

\[ {\rm integral}\left (\frac {{\left (B b x^{2} + A a + {\left (B a + A b\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 ) \]