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

Optimal. Leaf size=17 \[ \frac{\csc ^3(x)}{3}-\frac{\csc ^5(x)}{5} \]

[Out]

Csc[x]^3/3 - Csc[x]^5/5

________________________________________________________________________________________

Rubi [A]  time = 0.0379673, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {4397, 2606, 14} \[ \frac{\csc ^3(x)}{3}-\frac{\csc ^5(x)}{5} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Csc[x]^3/3 - Csc[x]^5/5

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 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 \frac{1}{(-\cos (x)+\sec (x))^3} \, dx &=\int \cot ^3(x) \csc ^3(x) \, dx\\ &=-\operatorname{Subst}\left (\int x^2 \left (-1+x^2\right ) \, dx,x,\csc (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (-x^2+x^4\right ) \, dx,x,\csc (x)\right )\\ &=\frac{\csc ^3(x)}{3}-\frac{\csc ^5(x)}{5}\\ \end{align*}

Mathematica [A]  time = 0.0091952, size = 17, normalized size = 1. \[ \frac{\csc ^3(x)}{3}-\frac{\csc ^5(x)}{5} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Csc[x]^3/3 - Csc[x]^5/5

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3/sin(x)^3-1/5/sin(x)^5

________________________________________________________________________________________

Maxima [B]  time = 0.988393, size = 99, normalized size = 5.82 \begin{align*} \frac{{\left (\frac{5 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{30 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - 3\right )}{\left (\cos \left (x\right ) + 1\right )}^{5}}{480 \, \sin \left (x\right )^{5}} + \frac{\sin \left (x\right )}{16 \,{\left (\cos \left (x\right ) + 1\right )}} + \frac{\sin \left (x\right )^{3}}{96 \,{\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac{\sin \left (x\right )^{5}}{160 \,{\left (\cos \left (x\right ) + 1\right )}^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/480*(5*sin(x)^2/(cos(x) + 1)^2 + 30*sin(x)^4/(cos(x) + 1)^4 - 3)*(cos(x) + 1)^5/sin(x)^5 + 1/16*sin(x)/(cos(
x) + 1) + 1/96*sin(x)^3/(cos(x) + 1)^3 - 1/160*sin(x)^5/(cos(x) + 1)^5

________________________________________________________________________________________

Fricas [B]  time = 2.095, size = 82, normalized size = 4.82 \begin{align*} -\frac{5 \, \cos \left (x\right )^{2} - 2}{15 \,{\left (\cos \left (x\right )^{4} - 2 \, \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))^3,x, algorithm="fricas")

[Out]

-1/15*(5*cos(x)^2 - 2)/((cos(x)^4 - 2*cos(x)^2 + 1)*sin(x))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{1}{\cos ^{3}{\left (x \right )} - 3 \cos ^{2}{\left (x \right )} \sec{\left (x \right )} + 3 \cos{\left (x \right )} \sec ^{2}{\left (x \right )} - \sec ^{3}{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-Integral(1/(cos(x)**3 - 3*cos(x)**2*sec(x) + 3*cos(x)*sec(x)**2 - sec(x)**3), x)

________________________________________________________________________________________

Giac [A]  time = 1.11208, size = 19, normalized size = 1.12 \begin{align*} \frac{5 \, \sin \left (x\right )^{2} - 3}{15 \, \sin \left (x\right )^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/15*(5*sin(x)^2 - 3)/sin(x)^5