5.4 Problem number 165

\[ \int \frac {(a+b x)^{10} (A+B x)}{x^{18}} \, dx \]

Optimal antiderivative \[ -\frac {A \left (b x +a \right )^{11}}{17 a \,x^{17}}+\frac {\left (6 A b -17 a B \right ) \left (b x +a \right )^{11}}{272 a^{2} x^{16}}-\frac {b \left (6 A b -17 a B \right ) \left (b x +a \right )^{11}}{816 a^{3} x^{15}}+\frac {b^{2} \left (6 A b -17 a B \right ) \left (b x +a \right )^{11}}{2856 a^{4} x^{14}}-\frac {b^{3} \left (6 A b -17 a B \right ) \left (b x +a \right )^{11}}{12376 a^{5} x^{13}}+\frac {b^{4} \left (6 A b -17 a B \right ) \left (b x +a \right )^{11}}{74256 a^{6} x^{12}}-\frac {b^{5} \left (6 A b -17 a B \right ) \left (b x +a \right )^{11}}{816816 a^{7} x^{11}} \]

command

integrate((b*x+a)**10*(B*x+A)/x**18,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {- 48048 A a^{10} - 136136 B b^{10} x^{11} + x^{10} \left (- 116688 A b^{10} - 1166880 B a b^{9}\right ) + x^{9} \left (- 1021020 A a b^{9} - 4594590 B a^{2} b^{8}\right ) + x^{8} \left (- 4084080 A a^{2} b^{8} - 10890880 B a^{3} b^{7}\right ) + x^{7} \left (- 9801792 A a^{3} b^{7} - 17153136 B a^{4} b^{6}\right ) + x^{6} \left (- 15593760 A a^{4} b^{6} - 18712512 B a^{5} b^{5}\right ) + x^{5} \left (- 17153136 A a^{5} b^{5} - 14294280 B a^{6} b^{4}\right ) + x^{4} \left (- 13194720 A a^{6} b^{4} - 7539840 B a^{7} b^{3}\right ) + x^{3} \left (- 7001280 A a^{7} b^{3} - 2625480 B a^{8} b^{2}\right ) + x^{2} \left (- 2450448 A a^{8} b^{2} - 544544 B a^{9} b\right ) + x \left (- 510510 A a^{9} b - 51051 B a^{10}\right )}{816816 x^{17}} \]