Optimal. Leaf size=22 \[ -\log \left (x^2+1\right )+\log (x)+x \tan ^{-1}(x)-\frac{\tan ^{-1}(x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0341581, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.727, Rules used = {4950, 4852, 266, 36, 29, 31, 4846, 260} \[ -\log \left (x^2+1\right )+\log (x)+x \tan ^{-1}(x)-\frac{\tan ^{-1}(x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4950
Rule 4852
Rule 266
Rule 36
Rule 29
Rule 31
Rule 4846
Rule 260
Rubi steps
\begin{align*} \int \frac{\left (1+x^2\right ) \tan ^{-1}(x)}{x^2} \, dx &=\int \tan ^{-1}(x) \, dx+\int \frac{\tan ^{-1}(x)}{x^2} \, dx\\ &=-\frac{\tan ^{-1}(x)}{x}+x \tan ^{-1}(x)+\int \frac{1}{x \left (1+x^2\right )} \, dx-\int \frac{x}{1+x^2} \, dx\\ &=-\frac{\tan ^{-1}(x)}{x}+x \tan ^{-1}(x)-\frac{1}{2} \log \left (1+x^2\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{x (1+x)} \, dx,x,x^2\right )\\ &=-\frac{\tan ^{-1}(x)}{x}+x \tan ^{-1}(x)-\frac{1}{2} \log \left (1+x^2\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,x^2\right )\\ &=-\frac{\tan ^{-1}(x)}{x}+x \tan ^{-1}(x)+\log (x)-\log \left (1+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0064361, size = 22, normalized size = 1. \[ -\log \left (x^2+1\right )+\log (x)+x \tan ^{-1}(x)-\frac{\tan ^{-1}(x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.008, size = 23, normalized size = 1.1 \begin{align*} -{\frac{\arctan \left ( x \right ) }{x}}+x\arctan \left ( x \right ) +\ln \left ( x \right ) -\ln \left ({x}^{2}+1 \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.41546, size = 28, normalized size = 1.27 \begin{align*}{\left (x - \frac{1}{x}\right )} \arctan \left (x\right ) - \log \left (x^{2} + 1\right ) + \log \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.31242, size = 72, normalized size = 3.27 \begin{align*} \frac{{\left (x^{2} - 1\right )} \arctan \left (x\right ) - x \log \left (x^{2} + 1\right ) + x \log \left (x\right )}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.384592, size = 19, normalized size = 0.86 \begin{align*} x \operatorname{atan}{\left (x \right )} + \log{\left (x \right )} - \log{\left (x^{2} + 1 \right )} - \frac{\operatorname{atan}{\left (x \right )}}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0688, size = 34, normalized size = 1.55 \begin{align*}{\left (x - \frac{1}{x}\right )} \arctan \left (x\right ) - \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left (x^{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]