3.329 \(\int \frac{1}{(-\cos (x)+\sec (x))^4} \, dx\)

Optimal. Leaf size=17 \[ -\frac{1}{7} \cot ^7(x)-\frac{\cot ^5(x)}{5} \]

[Out]

-Cot[x]^5/5 - Cot[x]^7/7

________________________________________________________________________________________

Rubi [A]  time = 0.0171948, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 0, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ -\frac{1}{7} \cot ^7(x)-\frac{\cot ^5(x)}{5} \]

Antiderivative was successfully verified.

[In]

Int[(-Cos[x] + Sec[x])^(-4),x]

[Out]

-Cot[x]^5/5 - Cot[x]^7/7

Rubi steps

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

Mathematica [B]  time = 0.0224526, size = 37, normalized size = 2.18 \[ -\frac{2 \cot (x)}{35}-\frac{1}{7} \cot (x) \csc ^6(x)+\frac{8}{35} \cot (x) \csc ^4(x)-\frac{1}{35} \cot (x) \csc ^2(x) \]

Antiderivative was successfully verified.

[In]

Integrate[(-Cos[x] + Sec[x])^(-4),x]

[Out]

(-2*Cot[x])/35 - (Cot[x]*Csc[x]^2)/35 + (8*Cot[x]*Csc[x]^4)/35 - (Cot[x]*Csc[x]^6)/7

________________________________________________________________________________________

Maple [A]  time = 0.037, size = 14, normalized size = 0.8 \begin{align*} -{\frac{1}{7\, \left ( \tan \left ( x \right ) \right ) ^{7}}}-{\frac{1}{5\, \left ( \tan \left ( x \right ) \right ) ^{5}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-cos(x)+sec(x))^4,x)

[Out]

-1/7/tan(x)^7-1/5/tan(x)^5

________________________________________________________________________________________

Maxima [A]  time = 0.997813, size = 19, normalized size = 1.12 \begin{align*} -\frac{7 \, \tan \left (x\right )^{2} + 5}{35 \, \tan \left (x\right )^{7}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-cos(x)+sec(x))^4,x, algorithm="maxima")

[Out]

-1/35*(7*tan(x)^2 + 5)/tan(x)^7

________________________________________________________________________________________

Fricas [B]  time = 2.30063, size = 112, normalized size = 6.59 \begin{align*} -\frac{2 \, \cos \left (x\right )^{7} - 7 \, \cos \left (x\right )^{5}}{35 \,{\left (\cos \left (x\right )^{6} - 3 \, \cos \left (x\right )^{4} + 3 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-cos(x)+sec(x))^4,x, algorithm="fricas")

[Out]

-1/35*(2*cos(x)^7 - 7*cos(x)^5)/((cos(x)^6 - 3*cos(x)^4 + 3*cos(x)^2 - 1)*sin(x))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-cos(x)+sec(x))**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.1702, size = 19, normalized size = 1.12 \begin{align*} -\frac{7 \, \tan \left (x\right )^{2} + 5}{35 \, \tan \left (x\right )^{7}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-cos(x)+sec(x))^4,x, algorithm="giac")

[Out]

-1/35*(7*tan(x)^2 + 5)/tan(x)^7