5.17 Problem number 1047

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

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

command

integrate((b*x+a)**3*(B*x+A)/(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 a^{3} e^{4} - 6 A a^{2} b d e^{3} - 3 A a b^{2} d^{2} e^{2} - A b^{3} d^{3} e - 2 B a^{3} d e^{3} - 3 B a^{2} b d^{2} e^{2} - 3 B a b^{2} d^{3} e - 2 B b^{3} d^{4} - 30 B b^{3} e^{4} x^{4} + x^{3} \left (- 20 A b^{3} e^{4} - 60 B a b^{2} e^{4} - 40 B b^{3} d e^{3}\right ) + x^{2} \left (- 45 A a b^{2} e^{4} - 15 A b^{3} d e^{3} - 45 B a^{2} b e^{4} - 45 B a b^{2} d e^{3} - 30 B b^{3} d^{2} e^{2}\right ) + x \left (- 36 A a^{2} b e^{4} - 18 A a b^{2} d e^{3} - 6 A b^{3} d^{2} e^{2} - 12 B a^{3} e^{4} - 18 B a^{2} b d e^{3} - 18 B a b^{2} d^{2} e^{2} - 12 B b^{3} 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}} \]