9.5 Problem number 25

\[ \int (a+b x)^3 (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx \]

Optimal antiderivative \[ -\frac {\left (-a d +b c \right )^{3} \left (A \,d^{3}-B c \,d^{2}+c^{2} C d -c^{3} D\right ) \left (d x +c \right )^{1+n}}{d^{7} \left (1+n \right )}-\frac {\left (-a d +b c \right )^{2} \left (a d \left (-B \,d^{2}+2 c C d -3 c^{2} D\right )-b \left (3 A \,d^{3}-4 B c \,d^{2}+5 c^{2} C d -6 c^{3} D\right )\right ) \left (d x +c \right )^{2+n}}{d^{7} \left (2+n \right )}-\frac {\left (-a d +b c \right ) \left (a^{2} d^{2} \left (C d -3 c D\right )-a b d \left (-3 B \,d^{2}+8 c C d -15 c^{2} D\right )+b^{2} \left (3 A \,d^{3}-6 B c \,d^{2}+10 c^{2} C d -15 c^{3} D\right )\right ) \left (d x +c \right )^{3+n}}{d^{7} \left (3+n \right )}+\frac {\left (a^{3} d^{3} D+3 a^{2} b \,d^{2} \left (C d -4 c D\right )-3 a \,b^{2} d \left (-B \,d^{2}+4 c C d -10 c^{2} D\right )+b^{3} \left (A \,d^{3}-4 B c \,d^{2}+10 c^{2} C d -20 c^{3} D\right )\right ) \left (d x +c \right )^{4+n}}{d^{7} \left (4+n \right )}+\frac {b \left (3 a^{2} d^{2} D+3 a b d \left (C d -5 c D\right )-b^{2} \left (-B \,d^{2}+5 c C d -15 c^{2} D\right )\right ) \left (d x +c \right )^{5+n}}{d^{7} \left (5+n \right )}+\frac {b^{2} \left (b C d +3 a d D-6 b c D\right ) \left (d x +c \right )^{6+n}}{d^{7} \left (6+n \right )}+\frac {b^{3} D \left (d x +c \right )^{7+n}}{d^{7} \left (7+n \right )} \]

command

integrate((b*x+a)**3*(d*x+c)**n*(D*x**3+C*x**2+B*x+A),x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {output too large to display} \]

Sympy 1.8 under Python 3.8.8 output \[ \text {Timed out} \]_____________________________________________________