3.715 \(\int \sec ^4(x) (-1+\sec ^2(x))^2 \tan (x) \, dx\)

Optimal. Leaf size=17 \[ \frac {\tan ^8(x)}{8}+\frac {\tan ^6(x)}{6} \]

[Out]

1/6*tan(x)^6+1/8*tan(x)^8

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4120, 2607, 14} \[ \frac {\tan ^8(x)}{8}+\frac {\tan ^6(x)}{6} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^4*(-1 + Sec[x]^2)^2*Tan[x],x]

[Out]

Tan[x]^6/6 + Tan[x]^8/8

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 4120

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[b^p, Int[ActivateTrig[u*tan[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \sec ^4(x) \left (-1+\sec ^2(x)\right )^2 \tan (x) \, dx &=\int \sec ^4(x) \tan ^5(x) \, dx\\ &=\operatorname {Subst}\left (\int x^5 \left (1+x^2\right ) \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (x^5+x^7\right ) \, dx,x,\tan (x)\right )\\ &=\frac {\tan ^6(x)}{6}+\frac {\tan ^8(x)}{8}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 25, normalized size = 1.47 \[ \frac {\sec ^8(x)}{8}-\frac {\sec ^6(x)}{3}+\frac {\sec ^4(x)}{4} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^4*(-1 + Sec[x]^2)^2*Tan[x],x]

[Out]

Sec[x]^4/4 - Sec[x]^6/3 + Sec[x]^8/8

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 20, normalized size = 1.18 \[ \frac {6 \, \cos \relax (x)^{4} - 8 \, \cos \relax (x)^{2} + 3}{24 \, \cos \relax (x)^{8}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^4*(-1+sec(x)^2)^2*tan(x),x, algorithm="fricas")

[Out]

1/24*(6*cos(x)^4 - 8*cos(x)^2 + 3)/cos(x)^8

________________________________________________________________________________________

giac [A]  time = 0.15, size = 20, normalized size = 1.18 \[ \frac {6 \, \cos \relax (x)^{4} - 8 \, \cos \relax (x)^{2} + 3}{24 \, \cos \relax (x)^{8}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^4*(-1+sec(x)^2)^2*tan(x),x, algorithm="giac")

[Out]

1/24*(6*cos(x)^4 - 8*cos(x)^2 + 3)/cos(x)^8

________________________________________________________________________________________

maple [A]  time = 0.05, size = 20, normalized size = 1.18 \[ \frac {\left (\sec ^{8}\relax (x )\right )}{8}-\frac {\left (\sec ^{6}\relax (x )\right )}{3}+\frac {\left (\sec ^{4}\relax (x )\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^4*(-1+sec(x)^2)^2*tan(x),x)

[Out]

1/8*sec(x)^8-1/3*sec(x)^6+1/4*sec(x)^4

________________________________________________________________________________________

maxima [B]  time = 0.31, size = 42, normalized size = 2.47 \[ \frac {6 \, \sin \relax (x)^{4} - 4 \, \sin \relax (x)^{2} + 1}{24 \, {\left (\sin \relax (x)^{8} - 4 \, \sin \relax (x)^{6} + 6 \, \sin \relax (x)^{4} - 4 \, \sin \relax (x)^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^4*(-1+sec(x)^2)^2*tan(x),x, algorithm="maxima")

[Out]

1/24*(6*sin(x)^4 - 4*sin(x)^2 + 1)/(sin(x)^8 - 4*sin(x)^6 + 6*sin(x)^4 - 4*sin(x)^2 + 1)

________________________________________________________________________________________

mupad [B]  time = 2.92, size = 14, normalized size = 0.82 \[ \frac {{\mathrm {tan}\relax (x)}^6\,\left (3\,{\mathrm {tan}\relax (x)}^2+4\right )}{24} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tan(x)*(1/cos(x)^2 - 1)^2)/cos(x)^4,x)

[Out]

(tan(x)^6*(3*tan(x)^2 + 4))/24

________________________________________________________________________________________

sympy [A]  time = 6.97, size = 19, normalized size = 1.12 \[ \frac {\sec ^{8}{\relax (x )}}{8} - \frac {\sec ^{6}{\relax (x )}}{3} + \frac {\sec ^{4}{\relax (x )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**4*(-1+sec(x)**2)**2*tan(x),x)

[Out]

sec(x)**8/8 - sec(x)**6/3 + sec(x)**4/4

________________________________________________________________________________________