18.4 Problem number 1124

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

Optimal antiderivative \[ \frac {d^{2} \left (-A e +B d \right ) \left (-b e +c d \right )^{2}}{5 e^{6} \left (e x +d \right )^{5}}-\frac {d \left (-b e +c d \right ) \left (B d \left (-3 b e +5 c d \right )-2 A e \left (-b e +2 c d \right )\right )}{4 e^{6} \left (e x +d \right )^{4}}+\frac {-A e \left (b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right )+B d \left (3 b^{2} e^{2}-12 b c d e +10 c^{2} d^{2}\right )}{3 e^{6} \left (e x +d \right )^{3}}+\frac {2 A c e \left (-b e +2 c d \right )-B \left (b^{2} e^{2}-8 b c d e +10 c^{2} d^{2}\right )}{2 e^{6} \left (e x +d \right )^{2}}+\frac {c \left (-A c e -2 b B e +5 B c d \right )}{e^{6} \left (e x +d \right )}+\frac {B \,c^{2} \ln \! \left (e x +d \right )}{e^{6}} \]

command

integrate((B*x+A)*(c*x**2+b*x)**2/(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 c^{2} \log {\left (d + e x \right )}}{e^{6}} + \frac {- 2 A b^{2} d^{2} e^{3} - 6 A b c d^{3} e^{2} - 12 A c^{2} d^{4} e - 3 B b^{2} d^{3} e^{2} - 24 B b c d^{4} e + 137 B c^{2} d^{5} + x^{4} \left (- 60 A c^{2} e^{5} - 120 B b c e^{5} + 300 B c^{2} d e^{4}\right ) + x^{3} \left (- 60 A b c e^{5} - 120 A c^{2} d e^{4} - 30 B b^{2} e^{5} - 240 B b c d e^{4} + 900 B c^{2} d^{2} e^{3}\right ) + x^{2} \left (- 20 A b^{2} e^{5} - 60 A b c d e^{4} - 120 A c^{2} d^{2} e^{3} - 30 B b^{2} d e^{4} - 240 B b c d^{2} e^{3} + 1100 B c^{2} d^{3} e^{2}\right ) + x \left (- 10 A b^{2} d e^{4} - 30 A b c d^{2} e^{3} - 60 A c^{2} d^{3} e^{2} - 15 B b^{2} d^{2} e^{3} - 120 B b c d^{3} e^{2} + 625 B c^{2} d^{4} e\right )}{60 d^{5} e^{6} + 300 d^{4} e^{7} x + 600 d^{3} e^{8} x^{2} + 600 d^{2} e^{9} x^{3} + 300 d e^{10} x^{4} + 60 e^{11} x^{5}} \]