Optimal. Leaf size=27 \[ \frac {x}{3}+\frac {1}{3} \tan ^{-1}\left (\frac {2 \cos (x) \sin (x)}{1+2 \sin ^2(x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {209}
\begin {gather*} \frac {1}{3} \text {ArcTan}\left (\frac {2 \sin (x) \cos (x)}{2 \sin ^2(x)+1}\right )+\frac {x}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rubi steps
\begin {align*} \int \frac {1}{4-3 \cos ^2(x)+5 \sin ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{1+9 x^2} \, dx,x,\tan (x)\right )\\ &=\frac {x}{3}+\frac {1}{3} \tan ^{-1}\left (\frac {2 \cos (x) \sin (x)}{1+2 \sin ^2(x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 9, normalized size = 0.33 \begin {gather*} \frac {1}{3} \tan ^{-1}(3 \tan (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 8, normalized size = 0.30
method | result | size |
default | \(\frac {\arctan \left (3 \tan \left (x \right )\right )}{3}\) | \(8\) |
risch | \(-\frac {i \ln \left ({\mathrm e}^{2 i x}-\frac {1}{2}\right )}{6}+\frac {i \ln \left ({\mathrm e}^{2 i x}-2\right )}{6}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 3.37, size = 7, normalized size = 0.26 \begin {gather*} \frac {1}{3} \, \arctan \left (3 \, \tan \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.27, size = 21, normalized size = 0.78 \begin {gather*} -\frac {1}{6} \, \arctan \left (\frac {10 \, \cos \left (x\right )^{2} - 9}{6 \, \cos \left (x\right ) \sin \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. 219 vs.
\(2 (22) = 44\).
time = 4.84, size = 219, normalized size = 8.11 \begin {gather*} \frac {4478554083 \sqrt {17 - 12 \sqrt {2}} \left (\operatorname {atan}{\left (\frac {\tan {\left (\frac {x}{2} \right )}}{\sqrt {17 - 12 \sqrt {2}}} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{2305195203 + 1630019160 \sqrt {2}} + \frac {3166815962 \sqrt {2} \sqrt {17 - 12 \sqrt {2}} \left (\operatorname {atan}{\left (\frac {\tan {\left (\frac {x}{2} \right )}}{\sqrt {17 - 12 \sqrt {2}}} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{2305195203 + 1630019160 \sqrt {2}} + \frac {131836323 \sqrt {12 \sqrt {2} + 17} \left (\operatorname {atan}{\left (\frac {\tan {\left (\frac {x}{2} \right )}}{\sqrt {12 \sqrt {2} + 17}} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{2305195203 + 1630019160 \sqrt {2}} + \frac {93222358 \sqrt {2} \sqrt {12 \sqrt {2} + 17} \left (\operatorname {atan}{\left (\frac {\tan {\left (\frac {x}{2} \right )}}{\sqrt {12 \sqrt {2} + 17}} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{2305195203 + 1630019160 \sqrt {2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.74, size = 20, normalized size = 0.74 \begin {gather*} \frac {1}{3} \, x - \frac {1}{3} \, \arctan \left (\frac {\sin \left (2 \, x\right )}{\cos \left (2 \, x\right ) - 2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.28, size = 16, normalized size = 0.59 \begin {gather*} \frac {x}{3}-\frac {\mathrm {atan}\left (\mathrm {tan}\left (x\right )\right )}{3}+\frac {\mathrm {atan}\left (3\,\mathrm {tan}\left (x\right )\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________