Optimal. Leaf size=55 \[ \frac {x}{6 \sqrt {6}}+\frac {\tan (x)}{6 \left (2 \tan ^2(x)+3\right )}-\frac {\tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {6}+2}\right )}{6 \sqrt {6}} \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {199, 203} \[ \frac {x}{6 \sqrt {6}}+\frac {\tan (x)}{6 \left (2 \tan ^2(x)+3\right )}-\frac {\tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {6}+2}\right )}{6 \sqrt {6}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 199
Rule 203
Rubi steps
\begin {align*} \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx &=\operatorname {Subst}\left (\int \frac {1}{\left (3+2 x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=\frac {\tan (x)}{6 \left (3+2 \tan ^2(x)\right )}+\frac {1}{6} \operatorname {Subst}\left (\int \frac {1}{3+2 x^2} \, dx,x,\tan (x)\right )\\ &=\frac {x}{6 \sqrt {6}}-\frac {\tan ^{-1}\left (\frac {\cos (x) \sin (x)}{2+\sqrt {6}+\cos ^2(x)}\right )}{6 \sqrt {6}}+\frac {\tan (x)}{6 \left (3+2 \tan ^2(x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 54, normalized size = 0.98 \[ \frac {(\cos (2 x)+5) \sec ^4(x) \left (6 \sin (2 x)+\sqrt {6} (\cos (2 x)+5) \tan ^{-1}\left (\sqrt {\frac {2}{3}} \tan (x)\right )\right )}{144 \left (2 \sec ^2(x)+1\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.24, size = 58, normalized size = 1.05 \[ -\frac {{\left (\sqrt {6} \cos \relax (x)^{2} + 2 \, \sqrt {6}\right )} \arctan \left (\frac {5 \, \sqrt {6} \cos \relax (x)^{2} - 2 \, \sqrt {6}}{12 \, \cos \relax (x) \sin \relax (x)}\right ) - 12 \, \cos \relax (x) \sin \relax (x)}{72 \, {\left (\cos \relax (x)^{2} + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.63, size = 61, normalized size = 1.11 \[ \frac {1}{36} \, \sqrt {6} {\left (x + \arctan \left (-\frac {\sqrt {6} \sin \left (2 \, x\right ) - 2 \, \sin \left (2 \, x\right )}{\sqrt {6} \cos \left (2 \, x\right ) + \sqrt {6} - 2 \, \cos \left (2 \, x\right ) + 2}\right )\right )} + \frac {\tan \relax (x)}{6 \, {\left (2 \, \tan \relax (x)^{2} + 3\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 29, normalized size = 0.53
method | result | size |
default | \(\frac {\tan \relax (x )}{18+12 \left (\tan ^{2}\relax (x )\right )}+\frac {\sqrt {6}\, \arctan \left (\frac {\tan \relax (x ) \sqrt {6}}{3}\right )}{36}\) | \(29\) |
risch | \(\frac {i \left (5 \,{\mathrm e}^{2 i x}+1\right )}{3 \,{\mathrm e}^{4 i x}+30 \,{\mathrm e}^{2 i x}+3}+\frac {i \sqrt {6}\, \ln \left ({\mathrm e}^{2 i x}+2 \sqrt {6}+5\right )}{72}-\frac {i \sqrt {6}\, \ln \left ({\mathrm e}^{2 i x}-2 \sqrt {6}+5\right )}{72}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.97, size = 28, normalized size = 0.51 \[ \frac {1}{36} \, \sqrt {6} \arctan \left (\frac {1}{3} \, \sqrt {6} \tan \relax (x)\right ) + \frac {\tan \relax (x)}{6 \, {\left (2 \, \tan \relax (x)^{2} + 3\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.39, size = 77, normalized size = 1.40 \[ \frac {\sqrt {6}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {6}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{4}+\frac {5\,\sqrt {6}\,\mathrm {tan}\left (\frac {x}{2}\right )}{12}\right )+2\,\mathrm {atan}\left (\frac {\sqrt {6}\,\mathrm {tan}\left (\frac {x}{2}\right )}{4}\right )\right )}{72}+\frac {\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{9}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{9}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^4+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{3}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (\cos {\relax (x )} + 2 \sec {\relax (x )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________