3.326 \(\int \frac {1}{-\cos (x)+\sec (x)} \, dx\)

Optimal. Leaf size=4 \[ -\csc (x) \]

[Out]

-csc(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 4, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4397, 2606, 8} \[ -\csc (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Csc[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

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 4397

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

Rubi steps

\begin {align*} \int \frac {1}{-\cos (x)+\sec (x)} \, dx &=\int \cot (x) \csc (x) \, dx\\ &=-\operatorname {Subst}(\int 1 \, dx,x,\csc (x))\\ &=-\csc (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 4, normalized size = 1.00 \[ -\csc (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Csc[x]

________________________________________________________________________________________

fricas [A]  time = 0.83, size = 6, normalized size = 1.50 \[ -\frac {1}{\sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/sin(x)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 6, normalized size = 1.50 \[ -\frac {1}{\sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/sin(x)

________________________________________________________________________________________

maple [A]  time = 0.10, size = 7, normalized size = 1.75 \[ -\frac {1}{\sin \relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/sin(x)

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 21, normalized size = 5.25 \[ -\frac {\cos \relax (x) + 1}{2 \, \sin \relax (x)} - \frac {\sin \relax (x)}{2 \, {\left (\cos \relax (x) + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(cos(x) + 1)/sin(x) - 1/2*sin(x)/(cos(x) + 1)

________________________________________________________________________________________

mupad [B]  time = 2.37, size = 6, normalized size = 1.50 \[ -\frac {1}{\sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(cos(x) - 1/cos(x)),x)

[Out]

-1/sin(x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \int \frac {1}{\cos {\relax (x )} - \sec {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-Integral(1/(cos(x) - sec(x)), x)

________________________________________________________________________________________