\[ \int \frac {A+B x^2}{x^{3/2} \left (a+b x^2\right )^2} \, dx \]
Optimal antiderivative \[ \frac {\left (5 A b -B a \right ) \arctan \left (1-\frac {b^{\frac {1}{4}} \sqrt {2}\, \sqrt {x}}{a^{\frac {1}{4}}}\right ) \sqrt {2}}{8 a^{\frac {9}{4}} b^{\frac {3}{4}}}-\frac {\left (5 A b -B a \right ) \arctan \left (1+\frac {b^{\frac {1}{4}} \sqrt {2}\, \sqrt {x}}{a^{\frac {1}{4}}}\right ) \sqrt {2}}{8 a^{\frac {9}{4}} b^{\frac {3}{4}}}-\frac {\left (5 A b -B a \right ) \ln \left (\sqrt {a}+x \sqrt {b}-a^{\frac {1}{4}} b^{\frac {1}{4}} \sqrt {2}\, \sqrt {x}\right ) \sqrt {2}}{16 a^{\frac {9}{4}} b^{\frac {3}{4}}}+\frac {\left (5 A b -B a \right ) \ln \left (\sqrt {a}+x \sqrt {b}+a^{\frac {1}{4}} b^{\frac {1}{4}} \sqrt {2}\, \sqrt {x}\right ) \sqrt {2}}{16 a^{\frac {9}{4}} b^{\frac {3}{4}}}+\frac {-5 A b +B a}{2 a^{2} b \sqrt {x}}+\frac {A b -B a}{2 a b \left (b \,x^{2}+a \right ) \sqrt {x}} \]
command
integrate((B*x**2+A)/x**(3/2)/(b*x**2+a)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ A \left (\begin {cases} \frac {\tilde {\infty }}{x^{\frac {9}{2}}} & \text {for}\: a = 0 \wedge b = 0 \\- \frac {2}{9 b^{2} x^{\frac {9}{2}}} & \text {for}\: a = 0 \\- \frac {2}{a^{2} \sqrt {x}} & \text {for}\: b = 0 \\- \frac {5 a \sqrt {x} \log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} + \frac {5 a \sqrt {x} \log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} - \frac {10 a \sqrt {x} \operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} - \frac {16 a \sqrt [4]{- \frac {a}{b}}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} - \frac {5 b x^{\frac {5}{2}} \log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} + \frac {5 b x^{\frac {5}{2}} \log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} - \frac {10 b x^{\frac {5}{2}} \operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} - \frac {20 b x^{2} \sqrt [4]{- \frac {a}{b}}}{8 a^{3} \sqrt {x} \sqrt [4]{- \frac {a}{b}} + 8 a^{2} b x^{\frac {5}{2}} \sqrt [4]{- \frac {a}{b}}} & \text {otherwise} \end {cases}\right ) + \frac {2 B x^{\frac {3}{2}}}{4 a^{2} + 4 a b x^{2}} + 2 B \operatorname {RootSum} {\left (65536 t^{4} a^{5} b^{3} + 1, \left ( t \mapsto t \log {\left (4096 t^{3} a^{4} b^{2} + \sqrt {x} \right )} \right )\right )} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________