14.2 Problem number 167

\[ \int \frac {\left (c+d x^4\right )^4}{\left (a+b x^4\right )^2} \, dx \]

Optimal antiderivative \[ \frac {d^{2} \left (3 a^{2} d^{2}-8 a b c d +6 b^{2} c^{2}\right ) x}{b^{4}}+\frac {2 d^{3} \left (-a d +2 b c \right ) x^{5}}{5 b^{3}}+\frac {d^{4} x^{9}}{9 b^{2}}+\frac {\left (-a d +b c \right )^{4} x}{4 a \,b^{4} \left (b \,x^{4}+a \right )}+\frac {\left (-a d +b c \right )^{3} \left (13 a d +3 b c \right ) \arctan \! \left (-1+\frac {b^{\frac {1}{4}} x \sqrt {2}}{a^{\frac {1}{4}}}\right ) \sqrt {2}}{16 a^{\frac {7}{4}} b^{\frac {17}{4}}}+\frac {\left (-a d +b c \right )^{3} \left (13 a d +3 b c \right ) \arctan \! \left (1+\frac {b^{\frac {1}{4}} x \sqrt {2}}{a^{\frac {1}{4}}}\right ) \sqrt {2}}{16 a^{\frac {7}{4}} b^{\frac {17}{4}}}-\frac {\left (-a d +b c \right )^{3} \left (13 a d +3 b c \right ) \ln \! \left (-a^{\frac {1}{4}} b^{\frac {1}{4}} x \sqrt {2}+\sqrt {a}+x^{2} \sqrt {b}\right ) \sqrt {2}}{32 a^{\frac {7}{4}} b^{\frac {17}{4}}}+\frac {\left (-a d +b c \right )^{3} \left (13 a d +3 b c \right ) \ln \! \left (a^{\frac {1}{4}} b^{\frac {1}{4}} x \sqrt {2}+\sqrt {a}+x^{2} \sqrt {b}\right ) \sqrt {2}}{32 a^{\frac {7}{4}} b^{\frac {17}{4}}} \]

command

integrate((d*x**4+c)**4/(b*x**4+a)**2,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ x^{5} \left (- \frac {2 a d^{4}}{5 b^{3}} + \frac {4 c d^{3}}{5 b^{2}}\right ) + x \left (\frac {3 a^{2} d^{4}}{b^{4}} - \frac {8 a c d^{3}}{b^{3}} + \frac {6 c^{2} d^{2}}{b^{2}}\right ) + \frac {x \left (a^{4} d^{4} - 4 a^{3} b c d^{3} + 6 a^{2} b^{2} c^{2} d^{2} - 4 a b^{3} c^{3} d + b^{4} c^{4}\right )}{4 a^{2} b^{4} + 4 a b^{5} x^{4}} + \operatorname {RootSum} {\left (65536 t^{4} a^{7} b^{17} + 28561 a^{16} d^{16} - 316368 a^{15} b c d^{15} + 1577784 a^{14} b^{2} c^{2} d^{14} - 4651504 a^{13} b^{3} c^{3} d^{13} + 8923164 a^{12} b^{4} c^{4} d^{12} - 11486160 a^{11} b^{5} c^{5} d^{11} + 9723912 a^{10} b^{6} c^{6} d^{10} - 4810608 a^{9} b^{7} c^{7} d^{9} + 617958 a^{8} b^{8} c^{8} d^{8} + 772112 a^{7} b^{9} c^{9} d^{7} - 434808 a^{6} b^{10} c^{10} d^{6} + 20400 a^{5} b^{11} c^{11} d^{5} + 45724 a^{4} b^{12} c^{12} d^{4} - 8304 a^{3} b^{13} c^{13} d^{3} - 2376 a^{2} b^{14} c^{14} d^{2} + 432 a b^{15} c^{15} d + 81 b^{16} c^{16}, \left ( t \mapsto t \log {\left (- \frac {16 t a^{2} b^{4}}{13 a^{4} d^{4} - 36 a^{3} b c d^{3} + 30 a^{2} b^{2} c^{2} d^{2} - 4 a b^{3} c^{3} d - 3 b^{4} c^{4}} + x \right )} \right )\right )} + \frac {d^{4} x^{9}}{9 b^{2}} \]