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