\[ \int (e x)^m \left (a+b x^n\right )^3 \left (A+B x^n\right ) \left (c+d x^n\right ) \, dx \]
Optimal antiderivative \[ \frac {a^{2} \left (a A d +3 A b c +a B c \right ) x^{1+n} \left (e x \right )^{m}}{1+m +n}+\frac {a \left (3 A b \left (a d +b c \right )+a B \left (a d +3 b c \right )\right ) x^{1+2 n} \left (e x \right )^{m}}{1+m +2 n}+\frac {b \left (3 a B \left (a d +b c \right )+A b \left (3 a d +b c \right )\right ) x^{1+3 n} \left (e x \right )^{m}}{1+m +3 n}+\frac {b^{2} \left (A b d +3 a B d +b B c \right ) x^{1+4 n} \left (e x \right )^{m}}{1+m +4 n}+\frac {b^{3} B d \,x^{1+5 n} \left (e x \right )^{m}}{1+m +5 n}+\frac {a^{3} A c \left (e x \right )^{1+m}}{e \left (1+m \right )} \]
command
integrate((e*x)**m*(a+b*x**n)**3*(A+B*x**n)*(c+d*x**n),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} \]_____________________________________________________