\[ \int \frac {x (a+b \text {ArcTan}(c x))^2}{d+e x} \, dx \]
Optimal antiderivative \[ \frac {\mathrm {I} \left (a +b \arctan \! \left (c x \right )\right )^{2}}{c e}+\frac {x \left (a +b \arctan \! \left (c x \right )\right )^{2}}{e}+\frac {d \left (a +b \arctan \! \left (c x \right )\right )^{2} \ln \! \left (\frac {2}{1-\mathrm {I} c x}\right )}{e^{2}}+\frac {2 b \left (a +b \arctan \! \left (c x \right )\right ) \ln \! \left (\frac {2}{1+\mathrm {I} c x}\right )}{c e}-\frac {d \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^{2}}-\frac {\mathrm {I} b d \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, 1-\frac {2}{1-\mathrm {I} c x}\right )}{e^{2}}+\frac {\mathrm {I} b^{2} \polylog \! \left (2, 1-\frac {2}{1+\mathrm {I} c x}\right )}{c e}+\frac {\mathrm {I} b d \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^{2}}+\frac {b^{2} d \polylog \! \left (3, 1-\frac {2}{1-\mathrm {I} c x}\right )}{2 e^{2}}-\frac {b^{2} d \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^{2}} \]
command
Integrate[(x*(a + b*ArcTan[c*x])^2)/(d + e*x),x]
Mathematica 13.1 output
\[ \int \frac {x (a+b \text {ArcTan}(c x))^2}{d+e x} \, dx \]
Mathematica 12.3 output
\[ -\frac {-4 b^2 \sqrt {\frac {c^2 d^2}{e^2}+1} e e^{i \tan ^{-1}\left (\frac {c d}{e}\right )} \tan ^{-1}(c x)^3+4 i b^2 c d \tan ^{-1}(c x)^3+4 b^2 e \tan ^{-1}(c x)^3-6 a b \sqrt {\frac {c^2 d^2}{e^2}+1} e e^{i \tan ^{-1}\left (\frac {c d}{e}\right )} \tan ^{-1}(c x)^2+6 i a b c d \tan ^{-1}(c x)^2+6 i b^2 e \tan ^{-1}(c x)^2+6 a b e \tan ^{-1}(c x)^2-6 b^2 c e x \tan ^{-1}(c x)^2-6 b^2 c d \log \left (1+e^{2 i \tan ^{-1}(c x)}\right ) \tan ^{-1}(c x)^2+12 b^2 c d \log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right ) \tan ^{-1}(c x)^2-6 b^2 c d \log \left (-e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \cos \left (2 \tan ^{-1}(c x)\right )-i e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \sin \left (2 \tan ^{-1}(c x)\right )+1\right ) \tan ^{-1}(c x)^2-12 a b c e x \tan ^{-1}(c x)-12 i a b c d \tan ^{-1}\left (\frac {c d}{e}\right ) \tan ^{-1}(c x)+6 b^2 c d \pi \log \left (1+e^{-2 i \tan ^{-1}(c x)}\right ) \tan ^{-1}(c x)-12 a b c d \log \left (1+e^{2 i \tan ^{-1}(c x)}\right ) \tan ^{-1}(c x)-12 b^2 e \log \left (1+e^{2 i \tan ^{-1}(c x)}\right ) \tan ^{-1}(c x)+12 a b c d \log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right ) \tan ^{-1}(c x)+12 b^2 c d \tan ^{-1}\left (\frac {c d}{e}\right ) \log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right ) \tan ^{-1}(c x)-6 b^2 c d \pi \log \left (-\frac {2 i}{c x-i}\right ) \tan ^{-1}(c x)+12 b^2 c d \tan ^{-1}\left (\frac {c d}{e}\right ) \log \left (\frac {e^{-i \tan ^{-1}\left (\frac {c d}{e}\right )} \left (c x+e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} (c x-i)+i\right )}{2 \sqrt {c^2 x^2+1}}\right ) \tan ^{-1}(c x)-12 b^2 c d \tan ^{-1}\left (\frac {c d}{e}\right ) \log \left (-e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \cos \left (2 \tan ^{-1}(c x)\right )-i e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \sin \left (2 \tan ^{-1}(c x)\right )+1\right ) \tan ^{-1}(c x)-12 b^2 c d \tan ^{-1}\left (\frac {c d}{e}\right ) \log \left (\sin \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )\right ) \tan ^{-1}(c x)+6 i a b c d \pi \tan ^{-1}(c x)-6 a^2 c e x+6 a b c d \pi \log \left (1+e^{-2 i \tan ^{-1}(c x)}\right )+12 a b c d \tan ^{-1}\left (\frac {c d}{e}\right ) \log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )+6 a^2 c d \log (d+e x)+6 a b e \log \left (c^2 x^2+1\right )+3 a b c d \pi \log \left (c^2 x^2+1\right )-12 a b c d \tan ^{-1}\left (\frac {c d}{e}\right ) \log \left (\sin \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )\right )+6 i b \left (a c d+b c \tan ^{-1}(c x) d+b e\right ) \text {Li}_2\left (-e^{2 i \tan ^{-1}(c x)}\right )-6 i b c d \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )-3 b^2 c d \text {Li}_3\left (-e^{2 i \tan ^{-1}(c x)}\right )+3 b^2 c d \text {Li}_3\left (e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )}{6 c e^2} \]