\[ \int \frac {(A+B x) (d+e x)^4}{\left (a+c x^2\right )^3} \, dx \]
Optimal antiderivative \[ -\frac {\left (e x +d \right )^{3} \left (a \left (A e +B d \right )-\left (A c d -B a e \right ) x \right )}{4 a c \left (c \,x^{2}+a \right )^{2}}-\frac {\left (e x +d \right ) \left (a e \left (8 a B d e +3 A \left (a \,e^{2}+c \,d^{2}\right )\right )+\left (4 a^{2} B \,e^{3}-c d \left (3 A c \,d^{2}+a e \left (3 A e +4 B d \right )\right )\right ) x \right )}{8 a^{2} c^{2} \left (c \,x^{2}+a \right )}+\frac {\left (3 A \left (a \,e^{2}+c \,d^{2}\right )^{2}+4 a B d e \left (3 a \,e^{2}+c \,d^{2}\right )\right ) \arctan \! \left (\frac {x \sqrt {c}}{\sqrt {a}}\right )}{8 a^{\frac {5}{2}} c^{\frac {5}{2}}}+\frac {B \,e^{4} \ln \! \left (c \,x^{2}+a \right )}{2 c^{3}} \]
command
integrate((B*x+A)*(e*x+d)**4/(c*x**2+a)**3,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ \left (\frac {B e^{4}}{2 c^{3}} - \frac {\sqrt {- a^{5} c^{7}} \left (3 A a^{2} e^{4} + 6 A a c d^{2} e^{2} + 3 A c^{2} d^{4} + 12 B a^{2} d e^{3} + 4 B a c d^{3} e\right )}{16 a^{5} c^{6}}\right ) \log {\left (x + \frac {- 8 B a^{3} e^{4} + 16 a^{3} c^{3} \left (\frac {B e^{4}}{2 c^{3}} - \frac {\sqrt {- a^{5} c^{7}} \left (3 A a^{2} e^{4} + 6 A a c d^{2} e^{2} + 3 A c^{2} d^{4} + 12 B a^{2} d e^{3} + 4 B a c d^{3} e\right )}{16 a^{5} c^{6}}\right )}{3 A a^{2} c e^{4} + 6 A a c^{2} d^{2} e^{2} + 3 A c^{3} d^{4} + 12 B a^{2} c d e^{3} + 4 B a c^{2} d^{3} e} \right )} + \left (\frac {B e^{4}}{2 c^{3}} + \frac {\sqrt {- a^{5} c^{7}} \left (3 A a^{2} e^{4} + 6 A a c d^{2} e^{2} + 3 A c^{2} d^{4} + 12 B a^{2} d e^{3} + 4 B a c d^{3} e\right )}{16 a^{5} c^{6}}\right ) \log {\left (x + \frac {- 8 B a^{3} e^{4} + 16 a^{3} c^{3} \left (\frac {B e^{4}}{2 c^{3}} + \frac {\sqrt {- a^{5} c^{7}} \left (3 A a^{2} e^{4} + 6 A a c d^{2} e^{2} + 3 A c^{2} d^{4} + 12 B a^{2} d e^{3} + 4 B a c d^{3} e\right )}{16 a^{5} c^{6}}\right )}{3 A a^{2} c e^{4} + 6 A a c^{2} d^{2} e^{2} + 3 A c^{3} d^{4} + 12 B a^{2} c d e^{3} + 4 B a c^{2} d^{3} e} \right )} + \frac {- 8 A a^{3} c d e^{3} - 8 A a^{2} c^{2} d^{3} e + 6 B a^{4} e^{4} - 12 B a^{3} c d^{2} e^{2} - 2 B a^{2} c^{2} d^{4} + x^{3} \left (- 5 A a^{2} c^{2} e^{4} + 6 A a c^{3} d^{2} e^{2} + 3 A c^{4} d^{4} - 20 B a^{2} c^{2} d e^{3} + 4 B a c^{3} d^{3} e\right ) + x^{2} \left (- 16 A a^{2} c^{2} d e^{3} + 8 B a^{3} c e^{4} - 24 B a^{2} c^{2} d^{2} e^{2}\right ) + x \left (- 3 A a^{3} c e^{4} - 6 A a^{2} c^{2} d^{2} e^{2} + 5 A a c^{3} d^{4} - 12 B a^{3} c d e^{3} - 4 B a^{2} c^{2} d^{3} e\right )}{8 a^{4} c^{3} + 16 a^{3} c^{4} x^{2} + 8 a^{2} c^{5} x^{4}} \]