5.5 Problem number 166

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

Optimal antiderivative \[ -\frac {a^{10} A}{18 x^{18}}-\frac {a^{9} \left (10 A b +a B \right )}{17 x^{17}}-\frac {5 a^{8} b \left (9 A b +2 a B \right )}{16 x^{16}}-\frac {a^{7} b^{2} \left (8 A b +3 a B \right )}{x^{15}}-\frac {15 a^{6} b^{3} \left (7 A b +4 a B \right )}{7 x^{14}}-\frac {42 a^{5} b^{4} \left (6 A b +5 a B \right )}{13 x^{13}}-\frac {7 a^{4} b^{5} \left (5 A b +6 a B \right )}{2 x^{12}}-\frac {30 a^{3} b^{6} \left (4 A b +7 a B \right )}{11 x^{11}}-\frac {3 a^{2} b^{7} \left (3 A b +8 a B \right )}{2 x^{10}}-\frac {5 a \,b^{8} \left (2 A b +9 a B \right )}{9 x^{9}}-\frac {b^{9} \left (A b +10 a B \right )}{8 x^{8}}-\frac {b^{10} B}{7 x^{7}} \]

command

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

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {- 136136 A a^{10} - 350064 B b^{10} x^{11} + x^{10} \left (- 306306 A b^{10} - 3063060 B a b^{9}\right ) + x^{9} \left (- 2722720 A a b^{9} - 12252240 B a^{2} b^{8}\right ) + x^{8} \left (- 11027016 A a^{2} b^{8} - 29405376 B a^{3} b^{7}\right ) + x^{7} \left (- 26732160 A a^{3} b^{7} - 46781280 B a^{4} b^{6}\right ) + x^{6} \left (- 42882840 A a^{4} b^{6} - 51459408 B a^{5} b^{5}\right ) + x^{5} \left (- 47500992 A a^{5} b^{5} - 39584160 B a^{6} b^{4}\right ) + x^{4} \left (- 36756720 A a^{6} b^{4} - 21003840 B a^{7} b^{3}\right ) + x^{3} \left (- 19603584 A a^{7} b^{3} - 7351344 B a^{8} b^{2}\right ) + x^{2} \left (- 6891885 A a^{8} b^{2} - 1531530 B a^{9} b\right ) + x \left (- 1441440 A a^{9} b - 144144 B a^{10}\right )}{2450448 x^{18}} \]