16.19 Problem number 407

\[ \int \frac {c+d x+e x^2+f x^3+g x^4+h x^5}{a+b x^3} \, dx \]

Optimal antiderivative \[ \frac {f x}{b}+\frac {g \,x^{2}}{2 b}+\frac {h \,x^{3}}{3 b}+\frac {\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 a^{\frac {2}{3}} b^{\frac {5}{3}}}-\frac {\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 a^{\frac {2}{3}} b^{\frac {5}{3}}}+\frac {\left (-a h +b e \right ) \ln \! \left (b \,x^{3}+a \right )}{3 b^{2}}-\frac {\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 a^{\frac {2}{3}} b^{\frac {5}{3}}} \]

command

integrate((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

\[ \operatorname {RootSum} {\left (27 t^{3} a^{2} b^{6} + t^{2} \left (27 a^{3} b^{4} h - 27 a^{2} b^{5} e\right ) + t \left (9 a^{4} b^{2} h^{2} - 18 a^{3} b^{3} e h + 9 a^{3} b^{3} f g - 9 a^{2} b^{4} c g - 9 a^{2} b^{4} d f + 9 a^{2} b^{4} e^{2} + 9 a b^{5} c d\right ) + a^{5} h^{3} - 3 a^{4} b e h^{2} + 3 a^{4} b f g h - a^{4} b g^{3} - 3 a^{3} b^{2} c g h - 3 a^{3} b^{2} d f h + 3 a^{3} b^{2} d g^{2} + 3 a^{3} b^{2} e^{2} h - 3 a^{3} b^{2} e f g + a^{3} b^{2} f^{3} + 3 a^{2} b^{3} c d h + 3 a^{2} b^{3} c e g - 3 a^{2} b^{3} c f^{2} - 3 a^{2} b^{3} d^{2} g + 3 a^{2} b^{3} d e f - a^{2} b^{3} e^{3} + 3 a b^{4} c^{2} f - 3 a b^{4} c d e + a b^{4} d^{3} - b^{5} c^{3}, \left ( t \mapsto t \log {\left (x + \frac {9 t^{2} a^{3} b^{4} g - 9 t^{2} a^{2} b^{5} d + 6 t a^{4} b^{2} g h - 6 t a^{3} b^{3} d h - 6 t a^{3} b^{3} e g - 3 t a^{3} b^{3} f^{2} + 6 t a^{2} b^{4} c f + 6 t a^{2} b^{4} d e - 3 t a b^{5} 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}{b} + \frac {g x^{2}}{2 b} + \frac {h x^{3}}{3 b} \]