\[ \int \frac {x^5 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx \]
Optimal antiderivative \[ -\frac {\left (-A c +b B \right ) x^{2}}{2 c^{2}}+\frac {B \,x^{4}}{4 c}+\frac {\left (-A b c -a B c +b^{2} B \right ) \ln \! \left (c \,x^{4}+b \,x^{2}+a \right )}{4 c^{3}}+\frac {\left (2 a A \,c^{2}-A \,b^{2} c -3 a b B c +b^{3} B \right ) \arctanh \! \left (\frac {2 c \,x^{2}+b}{\sqrt {-4 a c +b^{2}}}\right )}{2 c^{3} \sqrt {-4 a c +b^{2}}} \]
command
integrate(x**5*(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
\[ \frac {B x^{4}}{4 c} + x^{2} \left (\frac {A}{2 c} - \frac {B b}{2 c^{2}}\right ) + \left (- \frac {\sqrt {- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac {A b c + B a c - B b^{2}}{4 c^{3}}\right ) \log {\left (x^{2} + \frac {A a b c + 2 B a^{2} c - B a b^{2} + 8 a c^{3} \left (- \frac {\sqrt {- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac {A b c + B a c - B b^{2}}{4 c^{3}}\right ) - 2 b^{2} c^{2} \left (- \frac {\sqrt {- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac {A b c + B a c - B b^{2}}{4 c^{3}}\right )}{- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}} \right )} + \left (\frac {\sqrt {- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac {A b c + B a c - B b^{2}}{4 c^{3}}\right ) \log {\left (x^{2} + \frac {A a b c + 2 B a^{2} c - B a b^{2} + 8 a c^{3} \left (\frac {\sqrt {- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac {A b c + B a c - B b^{2}}{4 c^{3}}\right ) - 2 b^{2} c^{2} \left (\frac {\sqrt {- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac {A b c + B a c - B b^{2}}{4 c^{3}}\right )}{- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}} \right )} \]