Optimal. Leaf size=56 \[ \frac{\log \left (\sin \left (\frac{x}{2}\right )+\sqrt{3} \cos \left (\frac{x}{2}\right )\right )}{\sqrt{3}}-\frac{\log \left (\sqrt{3} \cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )}{\sqrt{3}} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0375471, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25 \[ \frac{\log \left (\sin \left (\frac{x}{2}\right )+\sqrt{3} \cos \left (\frac{x}{2}\right )\right )}{\sqrt{3}}-\frac{\log \left (\sqrt{3} \cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In] Int[(1 + 2*Cos[x])^(-1),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 0.579725, size = 20, normalized size = 0.36 \[ \frac{2 \sqrt{3} \operatorname{atanh}{\left (\frac{\sqrt{3} \tan{\left (\frac{x}{2} \right )}}{3} \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(1/(1+2*cos(x)),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0129929, size = 20, normalized size = 0.36 \[ \frac{2 \tanh ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right )}{\sqrt{3}}\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In] Integrate[(1 + 2*Cos[x])^(-1),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.013, size = 16, normalized size = 0.3 \[{\frac{2\,\sqrt{3}}{3}{\it Artanh} \left ({\frac{\sqrt{3}}{3}\tan \left ({\frac{x}{2}} \right ) } \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(1/(1+2*cos(x)),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.48372, size = 50, normalized size = 0.89 \[ -\frac{1}{3} \, \sqrt{3} \log \left (-\frac{\sqrt{3} - \frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}}{\sqrt{3} + \frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(2*cos(x) + 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.22219, size = 70, normalized size = 1.25 \[ \frac{1}{6} \, \sqrt{3} \log \left (-\frac{2 \, \sqrt{3} \cos \left (x\right )^{2} - 6 \,{\left (\cos \left (x\right ) + 2\right )} \sin \left (x\right ) - 4 \, \sqrt{3} \cos \left (x\right ) - 7 \, \sqrt{3}}{4 \, \cos \left (x\right )^{2} + 4 \, \cos \left (x\right ) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(2*cos(x) + 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.536907, size = 36, normalized size = 0.64 \[ - \frac{\sqrt{3} \log{\left (\tan{\left (\frac{x}{2} \right )} - \sqrt{3} \right )}}{3} + \frac{\sqrt{3} \log{\left (\tan{\left (\frac{x}{2} \right )} + \sqrt{3} \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(1+2*cos(x)),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.248927, size = 47, normalized size = 0.84 \[ -\frac{1}{3} \, \sqrt{3}{\rm ln}\left (\frac{{\left | -2 \, \sqrt{3} + 2 \, \tan \left (\frac{1}{2} \, x\right ) \right |}}{{\left | 2 \, \sqrt{3} + 2 \, \tan \left (\frac{1}{2} \, x\right ) \right |}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(2*cos(x) + 1),x, algorithm="giac")
[Out]