18.5 Problem number 1155

\[ \int \frac {(A+B x) (d+e x)^4}{\left (b x+c x^2\right )^3} \, dx \]

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

command

integrate((B*x+A)*(e*x+d)**4/(c*x**2+b*x)**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 {- A b^{3} c^{3} d^{4} + x^{3} \left (- 2 A b^{4} c^{2} e^{4} + 12 A b^{2} c^{4} d^{2} e^{2} - 24 A b c^{5} d^{3} e + 12 A c^{6} d^{4} + 4 B b^{5} c e^{4} - 8 B b^{4} c^{2} d e^{3} + 8 B b^{2} c^{4} d^{3} e - 6 B b c^{5} d^{4}\right ) + x^{2} \left (- A b^{5} c e^{4} - 4 A b^{4} c^{2} d e^{3} + 18 A b^{3} c^{3} d^{2} e^{2} - 36 A b^{2} c^{4} d^{3} e + 18 A b c^{5} d^{4} + 3 B b^{6} e^{4} - 4 B b^{5} c d e^{3} - 6 B b^{4} c^{2} d^{2} e^{2} + 12 B b^{3} c^{3} d^{3} e - 9 B b^{2} c^{4} d^{4}\right ) + x \left (- 8 A b^{3} c^{3} d^{3} e + 4 A b^{2} c^{4} d^{4} - 2 B b^{3} c^{3} d^{4}\right )}{2 b^{6} c^{3} x^{2} + 4 b^{5} c^{4} x^{3} + 2 b^{4} c^{5} x^{4}} + \frac {d^{2} \left (6 A b^{2} e^{2} - 12 A b c d e + 6 A c^{2} d^{2} + 4 B b^{2} d e - 3 B b c d^{2}\right ) \log {\left (x + \frac {- 6 A b^{3} c^{2} d^{2} e^{2} + 12 A b^{2} c^{3} d^{3} e - 6 A b c^{4} d^{4} - 4 B b^{3} c^{2} d^{3} e + 3 B b^{2} c^{3} d^{4} + b c^{2} d^{2} \left (6 A b^{2} e^{2} - 12 A b c d e + 6 A c^{2} d^{2} + 4 B b^{2} d e - 3 B b c d^{2}\right )}{- 12 A b^{2} c^{3} d^{2} e^{2} + 24 A b c^{4} d^{3} e - 12 A c^{5} d^{4} + B b^{5} e^{4} - 8 B b^{2} c^{3} d^{3} e + 6 B b c^{4} d^{4}} \right )}}{b^{5}} + \frac {\left (b e - c d\right )^{2} \left (- 6 A c^{3} d^{2} + B b^{3} e^{2} + 2 B b^{2} c d e + 3 B b c^{2} d^{2}\right ) \log {\left (x + \frac {- 6 A b^{3} c^{2} d^{2} e^{2} + 12 A b^{2} c^{3} d^{3} e - 6 A b c^{4} d^{4} - 4 B b^{3} c^{2} d^{3} e + 3 B b^{2} c^{3} d^{4} + \frac {b \left (b e - c d\right )^{2} \left (- 6 A c^{3} d^{2} + B b^{3} e^{2} + 2 B b^{2} c d e + 3 B b c^{2} d^{2}\right )}{c}}{- 12 A b^{2} c^{3} d^{2} e^{2} + 24 A b c^{4} d^{3} e - 12 A c^{5} d^{4} + B b^{5} e^{4} - 8 B b^{2} c^{3} d^{3} e + 6 B b c^{4} d^{4}} \right )}}{b^{5} c^{3}} \]