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