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

Optimal. Leaf size=11 \[ \frac {\cos (x)}{1-\sin (x)} \]

[Out]

cos(x)/(1-sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2648} \[ \frac {\cos (x)}{1-\sin (x)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Cos[x]/(1 - Sin[x])

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{1-\sin (x)} \, dx &=\frac {\cos (x)}{1-\sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.01, size = 25, normalized size = 2.27 \[ \frac {2 \sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*Sin[x/2])/(Cos[x/2] - Sin[x/2])

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 17, normalized size = 1.55 \[ \frac {\cos \relax (x) + \sin \relax (x) + 1}{\cos \relax (x) - \sin \relax (x) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.24, size = 10, normalized size = 0.91 \[ -\frac {2}{\tan \left (\frac {1}{2} \, x\right ) - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(tan(1/2*x) - 1)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 11, normalized size = 1.00 \[ -\frac {2}{\tan \left (\frac {x}{2}\right )-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(tan(1/2*x)-1)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 15, normalized size = 1.36 \[ -\frac {2}{\frac {\sin \relax (x)}{\cos \relax (x) + 1} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 10, normalized size = 0.91 \[ -\frac {2}{\mathrm {tan}\left (\frac {x}{2}\right )-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(tan(x/2) - 1)

________________________________________________________________________________________

sympy [A]  time = 0.37, size = 8, normalized size = 0.73 \[ - \frac {2}{\tan {\left (\frac {x}{2} \right )} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(tan(x/2) - 1)

________________________________________________________________________________________