4.5 Problem number 1287

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

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

command

integrate((d*x+c)**7/(b*x+a)**5,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {Timed out} \]

Sympy 1.8 under Python 3.8.8 output

\[ x^{2} \left (- \frac {5 a d^{7}}{2 b^{6}} + \frac {7 c d^{6}}{2 b^{5}}\right ) + x \left (\frac {15 a^{2} d^{7}}{b^{7}} - \frac {35 a c d^{6}}{b^{6}} + \frac {21 c^{2} d^{5}}{b^{5}}\right ) + \frac {- 319 a^{7} d^{7} + 1197 a^{6} b c d^{6} - 1617 a^{5} b^{2} c^{2} d^{5} + 875 a^{4} b^{3} c^{3} d^{4} - 105 a^{3} b^{4} c^{4} d^{3} - 21 a^{2} b^{5} c^{5} d^{2} - 7 a b^{6} c^{6} d - 3 b^{7} c^{7} + x^{3} \left (- 420 a^{4} b^{3} d^{7} + 1680 a^{3} b^{4} c d^{6} - 2520 a^{2} b^{5} c^{2} d^{5} + 1680 a b^{6} c^{3} d^{4} - 420 b^{7} c^{4} d^{3}\right ) + x^{2} \left (- 1134 a^{5} b^{2} d^{7} + 4410 a^{4} b^{3} c d^{6} - 6300 a^{3} b^{4} c^{2} d^{5} + 3780 a^{2} b^{5} c^{3} d^{4} - 630 a b^{6} c^{4} d^{3} - 126 b^{7} c^{5} d^{2}\right ) + x \left (- 1036 a^{6} b d^{7} + 3948 a^{5} b^{2} c d^{6} - 5460 a^{4} b^{3} c^{2} d^{5} + 3080 a^{3} b^{4} c^{3} d^{4} - 420 a^{2} b^{5} c^{4} d^{3} - 84 a b^{6} c^{5} d^{2} - 28 b^{7} c^{6} d\right )}{12 a^{4} b^{8} + 48 a^{3} b^{9} x + 72 a^{2} b^{10} x^{2} + 48 a b^{11} x^{3} + 12 b^{12} x^{4}} + \frac {d^{7} x^{3}}{3 b^{5}} - \frac {35 d^{4} \left (a d - b c\right )^{3} \log {\left (a + b x \right )}}{b^{8}} \]