\[ \int \frac {(A+B x) \left (a+c x^2\right )^3}{(d+e x)^5} \, dx \]
Optimal antiderivative \[ -\frac {c^{2} \left (5 A c d e -3 B \left (a \,e^{2}+5 c \,d^{2}\right )\right ) x}{e^{7}}-\frac {c^{3} \left (-A e +5 B d \right ) x^{2}}{2 e^{6}}+\frac {B \,c^{3} x^{3}}{3 e^{5}}+\frac {\left (-A e +B d \right ) \left (a \,e^{2}+c \,d^{2}\right )^{3}}{4 e^{8} \left (e x +d \right )^{4}}-\frac {\left (a \,e^{2}+c \,d^{2}\right )^{2} \left (-6 A c d e +a B \,e^{2}+7 B c \,d^{2}\right )}{3 e^{8} \left (e x +d \right )^{3}}+\frac {3 c \left (a \,e^{2}+c \,d^{2}\right ) \left (-a A \,e^{3}-5 A c \,d^{2} e +3 a B d \,e^{2}+7 B c \,d^{3}\right )}{2 e^{8} \left (e x +d \right )^{2}}+\frac {c \left (4 A c d e \left (3 a \,e^{2}+5 c \,d^{2}\right )-B \left (3 a^{2} e^{4}+30 a c \,d^{2} e^{2}+35 c^{2} d^{4}\right )\right )}{e^{8} \left (e x +d \right )}-\frac {c^{2} \left (-3 a A \,e^{3}-15 A c \,d^{2} e +15 a B d \,e^{2}+35 B c \,d^{3}\right ) \ln \! \left (e x +d \right )}{e^{8}} \]
command
integrate((B*x+A)*(c*x**2+a)**3/(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 {B c^{3} x^{3}}{3 e^{5}} - \frac {c^{2} \left (- 3 A a e^{3} - 15 A c d^{2} e + 15 B a d e^{2} + 35 B c d^{3}\right ) \log {\left (d + e x \right )}}{e^{8}} + x^{2} \left (\frac {A c^{3}}{2 e^{5}} - \frac {5 B c^{3} d}{2 e^{6}}\right ) + x \left (- \frac {5 A c^{3} d}{e^{6}} + \frac {3 B a c^{2}}{e^{5}} + \frac {15 B c^{3} d^{2}}{e^{7}}\right ) + \frac {- 3 A a^{3} e^{7} - 3 A a^{2} c d^{2} e^{5} + 75 A a c^{2} d^{4} e^{3} + 171 A c^{3} d^{6} e - B a^{3} d e^{6} - 9 B a^{2} c d^{3} e^{4} - 231 B a c^{2} d^{5} e^{2} - 319 B c^{3} d^{7} + x^{3} \left (144 A a c^{2} d e^{6} + 240 A c^{3} d^{3} e^{4} - 36 B a^{2} c e^{7} - 360 B a c^{2} d^{2} e^{5} - 420 B c^{3} d^{4} e^{3}\right ) + x^{2} \left (- 18 A a^{2} c e^{7} + 324 A a c^{2} d^{2} e^{5} + 630 A c^{3} d^{4} e^{3} - 54 B a^{2} c d e^{6} - 900 B a c^{2} d^{3} e^{4} - 1134 B c^{3} d^{5} e^{2}\right ) + x \left (- 12 A a^{2} c d e^{6} + 264 A a c^{2} d^{3} e^{4} + 564 A c^{3} d^{5} e^{2} - 4 B a^{3} e^{7} - 36 B a^{2} c d^{2} e^{5} - 780 B a c^{2} d^{4} e^{3} - 1036 B c^{3} d^{6} e\right )}{12 d^{4} e^{8} + 48 d^{3} e^{9} x + 72 d^{2} e^{10} x^{2} + 48 d e^{11} x^{3} + 12 e^{12} x^{4}} \]