\[ \int \frac {A+B x^2}{a+b x^2+c x^4} \, dx \]
Optimal antiderivative \[ \frac {\arctan \! \left (\frac {x \sqrt {2}\, \sqrt {c}}{\sqrt {b -\sqrt {-4 a c +b^{2}}}}\right ) \left (B +\frac {2 A c -b B}{\sqrt {-4 a c +b^{2}}}\right ) \sqrt {2}}{2 \sqrt {c}\, \sqrt {b -\sqrt {-4 a c +b^{2}}}}+\frac {\arctan \! \left (\frac {x \sqrt {2}\, \sqrt {c}}{\sqrt {b +\sqrt {-4 a c +b^{2}}}}\right ) \left (B +\frac {-2 A c +b B}{\sqrt {-4 a c +b^{2}}}\right ) \sqrt {2}}{2 \sqrt {c}\, \sqrt {b +\sqrt {-4 a c +b^{2}}}} \]
command
integrate((B*x**2+A)/(c*x**4+b*x**2+a),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ \operatorname {RootSum} {\left (t^{4} \left (256 a^{3} c^{3} - 128 a^{2} b^{2} c^{2} + 16 a b^{4} c\right ) + t^{2} \left (- 16 A^{2} a b c^{2} + 4 A^{2} b^{3} c + 64 A B a^{2} c^{2} - 16 A B a b^{2} c - 16 B^{2} a^{2} b c + 4 B^{2} a b^{3}\right ) + A^{4} c^{2} - 2 A^{3} B b c + 2 A^{2} B^{2} a c + A^{2} B^{2} b^{2} - 2 A B^{3} a b + B^{4} a^{2}, \left ( t \mapsto t \log {\left (x + \frac {- 32 t^{3} A a^{2} b c^{2} + 8 t^{3} A a b^{3} c + 64 t^{3} B a^{3} c^{2} - 16 t^{3} B a^{2} b^{2} c - 4 t A^{3} a c^{2} + 2 t A^{3} b^{2} c - 6 t A^{2} B a b c + 12 t A B^{2} a^{2} c - 2 t B^{3} a^{2} b}{- A^{4} c^{2} + A^{3} B b c - A B^{3} a b + B^{4} a^{2}} \right )} \right )\right )} \]