Optimal. Leaf size=31 \[ \frac {2 x}{\sqrt {3}}-\frac {4 \tan ^{-1}\left (\frac {\sin (x)}{2+\sqrt {3}+\cos (x)}\right )}{\sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2736}
\begin {gather*} \frac {2 x}{\sqrt {3}}-\frac {4 \tan ^{-1}\left (\frac {\sin (x)}{\cos (x)+\sqrt {3}+2}\right )}{\sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2736
Rubi steps
\begin {align*} \int \frac {1}{1+\frac {\cos (x)}{2}} \, dx &=\frac {2 x}{\sqrt {3}}-\frac {4 \tan ^{-1}\left (\frac {\sin (x)}{2+\sqrt {3}+\cos (x)}\right )}{\sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 20, normalized size = 0.65 \begin {gather*} \frac {4 \tan ^{-1}\left (\frac {\tan \left (\frac {x}{2}\right )}{\sqrt {3}}\right )}{\sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 1.96, size = 27, normalized size = 0.87 \begin {gather*} \frac {4 \sqrt {3} \left (\text {Pi} \text {Floor}\left [-\frac {1}{2}+\frac {x}{2 \text {Pi}}\right ]+\text {ArcTan}\left [\frac {\sqrt {3} \text {Tan}\left [\frac {x}{2}\right ]}{3}\right ]\right )}{3} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 16, normalized size = 0.52
method | result | size |
default | \(\frac {4 \sqrt {3}\, \arctan \left (\frac {\tan \left (\frac {x}{2}\right ) \sqrt {3}}{3}\right )}{3}\) | \(16\) |
risch | \(\frac {2 i \sqrt {3}\, \ln \left ({\mathrm e}^{i x}+\sqrt {3}+2\right )}{3}-\frac {2 i \sqrt {3}\, \ln \left ({\mathrm e}^{i x}-\sqrt {3}+2\right )}{3}\) | \(38\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.36, size = 19, normalized size = 0.61 \begin {gather*} \frac {4}{3} \, \sqrt {3} \arctan \left (\frac {\sqrt {3} \sin \left (x\right )}{3 \, {\left (\cos \left (x\right ) + 1\right )}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 23, normalized size = 0.74 \begin {gather*} -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {2 \, \sqrt {3} \cos \left (x\right ) + \sqrt {3}}{3 \, \sin \left (x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.13, size = 32, normalized size = 1.03 \begin {gather*} \frac {4 \sqrt {3} \left (\operatorname {atan}{\left (\frac {\sqrt {3} \tan {\left (\frac {x}{2} \right )}}{3} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 49, normalized size = 1.58 \begin {gather*} \frac {4\cdot 2 \left (\arctan \left (\frac {-\sqrt {3} \sin x+\sin x}{\sqrt {3} \cos x+\sqrt {3}-\cos x+1}\right )+\frac {x}{2}\right )}{2 \sqrt {3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.22, size = 32, normalized size = 1.03 \begin {gather*} \frac {4\,\sqrt {3}\,\left (\frac {x}{2}-\mathrm {atan}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\right )}{3}+\frac {4\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________