\[ \int \frac {x^3 \left (c+d x+e x^2+f x^3+g x^4+h x^5\right )}{a+b x^3} \, dx \]
Optimal antiderivative \[ \frac {\left (-a f +b c \right ) x}{b^{2}}+\frac {\left (-a g +b d \right ) x^{2}}{2 b^{2}}+\frac {\left (-a h +b e \right ) x^{3}}{3 b^{2}}+\frac {f \,x^{4}}{4 b}+\frac {g \,x^{5}}{5 b}+\frac {h \,x^{6}}{6 b}-\frac {a^{\frac {1}{3}} \left (b^{\frac {1}{3}} \left (-a f +b c \right )-a^{\frac {1}{3}} \left (-a g +b d \right )\right ) \ln \! \left (a^{\frac {1}{3}}+b^{\frac {1}{3}} x \right )}{3 b^{\frac {8}{3}}}+\frac {a^{\frac {1}{3}} \left (b^{\frac {1}{3}} \left (-a f +b c \right )-a^{\frac {1}{3}} \left (-a g +b d \right )\right ) \ln \! \left (a^{\frac {2}{3}}-a^{\frac {1}{3}} b^{\frac {1}{3}} x +b^{\frac {2}{3}} x^{2}\right )}{6 b^{\frac {8}{3}}}-\frac {a \left (-a h +b e \right ) \ln \! \left (b \,x^{3}+a \right )}{3 b^{3}}+\frac {a^{\frac {1}{3}} \left (b^{\frac {4}{3}} c +a^{\frac {1}{3}} b d -a \,b^{\frac {1}{3}} f -a^{\frac {4}{3}} g \right ) \arctan \! \left (\frac {\left (a^{\frac {1}{3}}-2 b^{\frac {1}{3}} x \right ) \sqrt {3}}{3 a^{\frac {1}{3}}}\right ) \sqrt {3}}{3 b^{\frac {8}{3}}} \]
command
integrate(x**3*(h*x**5+g*x**4+f*x**3+e*x**2+d*x+c)/(b*x**3+a),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ x^{3} \left (- \frac {a h}{3 b^{2}} + \frac {e}{3 b}\right ) + x^{2} \left (- \frac {a g}{2 b^{2}} + \frac {d}{2 b}\right ) + x \left (- \frac {a f}{b^{2}} + \frac {c}{b}\right ) + \operatorname {RootSum} {\left (27 t^{3} b^{9} + t^{2} \left (- 27 a^{2} b^{6} h + 27 a b^{7} e\right ) + t \left (9 a^{4} b^{3} h^{2} - 18 a^{3} b^{4} e h + 9 a^{3} b^{4} f g - 9 a^{2} b^{5} c g - 9 a^{2} b^{5} d f + 9 a^{2} b^{5} e^{2} + 9 a b^{6} c d\right ) - a^{6} h^{3} + 3 a^{5} b e h^{2} - 3 a^{5} b f g h + a^{5} b g^{3} + 3 a^{4} b^{2} c g h + 3 a^{4} b^{2} d f h - 3 a^{4} b^{2} d g^{2} - 3 a^{4} b^{2} e^{2} h + 3 a^{4} b^{2} e f g - a^{4} b^{2} f^{3} - 3 a^{3} b^{3} c d h - 3 a^{3} b^{3} c e g + 3 a^{3} b^{3} c f^{2} + 3 a^{3} b^{3} d^{2} g - 3 a^{3} b^{3} d e f + a^{3} b^{3} e^{3} - 3 a^{2} b^{4} c^{2} f + 3 a^{2} b^{4} c d e - a^{2} b^{4} d^{3} + a b^{5} c^{3}, \left ( t \mapsto t \log {\left (x + \frac {9 t^{2} a b^{6} g - 9 t^{2} b^{7} d - 6 t a^{3} b^{3} g h + 6 t a^{2} b^{4} d h + 6 t a^{2} b^{4} e g + 3 t a^{2} b^{4} f^{2} - 6 t a b^{5} c f - 6 t a b^{5} d e + 3 t b^{6} c^{2} + a^{5} g h^{2} - a^{4} b d h^{2} - 2 a^{4} b e g h - a^{4} b f^{2} h + 2 a^{4} b f g^{2} + 2 a^{3} b^{2} c f h - 2 a^{3} b^{2} c g^{2} + 2 a^{3} b^{2} d e h - 4 a^{3} b^{2} d f g + a^{3} b^{2} e^{2} g + a^{3} b^{2} e f^{2} - a^{2} b^{3} c^{2} h + 4 a^{2} b^{3} c d g - 2 a^{2} b^{3} c e f + 2 a^{2} b^{3} d^{2} f - a^{2} b^{3} d e^{2} + a b^{4} c^{2} e - 2 a b^{4} c d^{2}}{a^{4} b g^{3} - 3 a^{3} b^{2} d g^{2} + a^{3} b^{2} f^{3} - 3 a^{2} b^{3} c f^{2} + 3 a^{2} b^{3} d^{2} g + 3 a b^{4} c^{2} f - a b^{4} d^{3} - b^{5} c^{3}} \right )} \right )\right )} + \frac {f x^{4}}{4 b} + \frac {g x^{5}}{5 b} + \frac {h x^{6}}{6 b} \]