Optimal. Leaf size=29 \[ \frac{3}{2} \log \left (x^2+1\right )-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.190829, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133 \[ \frac{3}{2} \log \left (x^2+1\right )-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]
Antiderivative was successfully verified.
[In] Int[(-4 + 6*x - x^2 + 3*x^3)/((1 + x^2)*(2 + x^2)),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 17.2487, size = 29, normalized size = 1. \[ \frac{3 \log{\left (x^{2} + 1 \right )}}{2} - 3 \operatorname{atan}{\left (x \right )} + \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((3*x**3-x**2+6*x-4)/(x**2+1)/(x**2+2),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0241885, size = 29, normalized size = 1. \[ \frac{3}{2} \log \left (x^2+1\right )-3 \tan ^{-1}(x)+\sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]
Antiderivative was successfully verified.
[In] Integrate[(-4 + 6*x - x^2 + 3*x^3)/((1 + x^2)*(2 + x^2)),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.007, size = 25, normalized size = 0.9 \[ -3\,\arctan \left ( x \right ) +{\frac{3\,\ln \left ({x}^{2}+1 \right ) }{2}}+\arctan \left ({\frac{x\sqrt{2}}{2}} \right ) \sqrt{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((3*x^3-x^2+6*x-4)/(x^2+1)/(x^2+2),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.47778, size = 32, normalized size = 1.1 \[ \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - 3 \, \arctan \left (x\right ) + \frac{3}{2} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x^3 - x^2 + 6*x - 4)/((x^2 + 2)*(x^2 + 1)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.204457, size = 32, normalized size = 1.1 \[ \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - 3 \, \arctan \left (x\right ) + \frac{3}{2} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x^3 - x^2 + 6*x - 4)/((x^2 + 2)*(x^2 + 1)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.262575, size = 29, normalized size = 1. \[ \frac{3 \log{\left (x^{2} + 1 \right )}}{2} - 3 \operatorname{atan}{\left (x \right )} + \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x**3-x**2+6*x-4)/(x**2+1)/(x**2+2),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.213332, size = 32, normalized size = 1.1 \[ \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) - 3 \, \arctan \left (x\right ) + \frac{3}{2} \,{\rm ln}\left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((3*x^3 - x^2 + 6*x - 4)/((x^2 + 2)*(x^2 + 1)),x, algorithm="giac")
[Out]