18.13 Problem number 1524

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

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

command

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

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {e^{4} x^{4}}{2} + x^{3} \left (- \frac {b e^{4}}{3 c} + \frac {8 d e^{3}}{3}\right ) + x^{2} \left (- \frac {a e^{4}}{c} + \frac {b^{2} e^{4}}{2 c^{2}} - \frac {2 b d e^{3}}{c} + 6 d^{2} e^{2}\right ) + x \left (\frac {3 a b e^{4}}{c^{2}} - \frac {8 a d e^{3}}{c} - \frac {b^{3} e^{4}}{c^{3}} + \frac {4 b^{2} d e^{3}}{c^{2}} - \frac {6 b d^{2} e^{2}}{c} + 8 d^{3} e\right ) + \left (- \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{4}} + \frac {2 a^{2} c^{2} e^{4} - 4 a b^{2} c e^{4} + 12 a b c^{2} d e^{3} - 12 a c^{3} d^{2} e^{2} + b^{4} e^{4} - 4 b^{3} c d e^{3} + 6 b^{2} c^{2} d^{2} e^{2} - 4 b c^{3} d^{3} e + 2 c^{4} d^{4}}{2 c^{4}}\right ) \log {\left (x + \frac {a^{2} c e^{4} - a b^{2} e^{4} + 4 a b c d e^{3} - 6 a c^{2} d^{2} e^{2} + c^{3} d^{4} - c^{3} \left (- \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{4}} + \frac {2 a^{2} c^{2} e^{4} - 4 a b^{2} c e^{4} + 12 a b c^{2} d e^{3} - 12 a c^{3} d^{2} e^{2} + b^{4} e^{4} - 4 b^{3} c d e^{3} + 6 b^{2} c^{2} d^{2} e^{2} - 4 b c^{3} d^{3} e + 2 c^{4} d^{4}}{2 c^{4}}\right )}{2 a b c e^{4} - 4 a c^{2} d e^{3} - b^{3} e^{4} + 4 b^{2} c d e^{3} - 6 b c^{2} d^{2} e^{2} + 4 c^{3} d^{3} e} \right )} + \left (\frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{4}} + \frac {2 a^{2} c^{2} e^{4} - 4 a b^{2} c e^{4} + 12 a b c^{2} d e^{3} - 12 a c^{3} d^{2} e^{2} + b^{4} e^{4} - 4 b^{3} c d e^{3} + 6 b^{2} c^{2} d^{2} e^{2} - 4 b c^{3} d^{3} e + 2 c^{4} d^{4}}{2 c^{4}}\right ) \log {\left (x + \frac {a^{2} c e^{4} - a b^{2} e^{4} + 4 a b c d e^{3} - 6 a c^{2} d^{2} e^{2} + c^{3} d^{4} - c^{3} \left (\frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{4}} + \frac {2 a^{2} c^{2} e^{4} - 4 a b^{2} c e^{4} + 12 a b c^{2} d e^{3} - 12 a c^{3} d^{2} e^{2} + b^{4} e^{4} - 4 b^{3} c d e^{3} + 6 b^{2} c^{2} d^{2} e^{2} - 4 b c^{3} d^{3} e + 2 c^{4} d^{4}}{2 c^{4}}\right )}{2 a b c e^{4} - 4 a c^{2} d e^{3} - b^{3} e^{4} + 4 b^{2} c d e^{3} - 6 b c^{2} d^{2} e^{2} + 4 c^{3} d^{3} e} \right )} \]