3.307 \(\int \frac{1}{\csc (x)-\sin (x)} \, dx\)

Optimal. Leaf size=2 \[ \sec (x) \]

[Out]

Sec[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0187821, antiderivative size = 2, normalized size of antiderivative = 1., 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} \[ \sec (x) \]

Antiderivative was successfully verified.

[In]

Int[(Csc[x] - Sin[x])^(-1),x]

[Out]

Sec[x]

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 8

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

Rubi steps

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

Mathematica [A]  time = 0.0038522, size = 2, normalized size = 1. \[ \sec (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(Csc[x] - Sin[x])^(-1),x]

[Out]

Sec[x]

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 5, normalized size = 2.5 \begin{align*} \left ( \cos \left ( x \right ) \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(csc(x)-sin(x)),x)

[Out]

1/cos(x)

________________________________________________________________________________________

Maxima [B]  time = 0.963639, size = 23, normalized size = 11.5 \begin{align*} -\frac{2}{\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.97604, size = 14, normalized size = 7. \begin{align*} \frac{1}{\cos \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x)),x, algorithm="fricas")

[Out]

1/cos(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x)),x)

[Out]

Integral(1/(-sin(x) + csc(x)), x)

________________________________________________________________________________________

Giac [B]  time = 1.15938, size = 23, normalized size = 11.5 \begin{align*} \frac{2}{\frac{\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(x)-sin(x)),x, algorithm="giac")

[Out]

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