18.1 Problem number 877

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

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

command

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

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ B c^{3} \log {\left (x \right )} + \frac {- 60 A a^{3} + x^{6} \left (- 420 A c^{3} - 1260 B b c^{2}\right ) + x^{5} \left (- 630 A b c^{2} - 630 B a c^{2} - 630 B b^{2} c\right ) + x^{4} \left (- 420 A a c^{2} - 420 A b^{2} c - 840 B a b c - 140 B b^{3}\right ) + x^{3} \left (- 630 A a b c - 105 A b^{3} - 315 B a^{2} c - 315 B a b^{2}\right ) + x^{2} \left (- 252 A a^{2} c - 252 A a b^{2} - 252 B a^{2} b\right ) + x \left (- 210 A a^{2} b - 70 B a^{3}\right )}{420 x^{7}} \]