\[ \int x^{-1-12 n} \left (a+b x^n\right )^8 \, dx \]
Optimal antiderivative \[ -\frac {\left (a +b \,x^{n}\right )^{9} x^{-12 n}}{12 a n}+\frac {b \left (a +b \,x^{n}\right )^{9} x^{-11 n}}{44 a^{2} n}-\frac {b^{2} \left (a +b \,x^{n}\right )^{9} x^{-10 n}}{220 a^{3} n}+\frac {b^{3} \left (a +b \,x^{n}\right )^{9} x^{-9 n}}{1980 a^{4} n} \]
command
integrate(x**(-1-12*n)*(a+b*x**n)**8,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \begin {cases} - \frac {a^{8} x^{- 12 n}}{12 n} - \frac {8 a^{7} b x^{- 11 n}}{11 n} - \frac {14 a^{6} b^{2} x^{- 10 n}}{5 n} - \frac {56 a^{5} b^{3} x^{- 9 n}}{9 n} - \frac {35 a^{4} b^{4} x^{- 8 n}}{4 n} - \frac {8 a^{3} b^{5} x^{- 7 n}}{n} - \frac {14 a^{2} b^{6} x^{- 6 n}}{3 n} - \frac {8 a b^{7} x^{- 5 n}}{5 n} - \frac {b^{8} x^{- 4 n}}{4 n} & \text {for}\: n \neq 0 \\\left (a + b\right )^{8} \log {\left (x \right )} & \text {otherwise} \end {cases} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________