11.1 Problem number 12

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

Optimal antiderivative \[ -\frac {\left (a +b \arctan \! \left (c x \right )\right )^{2} \ln \! \left (\frac {2}{1-\mathrm {I} c x}\right )}{e}+\frac {\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}+\frac {\mathrm {I} b \left (a +b \arctan \! \left (c x \right )\right ) \polylog \! \left (2, 1-\frac {2}{1-\mathrm {I} c x}\right )}{e}-\frac {\mathrm {I} b \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}-\frac {b^{2} \polylog \! \left (3, 1-\frac {2}{1-\mathrm {I} c x}\right )}{2 e}+\frac {b^{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} \]

command

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

Mathematica 13.1 output

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

Mathematica 12.3 output

\[ \frac {6 a^2 c d \log (d+e x)+12 a b c d \left (\tan ^{-1}(c x) \left (\frac {1}{2} \log \left (c^2 x^2+1\right )+\log \left (\sin \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )\right )\right )+\frac {1}{2} \left (-\log \left (\frac {2}{\sqrt {c^2 x^2+1}}\right ) \left (\pi -2 \tan ^{-1}(c x)\right )-i \text {Li}_2\left (e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )-i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )^2+2 \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right ) \log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )-2 \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right ) \log \left (2 \sin \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )\right )-i \text {Li}_2\left (-e^{-2 i \tan ^{-1}(c x)}\right )-\frac {1}{4} i \left (\pi -2 \tan ^{-1}(c x)\right )^2+\left (\pi -2 \tan ^{-1}(c x)\right ) \log \left (1+e^{-2 i \tan ^{-1}(c x)}\right )\right )\right )+b^2 \left (-2 \tan ^{-1}(c x) \left (\tan ^{-1}(c x)^2 \left (2 e \sqrt {\frac {c^2 d^2}{e^2}+1} e^{i \tan ^{-1}\left (\frac {c d}{e}\right )}-i c d-e\right )+3 c d \left (\pi \left (\log \left (-\frac {2 i}{c x-i}\right )-\log \left (1+e^{-2 i \tan ^{-1}(c x)}\right )\right )-2 \tan ^{-1}\left (\frac {c d}{e}\right ) \left (\log \left (\frac {e^{-i \tan ^{-1}\left (\frac {c d}{e}\right )} \left ((c x-i) e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )}+c x+i\right )}{2 \sqrt {c^2 x^2+1}}\right )+\log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )-\log \left (\sin \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )\right )-\log \left (-i e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \sin \left (2 \tan ^{-1}(c x)\right )-e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \cos \left (2 \tan ^{-1}(c x)\right )+1\right )\right )\right )-3 c d \tan ^{-1}(c x) \left (2 \log \left (1-e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )-\log \left (-i e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \sin \left (2 \tan ^{-1}(c x)\right )-e^{2 i \tan ^{-1}\left (\frac {c d}{e}\right )} \cos \left (2 \tan ^{-1}(c x)\right )+1\right )\right )\right )-6 i c d \tan ^{-1}(c x) \text {Li}_2\left (e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )+3 c d \text {Li}_3\left (e^{2 i \left (\tan ^{-1}\left (\frac {c d}{e}\right )+\tan ^{-1}(c x)\right )}\right )+2 \tan ^{-1}(c x)^2 \left ((e+i c d) \tan ^{-1}(c x)-3 c d \log \left (1+e^{2 i \tan ^{-1}(c x)}\right )\right )+6 i c d \tan ^{-1}(c x) \text {Li}_2\left (-e^{2 i \tan ^{-1}(c x)}\right )-3 c d \text {Li}_3\left (-e^{2 i \tan ^{-1}(c x)}\right )\right )}{6 c d e} \]