5.15 Problem number 1034

\[ \int \frac {(a+b x)^2 (A+B x)}{(d+e x)^8} \, dx \]

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

command

integrate((b*x+a)**2*(B*x+A)/(e*x+d)**8,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {- 60 A a^{2} e^{3} - 20 A a b d e^{2} - 4 A b^{2} d^{2} e - 10 B a^{2} d e^{2} - 8 B a b d^{2} e - 3 B b^{2} d^{3} - 105 B b^{2} e^{3} x^{3} + x^{2} \left (- 84 A b^{2} e^{3} - 168 B a b e^{3} - 63 B b^{2} d e^{2}\right ) + x \left (- 140 A a b e^{3} - 28 A b^{2} d e^{2} - 70 B a^{2} e^{3} - 56 B a b d e^{2} - 21 B b^{2} d^{2} e\right )}{420 d^{7} e^{4} + 2940 d^{6} e^{5} x + 8820 d^{5} e^{6} x^{2} + 14700 d^{4} e^{7} x^{3} + 14700 d^{3} e^{8} x^{4} + 8820 d^{2} e^{9} x^{5} + 2940 d e^{10} x^{6} + 420 e^{11} x^{7}} \]