24.26 Problem number 622

\[ \int (d+e x)^3 \sqrt {f+g x} \sqrt {a+c x^2} \, dx \]

Optimal antiderivative \[ -\frac {2 \left (2 a \,e^{2} g^{2} \left (-231 d g +74 e f \right )-c \left (-567 d^{3} g^{3}+1107 d^{2} e f \,g^{2}-843 d \,e^{2} f^{2} g +233 e^{3} f^{3}\right )\right ) \left (g x +f \right )^{\frac {3}{2}} \sqrt {c \,x^{2}+a}}{3465 c \,g^{4}}+\frac {2 e \left (18 a \,e^{2} g^{2}-c \left (81 d^{2} g^{2}-96 d e f g +29 e^{2} f^{2}\right )\right ) \left (g x +f \right )^{\frac {5}{2}} \sqrt {c \,x^{2}+a}}{693 c \,g^{4}}+\frac {2 e^{2} \left (-3 d g +e f \right ) \left (g x +f \right )^{\frac {7}{2}} \sqrt {c \,x^{2}+a}}{99 g^{4}}-\frac {2 \left (150 a^{2} e^{4} g^{4}-6 a c \,e^{2} g^{2} \left (165 d^{2} g^{2}-33 d e f g +2 e^{2} f^{2}\right )+c^{2} \left (315 d^{4} g^{4}-798 d^{3} e f \,g^{3}+1098 d^{2} e^{2} f^{2} g^{2}-732 d \,e^{3} f^{3} g +187 e^{4} f^{4}\right )\right ) \sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}{3465 c^{2} e \,g^{4}}+\frac {2 \left (e x +d \right )^{4} \sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}{11 e}+\frac {4 \left (3 a^{2} e^{2} g^{4} \left (231 d g +26 e f \right )-c^{2} f^{2} \left (-231 d^{3} g^{3}+396 d^{2} e f \,g^{2}-264 d \,e^{2} f^{2} g +64 e^{3} f^{3}\right )-9 a c \,g^{2} \left (77 d^{3} g^{3}+88 d^{2} e f \,g^{2}-33 d \,e^{2} f^{2} g +6 e^{3} f^{3}\right )\right ) \EllipticE \left (\frac {\sqrt {1-\frac {x \sqrt {c}}{\sqrt {-a}}}\, \sqrt {2}}{2}, \sqrt {-\frac {2 a g}{-a g +f \sqrt {-a}\, \sqrt {c}}}\right ) \sqrt {-a}\, \sqrt {g x +f}\, \sqrt {1+\frac {c \,x^{2}}{a}}}{3465 c^{\frac {3}{2}} g^{5} \sqrt {c \,x^{2}+a}\, \sqrt {\frac {\left (g x +f \right ) \sqrt {c}}{g \sqrt {-a}+f \sqrt {c}}}}-\frac {4 \left (a \,g^{2}+c \,f^{2}\right ) \left (75 a^{2} e^{3} g^{4}-3 a c e \,g^{2} \left (165 d^{2} g^{2}-33 d e f g +2 e^{2} f^{2}\right )-c^{2} f \left (-231 d^{3} g^{3}+396 d^{2} e f \,g^{2}-264 d \,e^{2} f^{2} g +64 e^{3} f^{3}\right )\right ) \EllipticF \left (\frac {\sqrt {1-\frac {x \sqrt {c}}{\sqrt {-a}}}\, \sqrt {2}}{2}, \sqrt {-\frac {2 a g}{-a g +f \sqrt {-a}\, \sqrt {c}}}\right ) \sqrt {-a}\, \sqrt {1+\frac {c \,x^{2}}{a}}\, \sqrt {\frac {\left (g x +f \right ) \sqrt {c}}{g \sqrt {-a}+f \sqrt {c}}}}{3465 c^{\frac {5}{2}} g^{5} \sqrt {g x +f}\, \sqrt {c \,x^{2}+a}} \]

command

integrate((e*x+d)^3*(g*x+f)^(1/2)*(c*x^2+a)^(1/2),x, algorithm="fricas")

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

\[ \frac {2 \, {\left (2 \, {\left (231 \, c^{3} d^{3} f^{3} g^{3} + 2079 \, a c^{2} d^{3} f g^{5} - {\left (64 \, c^{3} f^{6} + 102 \, a c^{2} f^{4} g^{2} - 51 \, a^{2} c f^{2} g^{4} - 225 \, a^{3} g^{6}\right )} e^{3} + 33 \, {\left (8 \, c^{3} d f^{5} g + 15 \, a c^{2} d f^{3} g^{3} - 33 \, a^{2} c d f g^{5}\right )} e^{2} - 99 \, {\left (4 \, c^{3} d^{2} f^{4} g^{2} + 11 \, a c^{2} d^{2} f^{2} g^{4} + 15 \, a^{2} c d^{2} g^{6}\right )} e\right )} \sqrt {c g} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right ) + 6 \, {\left (231 \, c^{3} d^{3} f^{2} g^{4} - 693 \, a c^{2} d^{3} g^{6} - 2 \, {\left (32 \, c^{3} f^{5} g + 27 \, a c^{2} f^{3} g^{3} - 39 \, a^{2} c f g^{5}\right )} e^{3} + 33 \, {\left (8 \, c^{3} d f^{4} g^{2} + 9 \, a c^{2} d f^{2} g^{4} + 21 \, a^{2} c d g^{6}\right )} e^{2} - 396 \, {\left (c^{3} d^{2} f^{3} g^{3} + 2 \, a c^{2} d^{2} f g^{5}\right )} e\right )} \sqrt {c g} {\rm weierstrassZeta}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right )\right ) + 3 \, {\left (693 \, c^{3} d^{3} g^{6} x + 231 \, c^{3} d^{3} f g^{5} + {\left (315 \, c^{3} g^{6} x^{4} + 35 \, c^{3} f g^{5} x^{3} - 64 \, c^{3} f^{4} g^{2} - 46 \, a c^{2} f^{2} g^{4} - 150 \, a^{2} c g^{6} - 10 \, {\left (4 \, c^{3} f^{2} g^{4} - 9 \, a c^{2} g^{6}\right )} x^{2} + 16 \, {\left (3 \, c^{3} f^{3} g^{3} + 2 \, a c^{2} f g^{5}\right )} x\right )} e^{3} + 33 \, {\left (35 \, c^{3} d g^{6} x^{3} + 5 \, c^{3} d f g^{5} x^{2} + 8 \, c^{3} d f^{3} g^{3} + 8 \, a c^{2} d f g^{5} - 2 \, {\left (3 \, c^{3} d f^{2} g^{4} - 7 \, a c^{2} d g^{6}\right )} x\right )} e^{2} + 99 \, {\left (15 \, c^{3} d^{2} g^{6} x^{2} + 3 \, c^{3} d^{2} f g^{5} x - 4 \, c^{3} d^{2} f^{2} g^{4} + 10 \, a c^{2} d^{2} g^{6}\right )} e\right )} \sqrt {c x^{2} + a} \sqrt {g x + f}\right )}}{10395 \, c^{3} g^{6}} \]

Fricas 1.3.7 via sagemath 9.3 output

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