\[ \int \frac {x^6}{(a+b x)^2 (c+d x)^3} \, dx \]
Optimal antiderivative \[ -\frac {\left (2 a d +3 b c \right ) x}{b^{3} d^{4}}+\frac {x^{2}}{2 b^{2} d^{3}}-\frac {a^{6}}{b^{4} \left (-a d +b c \right )^{3} \left (b x +a \right )}-\frac {c^{6}}{2 d^{5} \left (-a d +b c \right )^{2} \left (d x +c \right )^{2}}+\frac {2 c^{5} \left (-3 a d +2 b c \right )}{d^{5} \left (-a d +b c \right )^{3} \left (d x +c \right )}-\frac {3 a^{5} \left (-a d +2 b c \right ) \ln \! \left (b x +a \right )}{b^{4} \left (-a d +b c \right )^{4}}+\frac {3 c^{4} \left (5 a^{2} d^{2}-6 a b c d +2 b^{2} c^{2}\right ) \ln \! \left (d x +c \right )}{d^{5} \left (-a d +b c \right )^{4}} \]
command
integrate(x**6/(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 {3 a^{5} \left (a d - 2 b c\right ) \log {\left (x + \frac {\frac {3 a^{10} d^{9} \left (a d - 2 b c\right )}{b \left (a d - b c\right )^{4}} - \frac {15 a^{9} c d^{8} \left (a d - 2 b c\right )}{\left (a d - b c\right )^{4}} + \frac {30 a^{8} b c^{2} d^{7} \left (a d - 2 b c\right )}{\left (a d - b c\right )^{4}} - \frac {30 a^{7} b^{2} c^{3} d^{6} \left (a d - 2 b c\right )}{\left (a d - b c\right )^{4}} + \frac {15 a^{6} b^{3} c^{4} d^{5} \left (a d - 2 b c\right )}{\left (a d - b c\right )^{4}} + 3 a^{6} c d^{5} - \frac {3 a^{5} b^{4} c^{5} d^{4} \left (a d - 2 b c\right )}{\left (a d - b c\right )^{4}} - 6 a^{5} b c^{2} d^{4} - 15 a^{3} b^{3} c^{4} d^{2} + 18 a^{2} b^{4} c^{5} d - 6 a b^{5} c^{6}}{3 a^{6} d^{6} - 6 a^{5} b c d^{5} - 15 a^{2} b^{4} c^{4} d^{2} + 18 a b^{5} c^{5} d - 6 b^{6} c^{6}} \right )}}{b^{4} \left (a d - b c\right )^{4}} + \frac {3 c^{4} \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right ) \log {\left (x + \frac {3 a^{6} c d^{5} + \frac {3 a^{5} b^{3} c^{4} d^{4} \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} - 6 a^{5} b c^{2} d^{4} - \frac {15 a^{4} b^{4} c^{5} d^{3} \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} + \frac {30 a^{3} b^{5} c^{6} d^{2} \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} - 15 a^{3} b^{3} c^{4} d^{2} - \frac {30 a^{2} b^{6} c^{7} d \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} + 18 a^{2} b^{4} c^{5} d + \frac {15 a b^{7} c^{8} \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right )}{\left (a d - b c\right )^{4}} - 6 a b^{5} c^{6} - \frac {3 b^{8} c^{9} \left (5 a^{2} d^{2} - 6 a b c d + 2 b^{2} c^{2}\right )}{d \left (a d - b c\right )^{4}}}{3 a^{6} d^{6} - 6 a^{5} b c d^{5} - 15 a^{2} b^{4} c^{4} d^{2} + 18 a b^{5} c^{5} d - 6 b^{6} c^{6}} \right )}}{d^{5} \left (a d - b c\right )^{4}} + x \left (- \frac {2 a}{b^{3} d^{3}} - \frac {3 c}{b^{2} d^{4}}\right ) + \frac {2 a^{6} c^{2} d^{5} + 11 a^{2} b^{4} c^{6} d - 7 a b^{5} c^{7} + x^{2} \left (2 a^{6} d^{7} + 12 a b^{5} c^{5} d^{2} - 8 b^{6} c^{6} d\right ) + x \left (4 a^{6} c d^{6} + 12 a^{2} b^{4} c^{5} d^{2} + 3 a b^{5} c^{6} d - 7 b^{6} c^{7}\right )}{2 a^{4} b^{4} c^{2} d^{8} - 6 a^{3} b^{5} c^{3} d^{7} + 6 a^{2} b^{6} c^{4} d^{6} - 2 a b^{7} c^{5} d^{5} + x^{3} \left (2 a^{3} b^{5} d^{10} - 6 a^{2} b^{6} c d^{9} + 6 a b^{7} c^{2} d^{8} - 2 b^{8} c^{3} d^{7}\right ) + x^{2} \left (2 a^{4} b^{4} d^{10} - 2 a^{3} b^{5} c d^{9} - 6 a^{2} b^{6} c^{2} d^{8} + 10 a b^{7} c^{3} d^{7} - 4 b^{8} c^{4} d^{6}\right ) + x \left (4 a^{4} b^{4} c d^{9} - 10 a^{3} b^{5} c^{2} d^{8} + 6 a^{2} b^{6} c^{3} d^{7} + 2 a b^{7} c^{4} d^{6} - 2 b^{8} c^{5} d^{5}\right )} + \frac {x^{2}}{2 b^{2} d^{3}} \]