Optimal. Leaf size=37 \[ \frac{1}{6} \log \left (x^2+1\right )-\frac{1}{6} \log \left (x^2+4\right )-\frac{1}{3} \tan ^{-1}\left (\frac{x}{2}\right )+\frac{2}{3} \tan ^{-1}(x) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0796073, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ \frac{1}{6} \log \left (x^2+1\right )-\frac{1}{6} \log \left (x^2+4\right )-\frac{1}{3} \tan ^{-1}\left (\frac{x}{2}\right )+\frac{2}{3} \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In] Int[(2 + x)/((1 + x^2)*(4 + x^2)),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 17.1073, size = 29, normalized size = 0.78 \[ \frac{\log{\left (x^{2} + 1 \right )}}{6} - \frac{\log{\left (x^{2} + 4 \right )}}{6} - \frac{\operatorname{atan}{\left (\frac{x}{2} \right )}}{3} + \frac{2 \operatorname{atan}{\left (x \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((2+x)/(x**2+1)/(x**2+4),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0124736, size = 37, normalized size = 1. \[ \frac{1}{6} \log \left (x^2+1\right )-\frac{1}{6} \log \left (x^2+4\right )-\frac{1}{3} \tan ^{-1}\left (\frac{x}{2}\right )+\frac{2}{3} \tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In] Integrate[(2 + x)/((1 + x^2)*(4 + x^2)),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.005, size = 28, normalized size = 0.8 \[ -{\frac{1}{3}\arctan \left ({\frac{x}{2}} \right ) }+{\frac{2\,\arctan \left ( x \right ) }{3}}+{\frac{\ln \left ({x}^{2}+1 \right ) }{6}}-{\frac{\ln \left ({x}^{2}+4 \right ) }{6}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((2+x)/(x^2+1)/(x^2+4),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.894388, size = 36, normalized size = 0.97 \[ -\frac{1}{3} \, \arctan \left (\frac{1}{2} \, x\right ) + \frac{2}{3} \, \arctan \left (x\right ) - \frac{1}{6} \, \log \left (x^{2} + 4\right ) + \frac{1}{6} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x + 2)/((x^2 + 4)*(x^2 + 1)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.251885, size = 36, normalized size = 0.97 \[ -\frac{1}{3} \, \arctan \left (\frac{1}{2} \, x\right ) + \frac{2}{3} \, \arctan \left (x\right ) - \frac{1}{6} \, \log \left (x^{2} + 4\right ) + \frac{1}{6} \, \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x + 2)/((x^2 + 4)*(x^2 + 1)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.480808, size = 29, normalized size = 0.78 \[ \frac{\log{\left (x^{2} + 1 \right )}}{6} - \frac{\log{\left (x^{2} + 4 \right )}}{6} - \frac{\operatorname{atan}{\left (\frac{x}{2} \right )}}{3} + \frac{2 \operatorname{atan}{\left (x \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((2+x)/(x**2+1)/(x**2+4),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.262499, size = 36, normalized size = 0.97 \[ -\frac{1}{3} \, \arctan \left (\frac{1}{2} \, x\right ) + \frac{2}{3} \, \arctan \left (x\right ) - \frac{1}{6} \,{\rm ln}\left (x^{2} + 4\right ) + \frac{1}{6} \,{\rm ln}\left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x + 2)/((x^2 + 4)*(x^2 + 1)),x, algorithm="giac")
[Out]