Optimal. Leaf size=14 \[ x+2 \tan ^{-1}\left (\frac {\cos (x)}{2+\sin (x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {12, 2736}
\begin {gather*} x+2 \tan ^{-1}\left (\frac {\cos (x)}{\sin (x)+2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2736
Rubi steps
\begin {align*} \int \frac {3}{5+4 \sin (x)} \, dx &=3 \int \frac {1}{5+4 \sin (x)} \, dx\\ &=x+2 \tan ^{-1}\left (\frac {\cos (x)}{2+\sin (x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(79\) vs. \(2(14)=28\).
time = 0.01, size = 79, normalized size = 5.64 \begin {gather*} 3 \left (-\frac {1}{3} \tan ^{-1}\left (\frac {2 \cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )+2 \sin \left (\frac {x}{2}\right )}\right )+\frac {1}{3} \tan ^{-1}\left (\frac {\cos \left (\frac {x}{2}\right )+2 \sin \left (\frac {x}{2}\right )}{2 \cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )}\right )\right ) \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 = 2.17, size = 24, normalized size = 1.71 \begin {gather*} 2 \text {Pi} \text {Floor}\left [-\frac {1}{2}+\frac {x}{2 \text {Pi}}\right ]+2 \text {ArcTan}\left [\frac {4}{3}+\frac {5 \text {Tan}\left [\frac {x}{2}\right ]}{3}\right ] \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 12, normalized size = 0.86
method | result | size |
default | \(2 \arctan \left (\frac {5 \tan \left (\frac {x}{2}\right )}{3}+\frac {4}{3}\right )\) | \(12\) |
risch | \(i \ln \left ({\mathrm e}^{i x}+2 i\right )-i \ln \left ({\mathrm e}^{i x}+\frac {i}{2}\right )\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.36, size = 15, normalized size = 1.07 \begin {gather*} 2 \, \arctan \left (\frac {5 \, \sin \left (x\right )}{3 \, {\left (\cos \left (x\right ) + 1\right )}} + \frac {4}{3}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 13, normalized size = 0.93 \begin {gather*} \arctan \left (\frac {5 \, \sin \left (x\right ) + 4}{3 \, \cos \left (x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 27 vs.
\(2 (12) = 24\)
time = 0.13, size = 27, normalized size = 1.93 \begin {gather*} 2 \operatorname {atan}{\left (\frac {5 \tan {\left (\frac {x}{2} \right )}}{3} + \frac {4}{3} \right )} + 2 \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 32, normalized size = 2.29 \begin {gather*} \frac {2}{3}\cdot 3 \left (\arctan \left (\frac {-2 \cos x-\sin x-2}{\cos x-2 \sin x-4}\right )+\frac {x}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.22, size = 20, normalized size = 1.43 \begin {gather*} x+2\,\mathrm {atan}\left (\frac {5\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}+\frac {4}{3}\right )-2\,\mathrm {atan}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________