17.10 Problem number 1495

\[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^3}{(d+e x)^6} \, dx \]

Optimal antiderivative \[ \frac {b^{6} x}{e^{6}}-\frac {\left (-a e +b d \right )^{6}}{5 e^{7} \left (e x +d \right )^{5}}+\frac {3 b \left (-a e +b d \right )^{5}}{2 e^{7} \left (e x +d \right )^{4}}-\frac {5 b^{2} \left (-a e +b d \right )^{4}}{e^{7} \left (e x +d \right )^{3}}+\frac {10 b^{3} \left (-a e +b d \right )^{3}}{e^{7} \left (e x +d \right )^{2}}-\frac {15 b^{4} \left (-a e +b d \right )^{2}}{e^{7} \left (e x +d \right )}-\frac {6 b^{5} \left (-a e +b d \right ) \ln \! \left (e x +d \right )}{e^{7}} \]

command

integrate((b**2*x**2+2*a*b*x+a**2)**3/(e*x+d)**6,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {b^{6} x}{e^{6}} + \frac {6 b^{5} \left (a e - b d\right ) \log {\left (d + e x \right )}}{e^{7}} + \frac {- 2 a^{6} e^{6} - 3 a^{5} b d e^{5} - 5 a^{4} b^{2} d^{2} e^{4} - 10 a^{3} b^{3} d^{3} e^{3} - 30 a^{2} b^{4} d^{4} e^{2} + 137 a b^{5} d^{5} e - 87 b^{6} d^{6} + x^{4} \left (- 150 a^{2} b^{4} e^{6} + 300 a b^{5} d e^{5} - 150 b^{6} d^{2} e^{4}\right ) + x^{3} \left (- 100 a^{3} b^{3} e^{6} - 300 a^{2} b^{4} d e^{5} + 900 a b^{5} d^{2} e^{4} - 500 b^{6} d^{3} e^{3}\right ) + x^{2} \left (- 50 a^{4} b^{2} e^{6} - 100 a^{3} b^{3} d e^{5} - 300 a^{2} b^{4} d^{2} e^{4} + 1100 a b^{5} d^{3} e^{3} - 650 b^{6} d^{4} e^{2}\right ) + x \left (- 15 a^{5} b e^{6} - 25 a^{4} b^{2} d e^{5} - 50 a^{3} b^{3} d^{2} e^{4} - 150 a^{2} b^{4} d^{3} e^{3} + 625 a b^{5} d^{4} e^{2} - 385 b^{6} d^{5} e\right )}{10 d^{5} e^{7} + 50 d^{4} e^{8} x + 100 d^{3} e^{9} x^{2} + 100 d^{2} e^{10} x^{3} + 50 d e^{11} x^{4} + 10 e^{12} x^{5}} \]