\[ \int \frac {\left (a^2+2 a b x+b^2 x^2\right )^3}{(d+e x)^7} \, dx \]
Optimal antiderivative \[ -\frac {\left (-a e +b d \right )^{6}}{6 e^{7} \left (e x +d \right )^{6}}+\frac {6 b \left (-a e +b d \right )^{5}}{5 e^{7} \left (e x +d \right )^{5}}-\frac {15 b^{2} \left (-a e +b d \right )^{4}}{4 e^{7} \left (e x +d \right )^{4}}+\frac {20 b^{3} \left (-a e +b d \right )^{3}}{3 e^{7} \left (e x +d \right )^{3}}-\frac {15 b^{4} \left (-a e +b d \right )^{2}}{2 e^{7} \left (e x +d \right )^{2}}+\frac {6 b^{5} \left (-a e +b d \right )}{e^{7} \left (e x +d \right )}+\frac {b^{6} \ln \! \left (e x +d \right )}{e^{7}} \]
command
integrate((b**2*x**2+2*a*b*x+a**2)**3/(e*x+d)**7,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} \log {\left (d + e x \right )}}{e^{7}} + \frac {- 10 a^{6} e^{6} - 12 a^{5} b d e^{5} - 15 a^{4} b^{2} d^{2} e^{4} - 20 a^{3} b^{3} d^{3} e^{3} - 30 a^{2} b^{4} d^{4} e^{2} - 60 a b^{5} d^{5} e + 147 b^{6} d^{6} + x^{5} \left (- 360 a b^{5} e^{6} + 360 b^{6} d e^{5}\right ) + x^{4} \left (- 450 a^{2} b^{4} e^{6} - 900 a b^{5} d e^{5} + 1350 b^{6} d^{2} e^{4}\right ) + x^{3} \left (- 400 a^{3} b^{3} e^{6} - 600 a^{2} b^{4} d e^{5} - 1200 a b^{5} d^{2} e^{4} + 2200 b^{6} d^{3} e^{3}\right ) + x^{2} \left (- 225 a^{4} b^{2} e^{6} - 300 a^{3} b^{3} d e^{5} - 450 a^{2} b^{4} d^{2} e^{4} - 900 a b^{5} d^{3} e^{3} + 1875 b^{6} d^{4} e^{2}\right ) + x \left (- 72 a^{5} b e^{6} - 90 a^{4} b^{2} d e^{5} - 120 a^{3} b^{3} d^{2} e^{4} - 180 a^{2} b^{4} d^{3} e^{3} - 360 a b^{5} d^{4} e^{2} + 822 b^{6} d^{5} e\right )}{60 d^{6} e^{7} + 360 d^{5} e^{8} x + 900 d^{4} e^{9} x^{2} + 1200 d^{3} e^{10} x^{3} + 900 d^{2} e^{11} x^{4} + 360 d e^{12} x^{5} + 60 e^{13} x^{6}} \]