\(\int \frac {1}{(\sec ^2(x)+\tan ^2(x))^3} \, dx\) [486]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 74 \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=-x+\frac {7 x}{4 \sqrt {2}}+\frac {7 \arctan \left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\sin ^2(x)}\right )}{4 \sqrt {2}}+\frac {\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac {\tan (x)}{4 \left (1+2 \tan ^2(x)\right )} \]

[Out]

-x+7/8*x*2^(1/2)+7/8*arctan(cos(x)*sin(x)/(1+sin(x)^2+2^(1/2)))*2^(1/2)+1/2*tan(x)/(1+2*tan(x)^2)^2-1/4*tan(x)
/(1+2*tan(x)^2)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {425, 541, 536, 209} \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=\frac {7 \arctan \left (\frac {\sin (x) \cos (x)}{\sin ^2(x)+\sqrt {2}+1}\right )}{4 \sqrt {2}}+\frac {7 x}{4 \sqrt {2}}-x-\frac {\tan (x)}{4 \left (2 \tan ^2(x)+1\right )}+\frac {\tan (x)}{2 \left (2 \tan ^2(x)+1\right )^2} \]

[In]

Int[(Sec[x]^2 + Tan[x]^2)^(-3),x]

[Out]

-x + (7*x)/(4*Sqrt[2]) + (7*ArcTan[(Cos[x]*Sin[x])/(1 + Sqrt[2] + Sin[x]^2)])/(4*Sqrt[2]) + Tan[x]/(2*(1 + 2*T
an[x]^2)^2) - Tan[x]/(4*(1 + 2*Tan[x]^2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 425

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1
)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomi
alQ[a, b, c, d, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (1+2 x^2\right )^3} \, dx,x,\tan (x)\right ) \\ & = \frac {\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac {1}{4} \text {Subst}\left (\int \frac {-2-6 x^2}{\left (1+x^2\right ) \left (1+2 x^2\right )^2} \, dx,x,\tan (x)\right ) \\ & = \frac {\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac {\tan (x)}{4 \left (1+2 \tan ^2(x)\right )}+\frac {1}{8} \text {Subst}\left (\int \frac {6-2 x^2}{\left (1+x^2\right ) \left (1+2 x^2\right )} \, dx,x,\tan (x)\right ) \\ & = \frac {\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac {\tan (x)}{4 \left (1+2 \tan ^2(x)\right )}+\frac {7}{4} \text {Subst}\left (\int \frac {1}{1+2 x^2} \, dx,x,\tan (x)\right )-\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right ) \\ & = -x+\frac {7 x}{4 \sqrt {2}}+\frac {7 \arctan \left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\sin ^2(x)}\right )}{4 \sqrt {2}}+\frac {\tan (x)}{2 \left (1+2 \tan ^2(x)\right )^2}-\frac {\tan (x)}{4 \left (1+2 \tan ^2(x)\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.07 \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=-\frac {(-3+\cos (2 x)) \sec ^6(x) \left (-76 x+7 \sqrt {2} \arctan \left (\sqrt {2} \tan (x)\right ) (-3+\cos (2 x))^2+48 x \cos (2 x)-4 x \cos (4 x)-2 \sin (2 x)+3 \sin (4 x)\right )}{64 \left (\sec ^2(x)+\tan ^2(x)\right )^3} \]

[In]

Integrate[(Sec[x]^2 + Tan[x]^2)^(-3),x]

[Out]

-1/64*((-3 + Cos[2*x])*Sec[x]^6*(-76*x + 7*Sqrt[2]*ArcTan[Sqrt[2]*Tan[x]]*(-3 + Cos[2*x])^2 + 48*x*Cos[2*x] -
4*x*Cos[4*x] - 2*Sin[2*x] + 3*Sin[4*x]))/(Sec[x]^2 + Tan[x]^2)^3

Maple [A] (verified)

Time = 14.44 (sec) , antiderivative size = 2, normalized size of antiderivative = 0.03

method result size
parallelrisch \(0\) \(2\)
default \(-\arctan \left (\tan \left (x \right )\right )+\frac {-\frac {\tan \left (x \right )^{3}}{2}+\frac {\tan \left (x \right )}{4}}{\left (1+2 \tan \left (x \right )^{2}\right )^{2}}+\frac {7 \sqrt {2}\, \arctan \left (\sqrt {2}\, \tan \left (x \right )\right )}{8}\) \(42\)
risch \(-x -\frac {i \left (17 \,{\mathrm e}^{6 i x}-57 \,{\mathrm e}^{4 i x}+19 \,{\mathrm e}^{2 i x}-3\right )}{2 \left ({\mathrm e}^{4 i x}-6 \,{\mathrm e}^{2 i x}+1\right )^{2}}+\frac {7 i \sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}-2 \sqrt {2}-3\right )}{16}-\frac {7 i \sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}+2 \sqrt {2}-3\right )}{16}\) \(85\)

