\[ \int \frac {\left (a+b x^2\right )^{3/2} \left (A+B x^2\right )}{x^7} \, dx \]
Optimal antiderivative \[ \frac {\left (A b -6 B a \right ) \left (b \,x^{2}+a \right )^{\frac {3}{2}}}{24 a \,x^{4}}-\frac {A \left (b \,x^{2}+a \right )^{\frac {5}{2}}}{6 a \,x^{6}}+\frac {b^{2} \left (A b -6 B a \right ) \arctanh \left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {a}}\right )}{16 a^{\frac {3}{2}}}+\frac {b \left (A b -6 B a \right ) \sqrt {b \,x^{2}+a}}{16 a \,x^{2}} \]
command
integrate((b*x**2+a)**(3/2)*(B*x**2+A)/x**7,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ - \frac {A a^{2}}{6 \sqrt {b} x^{7} \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {11 A a \sqrt {b}}{24 x^{5} \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {17 A b^{\frac {3}{2}}}{48 x^{3} \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {A b^{\frac {5}{2}}}{16 a x \sqrt {\frac {a}{b x^{2}} + 1}} + \frac {A b^{3} \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{16 a^{\frac {3}{2}}} - \frac {B a^{2}}{4 \sqrt {b} x^{5} \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {3 B a \sqrt {b}}{8 x^{3} \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {B b^{\frac {3}{2}} \sqrt {\frac {a}{b x^{2}} + 1}}{2 x} - \frac {B b^{\frac {3}{2}}}{8 x \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {3 B b^{2} \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{8 \sqrt {a}} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________