Optimal. Leaf size=17 \[ \frac{1}{x-1}-\frac{1}{(1-x)^2}+\tan ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0145243, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {801, 203} \[ \frac{1}{x-1}-\frac{1}{(1-x)^2}+\tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 801
Rule 203
Rubi steps
\begin{align*} \int \frac{2+2 x}{(-1+x)^3 \left (1+x^2\right )} \, dx &=\int \left (\frac{2}{(-1+x)^3}-\frac{1}{(-1+x)^2}+\frac{1}{1+x^2}\right ) \, dx\\ &=-\frac{1}{(1-x)^2}+\frac{1}{-1+x}+\int \frac{1}{1+x^2} \, dx\\ &=-\frac{1}{(1-x)^2}+\frac{1}{-1+x}+\tan ^{-1}(x)\\ \end{align*}
Mathematica [A] time = 0.0120315, size = 17, normalized size = 1. \[ \frac{x+(x-1)^2 \tan ^{-1}(x)-2}{(x-1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 16, normalized size = 0.9 \begin{align*} \arctan \left ( x \right ) - \left ( x-1 \right ) ^{-2}+ \left ( x-1 \right ) ^{-1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.83292, size = 23, normalized size = 1.35 \begin{align*} \frac{x - 2}{x^{2} - 2 \, x + 1} + \arctan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.935009, size = 72, normalized size = 4.24 \begin{align*} \frac{{\left (x^{2} - 2 \, x + 1\right )} \arctan \left (x\right ) + x - 2}{x^{2} - 2 \, x + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.115232, size = 14, normalized size = 0.82 \begin{align*} \frac{x - 2}{x^{2} - 2 x + 1} + \operatorname{atan}{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18602, size = 16, normalized size = 0.94 \begin{align*} \frac{x - 2}{{\left (x - 1\right )}^{2}} + \arctan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]