\[ \int (d+e x)^2 \log \left (c \left (a+b x^3\right )^p\right ) \, dx \]
Optimal antiderivative \[ -3 d^{2} p x -\frac {3 d e p \,x^{2}}{2}-\frac {e^{2} p \,x^{3}}{3}+\frac {a^{\frac {1}{3}} d \left (b^{\frac {1}{3}} d -a^{\frac {1}{3}} e \right ) p \ln \left (a^{\frac {1}{3}}+b^{\frac {1}{3}} x \right )}{b^{\frac {2}{3}}}-\frac {a^{\frac {1}{3}} d \left (b^{\frac {1}{3}} d -a^{\frac {1}{3}} e \right ) p \ln \left (a^{\frac {2}{3}}-a^{\frac {1}{3}} b^{\frac {1}{3}} x +b^{\frac {2}{3}} x^{2}\right )}{2 b^{\frac {2}{3}}}-\frac {\left (-a \,e^{3}+b \,d^{3}\right ) p \ln \left (b \,x^{3}+a \right )}{3 b e}+\frac {\left (e x +d \right )^{3} \ln \left (c \left (b \,x^{3}+a \right )^{p}\right )}{3 e}-\frac {a^{\frac {1}{3}} d \left (b^{\frac {1}{3}} d +a^{\frac {1}{3}} e \right ) p \arctan \left (\frac {\left (a^{\frac {1}{3}}-2 b^{\frac {1}{3}} x \right ) \sqrt {3}}{3 a^{\frac {1}{3}}}\right ) \sqrt {3}}{b^{\frac {2}{3}}} \]
command
integrate((e*x+d)**2*ln(c*(b*x**3+a)**p),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ 3 a d^{2} p \operatorname {RootSum} {\left (27 t^{3} a^{2} b - 1, \left ( t \mapsto t \log {\left (3 t a + x \right )} \right )\right )} + 3 a d e p \operatorname {RootSum} {\left (27 t^{3} a b^{2} + 1, \left ( t \mapsto t \log {\left (9 t^{2} a b + x \right )} \right )\right )} + \frac {a e^{2} p \left (\begin {cases} \frac {x^{3}}{a} & \text {for}\: b = 0 \\\frac {\log {\left (a + b x^{3} \right )}}{b} & \text {otherwise} \end {cases}\right )}{3} - 3 d^{2} p x + d^{2} x \log {\left (c \left (a + b x^{3}\right )^{p} \right )} - \frac {3 d e p x^{2}}{2} + d e x^{2} \log {\left (c \left (a + b x^{3}\right )^{p} \right )} - \frac {e^{2} p x^{3}}{3} + \frac {e^{2} x^{3} \log {\left (c \left (a + b x^{3}\right )^{p} \right )}}{3} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________