Integrand size = 9, antiderivative size = 55 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\frac {x}{6 \sqrt {6}}-\frac {\arctan \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 )} \] Output:
1/36*x*6^(1/2)-1/36*arctan(cos(x)*sin(x)/(2+cos(x)^2+6^(1/2)))*6^(1/2)+1/6 *tan(x)/(3+2*tan(x)^2)
Time = 1.09 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.98 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\frac {(5+\cos (2 x)) \sec ^4(x) \left (\sqrt {6} \arctan \left (\sqrt {\frac {2}{3}} \tan (x)\right ) (5+\cos (2 x))+6 \sin (2 x)\right )}{144 \left (1+2 \sec ^2(x)\right )^2} \] Input:
Integrate[(Cos[x] + 2*Sec[x])^(-2),x]
Output:
((5 + Cos[2*x])*Sec[x]^4*(Sqrt[6]*ArcTan[Sqrt[2/3]*Tan[x]]*(5 + Cos[2*x]) + 6*Sin[2*x]))/(144*(1 + 2*Sec[x]^2)^2)
Time = 0.19 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.67, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3042, 4889, 215, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(\cos (x)+2 \sec (x))^2}dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \int \frac {1}{\left (2 \tan ^2(x)+3\right )^2}d\tan (x)\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {1}{6} \int \frac {1}{2 \tan ^2(x)+3}d\tan (x)+\frac {\tan (x)}{6 \left (2 \tan ^2(x)+3\right )}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\arctan \left (\sqrt {\frac {2}{3}} \tan (x)\right )}{6 \sqrt {6}}+\frac {\tan (x)}{6 \left (2 \tan ^2(x)+3\right )}\) |
Input:
Int[(Cos[x] + 2*Sec[x])^(-2),x]
Output:
ArcTan[Sqrt[2/3]*Tan[x]]/(6*Sqrt[6]) + Tan[x]/(6*(3 + 2*Tan[x]^2))
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Time = 0.22 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.53
method | result | size |
default | \(\frac {\tan \left (x \right )}{18+12 \tan \left (x \right )^{2}}+\frac {\sqrt {6}\, \arctan \left (\frac {\tan \left (x \right ) \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\) |
Input:
int(1/(cos(x)+2*sec(x))^2,x,method=_RETURNVERBOSE)
Output:
1/6*tan(x)/(3+2*tan(x)^2)+1/36*6^(1/2)*arctan(1/3*tan(x)*6^(1/2))
Time = 0.07 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.05 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=-\frac {{\left (\sqrt {6} \cos \left (x\right )^{2} + 2 \, \sqrt {6}\right )} \arctan \left (\frac {5 \, \sqrt {6} \cos \left (x\right )^{2} - 2 \, \sqrt {6}}{12 \, \cos \left (x\right ) \sin \left (x\right )}\right ) - 12 \, \cos \left (x\right ) \sin \left (x\right )}{72 \, {\left (\cos \left (x\right )^{2} + 2\right )}} \] Input:
integrate(1/(cos(x)+2*sec(x))^2,x, algorithm="fricas")
Output:
-1/72*((sqrt(6)*cos(x)^2 + 2*sqrt(6))*arctan(1/12*(5*sqrt(6)*cos(x)^2 - 2* sqrt(6))/(cos(x)*sin(x))) - 12*cos(x)*sin(x))/(cos(x)^2 + 2)
\[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\int \frac {1}{\left (\cos {\left (x \right )} + 2 \sec {\left (x \right )}\right )^{2}}\, dx \] Input:
integrate(1/(cos(x)+2*sec(x))**2,x)
Output:
Integral((cos(x) + 2*sec(x))**(-2), x)
Time = 0.11 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.51 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\frac {1}{36} \, \sqrt {6} \arctan \left (\frac {1}{3} \, \sqrt {6} \tan \left (x\right )\right ) + \frac {\tan \left (x\right )}{6 \, {\left (2 \, \tan \left (x\right )^{2} + 3\right )}} \] Input:
integrate(1/(cos(x)+2*sec(x))^2,x, algorithm="maxima")
Output:
1/36*sqrt(6)*arctan(1/3*sqrt(6)*tan(x)) + 1/6*tan(x)/(2*tan(x)^2 + 3)
Time = 0.12 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.11 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\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 \left (x\right )}{6 \, {\left (2 \, \tan \left (x\right )^{2} + 3\right )}} \] Input:
integrate(1/(cos(x)+2*sec(x))^2,x, algorithm="giac")
Output:
1/36*sqrt(6)*(x + arctan(-(sqrt(6)*sin(2*x) - 2*sin(2*x))/(sqrt(6)*cos(2*x ) + sqrt(6) - 2*cos(2*x) + 2))) + 1/6*tan(x)/(2*tan(x)^2 + 3)
Time = 0.22 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.40 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\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} \] Input:
int(1/(cos(x) + 2/cos(x))^2,x)
Output:
(6^(1/2)*(2*atan((5*6^(1/2)*tan(x/2))/12 + (6^(1/2)*tan(x/2)^3)/4) + 2*ata n((6^(1/2)*tan(x/2))/4)))/72 + (tan(x/2)/9 - tan(x/2)^3/9)/((2*tan(x/2)^2) /3 + tan(x/2)^4 + 1)
Time = 0.15 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.82 \[ \int \frac {1}{(\cos (x)+2 \sec (x))^2} \, dx=\frac {\sqrt {6}\, \mathit {atan} \left (\frac {\sqrt {3}\, \tan \left (\frac {x}{2}\right )-1}{\sqrt {2}}\right ) \sin \left (x \right )^{2}-3 \sqrt {6}\, \mathit {atan} \left (\frac {\sqrt {3}\, \tan \left (\frac {x}{2}\right )-1}{\sqrt {2}}\right )+\sqrt {6}\, \mathit {atan} \left (\frac {\sqrt {3}\, \tan \left (\frac {x}{2}\right )+1}{\sqrt {2}}\right ) \sin \left (x \right )^{2}-3 \sqrt {6}\, \mathit {atan} \left (\frac {\sqrt {3}\, \tan \left (\frac {x}{2}\right )+1}{\sqrt {2}}\right )-6 \cos \left (x \right ) \sin \left (x \right )}{36 \sin \left (x \right )^{2}-108} \] Input:
int(1/(cos(x)+2*sec(x))^2,x)
Output:
(sqrt(6)*atan((sqrt(3)*tan(x/2) - 1)/sqrt(2))*sin(x)**2 - 3*sqrt(6)*atan(( sqrt(3)*tan(x/2) - 1)/sqrt(2)) + sqrt(6)*atan((sqrt(3)*tan(x/2) + 1)/sqrt( 2))*sin(x)**2 - 3*sqrt(6)*atan((sqrt(3)*tan(x/2) + 1)/sqrt(2)) - 6*cos(x)* sin(x))/(36*(sin(x)**2 - 3))