3.671 \(\int \frac{x^2 \tan ^{-1}(x)}{1+x^2} \, dx\)

Optimal. Leaf size=23 \[ -\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{2} \tan ^{-1}(x)^2+x \tan ^{-1}(x) \]

[Out]

x*ArcTan[x] - ArcTan[x]^2/2 - Log[1 + x^2]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0772449, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308 \[ -\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{2} \tan ^{-1}(x)^2+x \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[(x^2*ArcTan[x])/(1 + x^2),x]

[Out]

x*ArcTan[x] - ArcTan[x]^2/2 - Log[1 + x^2]/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.42486, size = 19, normalized size = 0.83 \[ x \operatorname{atan}{\left (x \right )} - \frac{\log{\left (x^{2} + 1 \right )}}{2} - \frac{\operatorname{atan}^{2}{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*atan(x)/(x**2+1),x)

[Out]

x*atan(x) - log(x**2 + 1)/2 - atan(x)**2/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.00577889, size = 23, normalized size = 1. \[ -\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{2} \tan ^{-1}(x)^2+x \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Integrate[(x^2*ArcTan[x])/(1 + x^2),x]

[Out]

x*ArcTan[x] - ArcTan[x]^2/2 - Log[1 + x^2]/2

_______________________________________________________________________________________

Maple [A]  time = 0., size = 20, normalized size = 0.9 \[ x\arctan \left ( x \right ) -{\frac{ \left ( \arctan \left ( x \right ) \right ) ^{2}}{2}}-{\frac{\ln \left ({x}^{2}+1 \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*arctan(x)/(x^2+1),x)

[Out]

x*arctan(x)-1/2*arctan(x)^2-1/2*ln(x^2+1)

_______________________________________________________________________________________

Maxima [A]  time = 1.56222, size = 32, normalized size = 1.39 \[{\left (x - \arctan \left (x\right )\right )} \arctan \left (x\right ) + \frac{1}{2} \, \arctan \left (x\right )^{2} - \frac{1}{2} \, \log \left (x^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2*arctan(x)/(x^2 + 1),x, algorithm="maxima")

[Out]

(x - arctan(x))*arctan(x) + 1/2*arctan(x)^2 - 1/2*log(x^2 + 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.215553, size = 26, normalized size = 1.13 \[ x \arctan \left (x\right ) - \frac{1}{2} \, \arctan \left (x\right )^{2} - \frac{1}{2} \, \log \left (x^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2*arctan(x)/(x^2 + 1),x, algorithm="fricas")

[Out]

x*arctan(x) - 1/2*arctan(x)^2 - 1/2*log(x^2 + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.591431, size = 19, normalized size = 0.83 \[ x \operatorname{atan}{\left (x \right )} - \frac{\log{\left (x^{2} + 1 \right )}}{2} - \frac{\operatorname{atan}^{2}{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*atan(x)/(x**2+1),x)

[Out]

x*atan(x) - log(x**2 + 1)/2 - atan(x)**2/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.210767, size = 28, normalized size = 1.22 \[ x \arctan \left (x\right ) - \frac{1}{2} \, \arctan \left (x\right )^{2} - \frac{1}{2} \,{\rm ln}\left (-i \, x^{2} - i\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2*arctan(x)/(x^2 + 1),x, algorithm="giac")

[Out]

x*arctan(x) - 1/2*arctan(x)^2 - 1/2*ln(-I*x^2 - I)