18.11 Problem number 1513

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

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

command

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

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ \frac {2 c^{3} x}{e^{5}} + \frac {5 c^{2} \left (b e - 2 c d\right ) \log {\left (d + e x \right )}}{e^{6}} + \frac {- 3 a^{2} b e^{5} - 2 a^{2} c d e^{4} - 2 a b^{2} d e^{4} - 6 a b c d^{2} e^{3} - 12 a c^{2} d^{3} e^{2} - b^{3} d^{2} e^{3} - 12 b^{2} c d^{3} e^{2} + 125 b c^{2} d^{4} e - 154 c^{3} d^{5} + x^{3} \left (- 48 a c^{2} e^{5} - 48 b^{2} c e^{5} + 240 b c^{2} d e^{4} - 240 c^{3} d^{2} e^{3}\right ) + x^{2} \left (- 36 a b c e^{5} - 72 a c^{2} d e^{4} - 6 b^{3} e^{5} - 72 b^{2} c d e^{4} + 540 b c^{2} d^{2} e^{3} - 600 c^{3} d^{3} e^{2}\right ) + x \left (- 8 a^{2} c e^{5} - 8 a b^{2} e^{5} - 24 a b c d e^{4} - 48 a c^{2} d^{2} e^{3} - 4 b^{3} d e^{4} - 48 b^{2} c d^{2} e^{3} + 440 b c^{2} d^{3} e^{2} - 520 c^{3} d^{4} e\right )}{12 d^{4} e^{6} + 48 d^{3} e^{7} x + 72 d^{2} e^{8} x^{2} + 48 d e^{9} x^{3} + 12 e^{10} x^{4}} \]