5.7 Problem number 292

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

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

command

integrate(x**5/(b*x+a)**2/(d*x+c)**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^{4} \left (2 a d - 5 b c\right ) \log {\left (x + \frac {\frac {a^{9} d^{8} \left (2 a d - 5 b c\right )}{b \left (a d - b c\right )^{4}} - \frac {5 a^{8} c d^{7} \left (2 a d - 5 b c\right )}{\left (a d - b c\right )^{4}} + \frac {10 a^{7} b c^{2} d^{6} \left (2 a d - 5 b c\right )}{\left (a d - b c\right )^{4}} - \frac {10 a^{6} b^{2} c^{3} d^{5} \left (2 a d - 5 b c\right )}{\left (a d - b c\right )^{4}} + \frac {5 a^{5} b^{3} c^{4} d^{4} \left (2 a d - 5 b c\right )}{\left (a d - b c\right )^{4}} + 2 a^{5} c d^{4} - \frac {a^{4} b^{4} c^{5} d^{3} \left (2 a d - 5 b c\right )}{\left (a d - b c\right )^{4}} - 5 a^{4} b c^{2} d^{3} - 10 a^{3} b^{2} c^{3} d^{2} + 10 a^{2} b^{3} c^{4} d - 3 a b^{4} c^{5}}{2 a^{5} d^{5} - 5 a^{4} b c d^{4} - 10 a^{2} b^{3} c^{3} d^{2} + 10 a b^{4} c^{4} d - 3 b^{5} c^{5}} \right )}}{b^{3} \left (a d - b c\right )^{4}} - \frac {c^{3} \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right ) \log {\left (x + \frac {\frac {a^{5} b^{2} c^{3} d^{4} \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} + 2 a^{5} c d^{4} - \frac {5 a^{4} b^{3} c^{4} d^{3} \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} - 5 a^{4} b c^{2} d^{3} + \frac {10 a^{3} b^{4} c^{5} d^{2} \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} - 10 a^{3} b^{2} c^{3} d^{2} - \frac {10 a^{2} b^{5} c^{6} d \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} + 10 a^{2} b^{3} c^{4} d + \frac {5 a b^{6} c^{7} \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} - 3 a b^{4} c^{5} - \frac {b^{7} c^{8} \left (10 a^{2} d^{2} - 10 a b c d + 3 b^{2} c^{2}\right )}{d \left (a d - b c\right )^{4}}}{2 a^{5} d^{5} - 5 a^{4} b c d^{4} - 10 a^{2} b^{3} c^{3} d^{2} + 10 a b^{4} c^{4} d - 3 b^{5} c^{5}} \right )}}{d^{4} \left (a d - b c\right )^{4}} + \frac {- 2 a^{5} c^{2} d^{4} - 9 a^{2} b^{3} c^{5} d + 5 a b^{4} c^{6} + x^{2} \left (- 2 a^{5} d^{6} - 10 a b^{4} c^{4} d^{2} + 6 b^{5} c^{5} d\right ) + x \left (- 4 a^{5} c d^{5} - 10 a^{2} b^{3} c^{4} d^{2} - 3 a b^{4} c^{5} d + 5 b^{5} c^{6}\right )}{2 a^{4} b^{3} c^{2} d^{7} - 6 a^{3} b^{4} c^{3} d^{6} + 6 a^{2} b^{5} c^{4} d^{5} - 2 a b^{6} c^{5} d^{4} + x^{3} \left (2 a^{3} b^{4} d^{9} - 6 a^{2} b^{5} c d^{8} + 6 a b^{6} c^{2} d^{7} - 2 b^{7} c^{3} d^{6}\right ) + x^{2} \left (2 a^{4} b^{3} d^{9} - 2 a^{3} b^{4} c d^{8} - 6 a^{2} b^{5} c^{2} d^{7} + 10 a b^{6} c^{3} d^{6} - 4 b^{7} c^{4} d^{5}\right ) + x \left (4 a^{4} b^{3} c d^{8} - 10 a^{3} b^{4} c^{2} d^{7} + 6 a^{2} b^{5} c^{3} d^{6} + 2 a b^{6} c^{4} d^{5} - 2 b^{7} c^{5} d^{4}\right )} + \frac {x}{b^{2} d^{3}} \]