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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0666117, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, 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 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]

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 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]]

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.0175653, 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

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 20, normalized size = 1.2 \begin{align*}{\frac{ \left ( \sec \left ( x \right ) \right ) ^{8}}{8}}-{\frac{ \left ( \sec \left ( x \right ) \right ) ^{6}}{3}}+{\frac{ \left ( \sec \left ( x \right ) \right ) ^{4}}{4}} \end{align*}

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.955177, size = 57, normalized size = 3.35 \begin{align*} \frac{6 \, \sin \left (x\right )^{4} - 4 \, \sin \left (x\right )^{2} + 1}{24 \,{\left (\sin \left (x\right )^{8} - 4 \, \sin \left (x\right )^{6} + 6 \, \sin \left (x\right )^{4} - 4 \, \sin \left (x\right )^{2} + 1\right )}} \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 2.09194, size = 61, normalized size = 3.59 \begin{align*} \frac{6 \, \cos \left (x\right )^{4} - 8 \, \cos \left (x\right )^{2} + 3}{24 \, \cos \left (x\right )^{8}} \end{align*}

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

________________________________________________________________________________________

Sympy [A]  time = 9.18103, size = 19, normalized size = 1.12 \begin{align*} \frac{\sec ^{8}{\left (x \right )}}{8} - \frac{\sec ^{6}{\left (x \right )}}{3} + \frac{\sec ^{4}{\left (x \right )}}{4} \end{align*}

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

________________________________________________________________________________________

Giac [A]  time = 1.10274, size = 27, normalized size = 1.59 \begin{align*} \frac{6 \, \cos \left (x\right )^{4} - 8 \, \cos \left (x\right )^{2} + 3}{24 \, \cos \left (x\right )^{8}} \end{align*}

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