\[ \int \frac {x^{-1-2 n}}{\left (a+b x^n\right )^2} \, dx \]
Optimal antiderivative \[ -\frac {x^{-2 n}}{2 a^{2} n}+\frac {2 b \,x^{-n}}{a^{3} n}+\frac {b^{2}}{a^{3} n \left (a +b \,x^{n}\right )}+\frac {3 b^{2} \ln \left (x \right )}{a^{4}}-\frac {3 b^{2} \ln \left (a +b \,x^{n}\right )}{a^{4} n} \]
command
integrate(x**(-1-2*n)/(a+b*x**n)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \begin {cases} \tilde {\infty } \log {\left (x \right )} & \text {for}\: a = 0 \wedge b = 0 \wedge n = 0 \\- \frac {x^{- 2 n}}{2 a^{2} n} & \text {for}\: b = 0 \\- \frac {x^{- 4 n}}{4 b^{2} n} & \text {for}\: a = 0 \\\frac {\tilde {\infty } x^{- 2 n}}{n} & \text {for}\: b = - a x^{- n} \\\frac {\log {\left (x \right )}}{\left (a + b\right )^{2}} & \text {for}\: n = 0 \\- \frac {a^{3}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} + \frac {3 a^{2} b x^{n}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} + \frac {6 a b^{2} x^{2 n} \log {\left (x^{n} \right )}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} - \frac {6 a b^{2} x^{2 n} \log {\left (\frac {a}{b} + x^{n} \right )}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} + \frac {6 a b^{2} x^{2 n}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} + \frac {6 b^{3} x^{3 n} \log {\left (x^{n} \right )}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} - \frac {6 b^{3} x^{3 n} \log {\left (\frac {a}{b} + x^{n} \right )}}{2 a^{5} n x^{2 n} + 2 a^{4} b n x^{3 n}} & \text {otherwise} \end {cases} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________