\[ \int x^m (1+x) \left (1+2 x+x^2\right )^5 \, dx \]
Optimal antiderivative \[ \frac {x^{1+m}}{1+m}+\frac {11 x^{2+m}}{2+m}+\frac {55 x^{3+m}}{3+m}+\frac {165 x^{4+m}}{4+m}+\frac {330 x^{5+m}}{5+m}+\frac {462 x^{6+m}}{6+m}+\frac {462 x^{7+m}}{7+m}+\frac {330 x^{8+m}}{8+m}+\frac {165 x^{9+m}}{9+m}+\frac {55 x^{10+m}}{10+m}+\frac {11 x^{11+m}}{11+m}+\frac {x^{12+m}}{12+m} \]
command
integrate(x**m*(1+x)*(x**2+2*x+1)**5,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} \]_____________________________________________________