[In]

int(1/(sec(x)^2+tan(x)^2)^3,x,method=_RETURNVERBOSE)

[Out]

0

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.35 \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=-\frac {16 \, x \cos \left (x\right )^{4} - 64 \, x \cos \left (x\right )^{2} + 7 \, {\left (\sqrt {2} \cos \left (x\right )^{4} - 4 \, \sqrt {2} \cos \left (x\right )^{2} + 4 \, \sqrt {2}\right )} \arctan \left (\frac {3 \, \sqrt {2} \cos \left (x\right )^{2} - 2 \, \sqrt {2}}{4 \, \cos \left (x\right ) \sin \left (x\right )}\right ) - 4 \, {\left (3 \, \cos \left (x\right )^{3} - 2 \, \cos \left (x\right )\right )} \sin \left (x\right ) + 64 \, x}{16 \, {\left (\cos \left (x\right )^{4} - 4 \, \cos \left (x\right )^{2} + 4\right )}} \]

[In]

integrate(1/(sec(x)^2+tan(x)^2)^3,x, algorithm="fricas")

[Out]

-1/16*(16*x*cos(x)^4 - 64*x*cos(x)^2 + 7*(sqrt(2)*cos(x)^4 - 4*sqrt(2)*cos(x)^2 + 4*sqrt(2))*arctan(1/4*(3*sqr
t(2)*cos(x)^2 - 2*sqrt(2))/(cos(x)*sin(x))) - 4*(3*cos(x)^3 - 2*cos(x))*sin(x) + 64*x)/(cos(x)^4 - 4*cos(x)^2
+ 4)

Sympy [F]

\[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=\int \frac {1}{\left (\tan ^{2}{\left (x \right )} + \sec ^{2}{\left (x \right )}\right )^{3}}\, dx \]

[In]

integrate(1/(sec(x)**2+tan(x)**2)**3,x)

[Out]

Integral((tan(x)**2 + sec(x)**2)**(-3), x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.61 \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=\frac {7}{8} \, \sqrt {2} \arctan \left (\sqrt {2} \tan \left (x\right )\right ) - x - \frac {2 \, \tan \left (x\right )^{3} - \tan \left (x\right )}{4 \, {\left (4 \, \tan \left (x\right )^{4} + 4 \, \tan \left (x\right )^{2} + 1\right )}} \]

[In]

integrate(1/(sec(x)^2+tan(x)^2)^3,x, algorithm="maxima")

[Out]

7/8*sqrt(2)*arctan(sqrt(2)*tan(x)) - x - 1/4*(2*tan(x)^3 - tan(x))/(4*tan(x)^4 + 4*tan(x)^2 + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.53 \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=\frac {7}{8} \, \sqrt {2} \arctan \left (\sqrt {2} \tan \left (x\right )\right ) - x - \frac {2 \, \tan \left (x\right )^{3} - \tan \left (x\right )}{4 \, {\left (2 \, \tan \left (x\right )^{2} + 1\right )}^{2}} \]

[In]

integrate(1/(sec(x)^2+tan(x)^2)^3,x, algorithm="giac")

[Out]

7/8*sqrt(2)*arctan(sqrt(2)*tan(x)) - x - 1/4*(2*tan(x)^3 - tan(x))/(2*tan(x)^2 + 1)^2

Mupad [B] (verification not implemented)

Time = 28.56 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.54 \[ \int \frac {1}{\left (\sec ^2(x)+\tan ^2(x)\right )^3} \, dx=\frac {\frac {\mathrm {tan}\left (x\right )}{16}-\frac {{\mathrm {tan}\left (x\right )}^3}{8}}{{\mathrm {tan}\left (x\right )}^4+{\mathrm {tan}\left (x\right )}^2+\frac {1}{4}}-x+\frac {7\,\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,\mathrm {tan}\left (x\right )\right )}{8} \]

[In]

int(1/(1/cos(x)^2 + tan(x)^2)^3,x)

[Out]

(tan(x)/16 - tan(x)^3/8)/(tan(x)^2 + tan(x)^4 + 1/4) - x + (7*2^(1/2)*atan(2^(1/2)*tan(x)))/8