\[ \int \frac {(a+b \text {ArcTan}(c x))^2}{x^3 (d+e x)} \, dx \]
Optimal antiderivative \[ -\frac {b c \left (a +b \arctan \! \left (c x \right )\right )}{d x}-\frac {c^{2} \left (a +b \arctan \! \left (c x \right )\right )^{2}}{2 d}-\frac {\mathrm {I} b \,e^{2} \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, 1-\frac {2}{1-\mathrm {I} c x}\right )}{d^{3}}-\frac {\left (a +b \arctan \! \left (c x \right )\right )^{2}}{2 d \,x^{2}}+\frac {e \left (a +b \arctan \! \left (c x \right )\right )^{2}}{d^{2} x}-\frac {2 e^{2} \left (a +b \arctan \! \left (c x \right )\right )^{2} \arctanh \! \left (-1+\frac {2}{1+\mathrm {I} c x}\right )}{d^{3}}+\frac {b^{2} c^{2} \ln \! \left (x \right )}{d}+\frac {e^{2} \left (a +b \arctan \! \left (c x \right )\right )^{2} \ln \! \left (\frac {2}{1-\mathrm {I} c x}\right )}{d^{3}}-\frac {e^{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 )}{d^{3}}-\frac {b^{2} c^{2} \ln \! \left (c^{2} x^{2}+1\right )}{2 d}-\frac {2 b c e \left (a +b \arctan \! \left (c x \right )\right ) \ln \! \left (2-\frac {2}{1-\mathrm {I} c x}\right )}{d^{2}}+\frac {\mathrm {I} b \,e^{2} \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, -1+\frac {2}{1+\mathrm {I} c x}\right )}{d^{3}}+\frac {\mathrm {I} b \,e^{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 )}{d^{3}}-\frac {\mathrm {I} b \,e^{2} \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, 1-\frac {2}{1+\mathrm {I} c x}\right )}{d^{3}}+\frac {\mathrm {I} b^{2} c e \polylog \! \left (2, -1+\frac {2}{1-\mathrm {I} c x}\right )}{d^{2}}+\frac {\mathrm {I} c e \left (a +b \arctan \! \left (c x \right )\right )^{2}}{d^{2}}+\frac {b^{2} e^{2} \polylog \! \left (3, 1-\frac {2}{1-\mathrm {I} c x}\right )}{2 d^{3}}-\frac {b^{2} e^{2} \polylog \! \left (3, 1-\frac {2}{1+\mathrm {I} c x}\right )}{2 d^{3}}+\frac {b^{2} e^{2} \polylog \! \left (3, -1+\frac {2}{1+\mathrm {I} c x}\right )}{2 d^{3}}-\frac {b^{2} e^{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 d^{3}} \]
command
Integrate[(a + b*ArcTan[c*x])^2/(x^3*(d + e*x)),x]
Mathematica 13.1 output
\[ \int \frac {(a+b \text {ArcTan}(c x))^2}{x^3 (d+e x)} \, dx \]
Mathematica 12.3 output
\[ \text {output too large to display} \]