\[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^7} \, dx \]
Optimal antiderivative \[ -\frac {\left (a \,e^{2}-b d e +c \,d^{2}\right )^{2}}{6 e^{5} \left (e x +d \right )^{6}}+\frac {2 \left (-b e +2 c d \right ) \left (a \,e^{2}-b d e +c \,d^{2}\right )}{5 e^{5} \left (e x +d \right )^{5}}+\frac {-6 c^{2} d^{2}-b^{2} e^{2}+2 c e \left (-a e +3 b d \right )}{4 e^{5} \left (e x +d \right )^{4}}+\frac {2 c \left (-b e +2 c d \right )}{3 e^{5} \left (e x +d \right )^{3}}-\frac {c^{2}}{2 e^{5} \left (e x +d \right )^{2}} \]
command
integrate((c*x**2+b*x+a)**2/(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 {- 10 a^{2} e^{4} - 4 a b d e^{3} - 2 a c d^{2} e^{2} - b^{2} d^{2} e^{2} - 2 b c d^{3} e - 2 c^{2} d^{4} - 30 c^{2} e^{4} x^{4} + x^{3} \left (- 40 b c e^{4} - 40 c^{2} d e^{3}\right ) + x^{2} \left (- 30 a c e^{4} - 15 b^{2} e^{4} - 30 b c d e^{3} - 30 c^{2} d^{2} e^{2}\right ) + x \left (- 24 a b e^{4} - 12 a c d e^{3} - 6 b^{2} d e^{3} - 12 b c d^{2} e^{2} - 12 c^{2} d^{3} e\right )}{60 d^{6} e^{5} + 360 d^{5} e^{6} x + 900 d^{4} e^{7} x^{2} + 1200 d^{3} e^{8} x^{3} + 900 d^{2} e^{9} x^{4} + 360 d e^{10} x^{5} + 60 e^{11} x^{6}} \]