\[ \int \frac {x^{7/2} \left (A+B x^2\right )}{\left (a+b x^2\right )^2} \, dx \]
Optimal antiderivative \[ -\frac {\left (5 A b -9 B a \right ) x^{\frac {5}{2}}}{10 a \,b^{2}}+\frac {\left (A b -B a \right ) x^{\frac {9}{2}}}{2 a b \left (b \,x^{2}+a \right )}+\frac {a^{\frac {1}{4}} \left (5 A b -9 B a \right ) \arctan \left (1-\frac {b^{\frac {1}{4}} \sqrt {2}\, \sqrt {x}}{a^{\frac {1}{4}}}\right ) \sqrt {2}}{8 b^{\frac {13}{4}}}-\frac {a^{\frac {1}{4}} \left (5 A b -9 B a \right ) \arctan \left (1+\frac {b^{\frac {1}{4}} \sqrt {2}\, \sqrt {x}}{a^{\frac {1}{4}}}\right ) \sqrt {2}}{8 b^{\frac {13}{4}}}+\frac {a^{\frac {1}{4}} \left (5 A b -9 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 b^{\frac {13}{4}}}-\frac {a^{\frac {1}{4}} \left (5 A b -9 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 b^{\frac {13}{4}}}+\frac {\left (5 A b -9 B a \right ) \sqrt {x}}{2 b^{3}} \]
command
integrate(x**(7/2)*(B*x**2+A)/(b*x**2+a)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \begin {cases} \tilde {\infty } \left (2 A \sqrt {x} + \frac {2 B x^{\frac {5}{2}}}{5}\right ) & \text {for}\: a = 0 \wedge b = 0 \\\frac {\frac {2 A x^{\frac {9}{2}}}{9} + \frac {2 B x^{\frac {13}{2}}}{13}}{a^{2}} & \text {for}\: b = 0 \\\frac {2 A \sqrt {x} + \frac {2 B x^{\frac {5}{2}}}{5}}{b^{2}} & \text {for}\: a = 0 \\\frac {100 A a b \sqrt {x}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {25 A a b \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {25 A a b \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {50 A a b \sqrt [4]{- \frac {a}{b}} \operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {80 A b^{2} x^{\frac {5}{2}}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {25 A b^{2} x^{2} \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {25 A b^{2} x^{2} \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {50 A b^{2} x^{2} \sqrt [4]{- \frac {a}{b}} \operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {180 B a^{2} \sqrt {x}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {45 B a^{2} \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {45 B a^{2} \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {90 B a^{2} \sqrt [4]{- \frac {a}{b}} \operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {144 B a b x^{\frac {5}{2}}}{40 a b^{3} + 40 b^{4} x^{2}} - \frac {45 B a b x^{2} \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {45 B a b x^{2} \sqrt [4]{- \frac {a}{b}} \log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {90 B a b x^{2} \sqrt [4]{- \frac {a}{b}} \operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{40 a b^{3} + 40 b^{4} x^{2}} + \frac {16 B b^{2} x^{\frac {9}{2}}}{40 a b^{3} + 40 b^{4} x^{2}} & \text {otherwise} \end {cases} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________