Optimal. Leaf size=67 \[ \frac {8 x}{15 \sqrt {15}}-\frac {8 \tan ^{-1}\left (\frac {1-2 \cos ^2(x)}{4+\sqrt {15}+2 \cos (x) \sin (x)}\right )}{15 \sqrt {15}}+\frac {1+4 \tan (x)}{15 \left (2+\tan (x)+2 \tan ^2(x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {628, 632, 210}
\begin {gather*} -\frac {8 \text {ArcTan}\left (\frac {1-2 \cos ^2(x)}{2 \sin (x) \cos (x)+\sqrt {15}+4}\right )}{15 \sqrt {15}}+\frac {8 x}{15 \sqrt {15}}+\frac {4 \tan (x)+1}{15 \left (2 \tan ^2(x)+\tan (x)+2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 628
Rule 632
Rubi steps
\begin {align*} \int \frac {1}{(2 \sec (x)+\sin (x))^2} \, dx &=\text {Subst}\left (\int \frac {1}{\left (2+x+2 x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=\frac {1+4 \tan (x)}{15 \left (2+\tan (x)+2 \tan ^2(x)\right )}+\frac {4}{15} \text {Subst}\left (\int \frac {1}{2+x+2 x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1+4 \tan (x)}{15 \left (2+\tan (x)+2 \tan ^2(x)\right )}-\frac {8}{15} \text {Subst}\left (\int \frac {1}{-15-x^2} \, dx,x,1+4 \tan (x)\right )\\ &=\frac {8 x}{15 \sqrt {15}}-\frac {8 \tan ^{-1}\left (\frac {1-2 \cos ^2(x)}{4+\sqrt {15}+2 \cos (x) \sin (x)}\right )}{15 \sqrt {15}}+\frac {1+4 \tan (x)}{15 \left (2+\tan (x)+2 \tan ^2(x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 58, normalized size = 0.87 \begin {gather*} \frac {\sec ^2(x) (4+\sin (2 x)) \left (15 (-15+\cos (2 x))+8 \sqrt {15} \tan ^{-1}\left (\frac {1+4 \tan (x)}{\sqrt {15}}\right ) (4+\sin (2 x))\right )}{900 (2 \sec (x)+\sin (x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 39, normalized size = 0.58
method | result | size |
default | \(\frac {1+4 \tan \left (x \right )}{30+15 \tan \left (x \right )+30 \left (\tan ^{2}\left (x \right )\right )}+\frac {8 \sqrt {15}\, \arctan \left (\frac {\left (1+4 \tan \left (x \right )\right ) \sqrt {15}}{15}\right )}{225}\) | \(39\) |
risch | \(\frac {\left (\frac {8}{3615}-\frac {2 i}{241}\right ) \left (241 \,{\mathrm e}^{2 i x}-15+4 i\right )}{{\mathrm e}^{4 i x}+8 i {\mathrm e}^{2 i x}-1}+\frac {4 i \sqrt {15}\, \ln \left ({\mathrm e}^{2 i x}+i \sqrt {15}+4 i\right )}{225}-\frac {4 i \sqrt {15}\, \ln \left ({\mathrm e}^{2 i x}-i \sqrt {15}+4 i\right )}{225}\) | \(76\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.69, size = 38, normalized size = 0.57 \begin {gather*} \frac {8}{225} \, \sqrt {15} \arctan \left (\frac {1}{15} \, \sqrt {15} {\left (4 \, \tan \left (x\right ) + 1\right )}\right ) + \frac {4 \, \tan \left (x\right ) + 1}{15 \, {\left (2 \, \tan \left (x\right )^{2} + \tan \left (x\right ) + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.06, size = 61, normalized size = 0.91 \begin {gather*} \frac {4 \, {\left (\sqrt {15} \cos \left (x\right ) \sin \left (x\right ) + 2 \, \sqrt {15}\right )} \arctan \left (\frac {8 \, \sqrt {15} \cos \left (x\right ) \sin \left (x\right ) + \sqrt {15}}{15 \, {\left (2 \, \cos \left (x\right )^{2} - 1\right )}}\right ) + 15 \, \cos \left (x\right )^{2} - 120}{225 \, {\left (\cos \left (x\right ) \sin \left (x\right ) + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (\sin {\left (x \right )} + 2 \sec {\left (x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.72, size = 78, normalized size = 1.16 \begin {gather*} \frac {8}{225} \, \sqrt {15} {\left (x + \arctan \left (-\frac {\sqrt {15} \sin \left (2 \, x\right ) - \cos \left (2 \, x\right ) - 4 \, \sin \left (2 \, x\right ) - 1}{\sqrt {15} \cos \left (2 \, x\right ) + \sqrt {15} - 4 \, \cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) + 4}\right )\right )} + \frac {4 \, \tan \left (x\right ) + 1}{15 \, {\left (2 \, \tan \left (x\right )^{2} + \tan \left (x\right ) + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.43, size = 120, normalized size = 1.79 \begin {gather*} \frac {4\,\sqrt {15}\,\left (2\,\mathrm {atan}\left (\frac {2\,\sqrt {15}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{15}-\frac {2\,\sqrt {15}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{15}+\frac {2\,\sqrt {15}\,\mathrm {tan}\left (\frac {x}{2}\right )}{5}+\frac {\sqrt {15}}{15}\right )-2\,\mathrm {atan}\left (\frac {\sqrt {15}}{15}-\frac {2\,\sqrt {15}\,\mathrm {tan}\left (\frac {x}{2}\right )}{15}\right )\right )}{225}-\frac {\frac {7\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{30}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{15}-\frac {7\,\mathrm {tan}\left (\frac {x}{2}\right )}{30}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^4-{\mathrm {tan}\left (\frac {x}{2}\right )}^3+2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\mathrm {tan}\left (\frac {x}{2}\right )+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________