\[ \int x^{-1+7 n} \left (a+b x^n\right )^8 \, dx \]
Optimal antiderivative \[ \frac {a^{6} \left (a +b \,x^{n}\right )^{9}}{9 b^{7} n}-\frac {3 a^{5} \left (a +b \,x^{n}\right )^{10}}{5 b^{7} n}+\frac {15 a^{4} \left (a +b \,x^{n}\right )^{11}}{11 b^{7} n}-\frac {5 a^{3} \left (a +b \,x^{n}\right )^{12}}{3 b^{7} n}+\frac {15 a^{2} \left (a +b \,x^{n}\right )^{13}}{13 b^{7} n}-\frac {3 a \left (a +b \,x^{n}\right )^{14}}{7 b^{7} n}+\frac {\left (a +b \,x^{n}\right )^{15}}{15 b^{7} n} \]
command
integrate(x**(-1+7*n)*(a+b*x**n)**8,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \begin {cases} \frac {a^{8} x^{7 n}}{7 n} + \frac {a^{7} b x^{8 n}}{n} + \frac {28 a^{6} b^{2} x^{9 n}}{9 n} + \frac {28 a^{5} b^{3} x^{10 n}}{5 n} + \frac {70 a^{4} b^{4} x^{11 n}}{11 n} + \frac {14 a^{3} b^{5} x^{12 n}}{3 n} + \frac {28 a^{2} b^{6} x^{13 n}}{13 n} + \frac {4 a b^{7} x^{14 n}}{7 n} + \frac {b^{8} x^{15 n}}{15 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} \]________________________________________________________________________________________