### 3.19 $$\int \tan ^{-1}(x) \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0038938, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 2, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 1., Rules used = {4846, 260} $x \tan ^{-1}(x)-\frac{1}{2} \log \left (x^2+1\right )$

Antiderivative was successfully veriﬁed.

[In]

Int[ArcTan[x],x]

[Out]

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

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \tan ^{-1}(x) \, dx &=x \tan ^{-1}(x)-\int \frac{x}{1+x^2} \, dx\\ &=x \tan ^{-1}(x)-\frac{1}{2} \log \left (1+x^2\right )\\ \end{align*}

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

Antiderivative was successfully veriﬁed.

[In]

Integrate[ArcTan[x],x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 14, normalized size = 0.9 \begin{align*} x\arctan \left ( x \right ) -{\frac{\ln \left ({x}^{2}+1 \right ) }{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(x),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.936874, size = 18, normalized size = 1.2 \begin{align*} x \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.0195, size = 43, normalized size = 2.87 \begin{align*} x \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.184029, size = 12, normalized size = 0.8 \begin{align*} x \operatorname{atan}{\left (x \right )} - \frac{\log{\left (x^{2} + 1 \right )}}{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan(x),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.04172, size = 18, normalized size = 1.2 \begin{align*} x \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(x),x, algorithm="giac")

[Out]

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