27.8 Problem number 623

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

Optimal antiderivative \[ -\frac {\left (e x +d \right ) \left (b +2 c \left (e x +d \right )^{2}\right )}{2 \left (-4 a c +b^{2}\right ) e \left (a +b \left (e x +d \right )^{2}+c \left (e x +d \right )^{4}\right )}+\frac {\arctan \! \left (\frac {\left (e x +d \right ) \sqrt {2}\, \sqrt {c}}{\sqrt {b -\sqrt {-4 a c +b^{2}}}}\right ) \sqrt {c}\, \left (2 b -\sqrt {-4 a c +b^{2}}\right ) \sqrt {2}}{2 \left (-4 a c +b^{2}\right )^{\frac {3}{2}} e \sqrt {b -\sqrt {-4 a c +b^{2}}}}-\frac {\arctan \! \left (\frac {\left (e x +d \right ) \sqrt {2}\, \sqrt {c}}{\sqrt {b +\sqrt {-4 a c +b^{2}}}}\right ) \sqrt {c}\, \left (2 b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {2}}{2 \left (-4 a c +b^{2}\right )^{\frac {3}{2}} e \sqrt {b +\sqrt {-4 a c +b^{2}}}} \]

command

integrate((e*x+d)**2/(a+b*(e*x+d)**2+c*(e*x+d)**4)**2,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 d + 2 c d^{3} + 6 c d e^{2} x^{2} + 2 c e^{3} x^{3} + x \left (b e + 6 c d^{2} e\right )}{8 a^{2} c e - 2 a b^{2} e + 8 a b c d^{2} e + 8 a c^{2} d^{4} e - 2 b^{3} d^{2} e - 2 b^{2} c d^{4} e + x^{4} \left (8 a c^{2} e^{5} - 2 b^{2} c e^{5}\right ) + x^{3} \left (32 a c^{2} d e^{4} - 8 b^{2} c d e^{4}\right ) + x^{2} \left (8 a b c e^{3} + 48 a c^{2} d^{2} e^{3} - 2 b^{3} e^{3} - 12 b^{2} c d^{2} e^{3}\right ) + x \left (16 a b c d e^{2} + 32 a c^{2} d^{3} e^{2} - 4 b^{3} d e^{2} - 8 b^{2} c d^{3} e^{2}\right )} + \operatorname {RootSum} {\left (t^{4} \left (1048576 a^{7} c^{6} e^{4} - 1572864 a^{6} b^{2} c^{5} e^{4} + 983040 a^{5} b^{4} c^{4} e^{4} - 327680 a^{4} b^{6} c^{3} e^{4} + 61440 a^{3} b^{8} c^{2} e^{4} - 6144 a^{2} b^{10} c e^{4} + 256 a b^{12} e^{4}\right ) + t^{2} \left (- 12288 a^{4} b c^{4} e^{2} + 8192 a^{3} b^{3} c^{3} e^{2} - 1536 a^{2} b^{5} c^{2} e^{2} + 16 b^{9} e^{2}\right ) + 16 a^{2} c^{3} + 24 a b^{2} c^{2} + 9 b^{4} c, \left ( t \mapsto t \log {\left (x + \frac {16384 t^{3} a^{5} c^{4} e^{3} - 8192 t^{3} a^{4} b^{2} c^{3} e^{3} + 512 t^{3} a^{2} b^{6} c e^{3} - 64 t^{3} a b^{8} e^{3} - 128 t a^{2} b c^{2} e - 16 t a b^{3} c e - 4 t b^{5} e + 4 a c^{2} d + 3 b^{2} c d}{4 a c^{2} e + 3 b^{2} c e} \right )} \right )\right )} \]