29.2 Problem number 597

\[ \int (d x)^m \left (a+b x^n+c x^{2 n}\right )^2 \, dx \]

Optimal antiderivative \[ \frac {2 a b \,x^{1+n} \left (d x \right )^{m}}{1+m +n}+\frac {\left (2 a c +b^{2}\right ) x^{1+2 n} \left (d x \right )^{m}}{1+m +2 n}+\frac {2 b c \,x^{1+3 n} \left (d x \right )^{m}}{1+m +3 n}+\frac {c^{2} x^{1+4 n} \left (d x \right )^{m}}{1+m +4 n}+\frac {a^{2} \left (d x \right )^{1+m}}{d \left (1+m \right )} \]

command

integrate((d*x)**m*(a+b*x**n+c*x**(2*n))**2,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} \]_____________________________________________________