Optimal. Leaf size=23 \[ \frac{1}{2} \log \left (x^2+1\right )+2 \log (1-x)-3 \tan ^{-1}(x) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0635736, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174 \[ \frac{1}{2} \log \left (x^2+1\right )+2 \log (1-x)-3 \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In] Int[(5 - 4*x + 3*x^2)/((-1 + x)*(1 + x^2)),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 9.04946, size = 19, normalized size = 0.83 \[ 2 \log{\left (- x + 1 \right )} + \frac{\log{\left (x^{2} + 1 \right )}}{2} - 3 \operatorname{atan}{\left (x \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((3*x**2-4*x+5)/(-1+x)/(x**2+1),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0116205, size = 28, normalized size = 1.22 \[ \frac{1}{2} \log \left ((x-1)^2+2 (x-1)+2\right )+2 \log (x-1)-3 \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In] Integrate[(5 - 4*x + 3*x^2)/((-1 + x)*(1 + x^2)),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.007, size = 20, normalized size = 0.9 \[ 2\,\ln \left ( -1+x \right ) +{\frac{\ln \left ({x}^{2}+1 \right ) }{2}}-3\,\arctan \left ( x \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((3*x^2-4*x+5)/(-1+x)/(x^2+1),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.885305, size = 26, normalized size = 1.13 \[ -3 \, \arctan \left (x\right ) + \frac{1}{2} \, \log \left (x^{2} + 1\right ) + 2 \, \log \left (x - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x^2 - 4*x + 5)/((x^2 + 1)*(x - 1)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.254199, size = 26, normalized size = 1.13 \[ -3 \, \arctan \left (x\right ) + \frac{1}{2} \, \log \left (x^{2} + 1\right ) + 2 \, \log \left (x - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x^2 - 4*x + 5)/((x^2 + 1)*(x - 1)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.309548, size = 19, normalized size = 0.83 \[ 2 \log{\left (x - 1 \right )} + \frac{\log{\left (x^{2} + 1 \right )}}{2} - 3 \operatorname{atan}{\left (x \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x**2-4*x+5)/(-1+x)/(x**2+1),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.263705, size = 27, normalized size = 1.17 \[ -3 \, \arctan \left (x\right ) + \frac{1}{2} \,{\rm ln}\left (x^{2} + 1\right ) + 2 \,{\rm ln}\left ({\left | x - 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x^2 - 4*x + 5)/((x^2 + 1)*(x - 1)),x, algorithm="giac")
[Out]