\[ \int \frac {(A+B x) (d+e x)^5}{\left (a+c x^2\right )^3} \, dx \]
Optimal antiderivative \[ -\frac {e^{2} \left (5 a B e \left (-3 a \,e^{2}+c \,d^{2}\right )+A c d \left (7 a \,e^{2}+3 c \,d^{2}\right )\right ) x}{8 a^{2} c^{3}}-\frac {\left (e x +d \right )^{4} \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 )^{2} \left (2 a e \left (2 A a \,e^{2}+A c \,d^{2}+5 a B d e \right )-\left (5 a B e \left (-a \,e^{2}+c \,d^{2}\right )+A c d \left (5 a \,e^{2}+3 c \,d^{2}\right )\right ) x \right )}{8 a^{2} c^{2} \left (c \,x^{2}+a \right )}+\frac {\left (5 a B e \left (-3 a^{2} e^{4}+6 a c \,d^{2} e^{2}+c^{2} d^{4}\right )+A c d \left (15 a^{2} e^{4}+10 a c \,d^{2} e^{2}+3 c^{2} d^{4}\right )\right ) \arctan \! \left (\frac {x \sqrt {c}}{\sqrt {a}}\right )}{8 a^{\frac {5}{2}} c^{\frac {7}{2}}}+\frac {e^{4} \left (A e +5 B d \right ) \ln \! \left (c \,x^{2}+a \right )}{2 c^{3}} \]
command
integrate((B*x+A)*(e*x+d)**5/(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
\[ \frac {B e^{5} x}{c^{3}} + \left (\frac {e^{4} \left (A e + 5 B d\right )}{2 c^{3}} - \frac {\sqrt {- a^{5} c^{7}} \left (- 15 A a^{2} c d e^{4} - 10 A a c^{2} d^{3} e^{2} - 3 A c^{3} d^{5} + 15 B a^{3} e^{5} - 30 B a^{2} c d^{2} e^{3} - 5 B a c^{2} d^{4} e\right )}{16 a^{5} c^{7}}\right ) \log {\left (x + \frac {8 A a^{3} e^{5} + 40 B a^{3} d e^{4} - 16 a^{3} c^{3} \left (\frac {e^{4} \left (A e + 5 B d\right )}{2 c^{3}} - \frac {\sqrt {- a^{5} c^{7}} \left (- 15 A a^{2} c d e^{4} - 10 A a c^{2} d^{3} e^{2} - 3 A c^{3} d^{5} + 15 B a^{3} e^{5} - 30 B a^{2} c d^{2} e^{3} - 5 B a c^{2} d^{4} e\right )}{16 a^{5} c^{7}}\right )}{- 15 A a^{2} c d e^{4} - 10 A a c^{2} d^{3} e^{2} - 3 A c^{3} d^{5} + 15 B a^{3} e^{5} - 30 B a^{2} c d^{2} e^{3} - 5 B a c^{2} d^{4} e} \right )} + \left (\frac {e^{4} \left (A e + 5 B d\right )}{2 c^{3}} + \frac {\sqrt {- a^{5} c^{7}} \left (- 15 A a^{2} c d e^{4} - 10 A a c^{2} d^{3} e^{2} - 3 A c^{3} d^{5} + 15 B a^{3} e^{5} - 30 B a^{2} c d^{2} e^{3} - 5 B a c^{2} d^{4} e\right )}{16 a^{5} c^{7}}\right ) \log {\left (x + \frac {8 A a^{3} e^{5} + 40 B a^{3} d e^{4} - 16 a^{3} c^{3} \left (\frac {e^{4} \left (A e + 5 B d\right )}{2 c^{3}} + \frac {\sqrt {- a^{5} c^{7}} \left (- 15 A a^{2} c d e^{4} - 10 A a c^{2} d^{3} e^{2} - 3 A c^{3} d^{5} + 15 B a^{3} e^{5} - 30 B a^{2} c d^{2} e^{3} - 5 B a c^{2} d^{4} e\right )}{16 a^{5} c^{7}}\right )}{- 15 A a^{2} c d e^{4} - 10 A a c^{2} d^{3} e^{2} - 3 A c^{3} d^{5} + 15 B a^{3} e^{5} - 30 B a^{2} c d^{2} e^{3} - 5 B a c^{2} d^{4} e} \right )} + \frac {6 A a^{4} e^{5} - 20 A a^{3} c d^{2} e^{3} - 10 A a^{2} c^{2} d^{4} e + 30 B a^{4} d e^{4} - 20 B a^{3} c d^{3} e^{2} - 2 B a^{2} c^{2} d^{5} + x^{3} \left (- 25 A a^{2} c^{2} d e^{4} + 10 A a c^{3} d^{3} e^{2} + 3 A c^{4} d^{5} + 9 B a^{3} c e^{5} - 50 B a^{2} c^{2} d^{2} e^{3} + 5 B a c^{3} d^{4} e\right ) + x^{2} \left (8 A a^{3} c e^{5} - 40 A a^{2} c^{2} d^{2} e^{3} + 40 B a^{3} c d e^{4} - 40 B a^{2} c^{2} d^{3} e^{2}\right ) + x \left (- 15 A a^{3} c d e^{4} - 10 A a^{2} c^{2} d^{3} e^{2} + 5 A a c^{3} d^{5} + 7 B a^{4} e^{5} - 30 B a^{3} c d^{2} e^{3} - 5 B a^{2} c^{2} d^{4} e\right )}{8 a^{4} c^{3} + 16 a^{3} c^{4} x^{2} + 8 a^{2} c^{5} x^{4}} \]