12.2 Problem number 142

\[ \int \frac {x^2 (a+b \text {ArcTan}(c x))^2}{d+e x} \, dx \]

Optimal antiderivative \[ -\frac {a b x}{c e}-\frac {b^{2} x \arctan \! \left (c x \right )}{c e}-\frac {\mathrm {I} d \left (a +b \arctan \! \left (c x \right )\right )^{2}}{c \,e^{2}}+\frac {\left (a +b \arctan \! \left (c x \right )\right )^{2}}{2 c^{2} e}-\frac {d x \left (a +b \arctan \! \left (c x \right )\right )^{2}}{e^{2}}+\frac {x^{2} \left (a +b \arctan \! \left (c x \right )\right )^{2}}{2 e}-\frac {d^{2} \left (a +b \arctan \! \left (c x \right )\right )^{2} \ln \! \left (\frac {2}{1-\mathrm {I} c x}\right )}{e^{3}}-\frac {2 b d \left (a +b \arctan \! \left (c x \right )\right ) \ln \! \left (\frac {2}{1+\mathrm {I} c x}\right )}{c \,e^{2}}+\frac {d^{2} \left (a +b \arctan \! \left (c x \right )\right )^{2} \ln \! \left (\frac {2 c \left (e x +d \right )}{\left (c d +\mathrm {I} e \right ) \left (1-\mathrm {I} c x \right )}\right )}{e^{3}}+\frac {b^{2} \ln \! \left (c^{2} x^{2}+1\right )}{2 c^{2} e}+\frac {\mathrm {I} b \,d^{2} \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, 1-\frac {2}{1-\mathrm {I} c x}\right )}{e^{3}}-\frac {\mathrm {I} b^{2} d \polylog \! \left (2, 1-\frac {2}{1+\mathrm {I} c x}\right )}{c \,e^{2}}-\frac {\mathrm {I} b \,d^{2} \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, 1-\frac {2 c \left (e x +d \right )}{\left (c d +\mathrm {I} e \right ) \left (1-\mathrm {I} c x \right )}\right )}{e^{3}}-\frac {b^{2} d^{2} \polylog \! \left (3, 1-\frac {2}{1-\mathrm {I} c x}\right )}{2 e^{3}}+\frac {b^{2} d^{2} \polylog \! \left (3, 1-\frac {2 c \left (e x +d \right )}{\left (c d +\mathrm {I} e \right ) \left (1-\mathrm {I} c x \right )}\right )}{2 e^{3}} \]

command

Integrate[(x^2*(a + b*ArcTan[c*x])^2)/(d + e*x),x]

Mathematica 13.1 output

\[ \int \frac {x^2 (a+b \text {ArcTan}(c x))^2}{d+e x} \, dx \]

Mathematica 12.3 output

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