18.2 Problem number 878

\[ \int \frac {(A+B x) \left (a+b x+c x^2\right )^3}{x^9} \, dx \]

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

command

integrate((B*x+A)*(c*x**2+b*x+a)**3/x**9,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {- 35 A a^{3} - 280 B c^{3} x^{7} + x^{6} \left (- 140 A c^{3} - 420 B b c^{2}\right ) + x^{5} \left (- 280 A b c^{2} - 280 B a c^{2} - 280 B b^{2} c\right ) + x^{4} \left (- 210 A a c^{2} - 210 A b^{2} c - 420 B a b c - 70 B b^{3}\right ) + x^{3} \left (- 336 A a b c - 56 A b^{3} - 168 B a^{2} c - 168 B a b^{2}\right ) + x^{2} \left (- 140 A a^{2} c - 140 A a b^{2} - 140 B a^{2} b\right ) + x \left (- 120 A a^{2} b - 40 B a^{3}\right )}{280 x^{8}} \]