Optimal. Leaf size=31 \[ \frac{1}{2} \log \left (x^2+x+2\right )+\frac{3 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{7}}\right )}{\sqrt{7}} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0334638, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ \frac{1}{2} \log \left (x^2+x+2\right )+\frac{3 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{7}}\right )}{\sqrt{7}} \]
Antiderivative was successfully verified.
[In] Int[(2 + x)/(2 + x + x^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 2.21122, size = 32, normalized size = 1.03 \[ \frac{\log{\left (x^{2} + x + 2 \right )}}{2} + \frac{3 \sqrt{7} \operatorname{atan}{\left (\sqrt{7} \left (\frac{2 x}{7} + \frac{1}{7}\right ) \right )}}{7} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((2+x)/(x**2+x+2),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0167361, size = 31, normalized size = 1. \[ \frac{1}{2} \log \left (x^2+x+2\right )+\frac{3 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{7}}\right )}{\sqrt{7}} \]
Antiderivative was successfully verified.
[In] Integrate[(2 + x)/(2 + x + x^2),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.005, size = 27, normalized size = 0.9 \[{\frac{\ln \left ({x}^{2}+x+2 \right ) }{2}}+{\frac{3\,\sqrt{7}}{7}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{7}}{7}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((2+x)/(x^2+x+2),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.48483, size = 35, normalized size = 1.13 \[ \frac{3}{7} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x + 1\right )}\right ) + \frac{1}{2} \, \log \left (x^{2} + x + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x + 2)/(x^2 + x + 2),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.254523, size = 41, normalized size = 1.32 \[ \frac{1}{14} \, \sqrt{7}{\left (\sqrt{7} \log \left (x^{2} + x + 2\right ) + 6 \, \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x + 1\right )}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x + 2)/(x^2 + x + 2),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.116841, size = 36, normalized size = 1.16 \[ \frac{\log{\left (x^{2} + x + 2 \right )}}{2} + \frac{3 \sqrt{7} \operatorname{atan}{\left (\frac{2 \sqrt{7} x}{7} + \frac{\sqrt{7}}{7} \right )}}{7} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((2+x)/(x**2+x+2),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.214339, size = 35, normalized size = 1.13 \[ \frac{3}{7} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x + 1\right )}\right ) + \frac{1}{2} \,{\rm ln}\left (x^{2} + x + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x + 2)/(x^2 + x + 2),x, algorithm="giac")
[Out]